Sqlite db security - database

Im building an app which uses Sqlite DB.
Users can enter their information into the db and retrieve them.
However, I want them to be able to backup the sqlite db.
What I did was putting the sqlite db in the documents folder, so they could retrieve it out using iTunes.
For example if the ipad is faulty, i want them to be able to transfer the sqlite db to another ipad.
The problem now is, I dont want them to know the information inside the db, should say the db structure.
So how can I build a db that is able to read by my application only? and when they use sqlite browser to open, they wont be able to see anything.
I'm looking for something simple. Possible to have the db to prompt a password before opening it?

Here is the link to your answer, SQLCipher is the best thing, which will encrypt the whole database and if any one get the database from the iOS device, any how , still it will prompt for a password otherwise is will not allow user to see the same. even with Command prompt the user will not be able to see the database.
Hope this will be usefull....

Related

RDS can't create a database

I am trying to create an SQL Server database under the free tier options in AWS.
After going through the standard options - database name, password, public/private access, etc.. I press the create database button. I get the following screen.
But the database never gets created. I saw multiple tutorials.. but I haven't seen a similar problem. Does anyone have a clue what am I doing wrong?

Shared Access 2010 database is in an inconsistent state

I have a shared accde file on a network drive. Occasionally we will have an inconsistent state problem. The error message appears below. It seems to be associated with network connection interruptions for even one user. We have an example when a user unplugged the Ethernet and switched automatically to wireless and other examples where users have left the database open overnight, perhaps when a machine hibernates.
Once this happens the one user cannot work and no one can open the accde file. Other users who have the database open can continue to work.
After the problem occurs it remains until everyone closes the database. At that time it completes whatever recovery it requires and all users can get back in.
This was disruptive when we had six users in one room. Now we have 17 in two cities and a few work-from-home users. It's becoming intolerable.
The obvious answer is to move away from Access. We're working on it but it's a long way off. In the mean time I would appreciate any advice.
Is there a way to prevent the problem entirely?
Is there a VBA way to detect the problem in the instances that are not showing the error message?
Is there something I'm not thinking of?
What would you do?
Error message:
Microsoft Access has detected that this database is in an inconsistent state, and will attempt to recover the database. During this process, a backup copy of the database will be made and all recovered objects will be placed in a new database. Access with then open the new database. The names of objects that were not successfully recovered will be logged in the "Recovery Error" table.
The solution that Microsoft gives is Splitting the database, which just means to put the data elements on a shared server, and everyone has their own copy of the front end.
This might cause problems if that front end needs to be updated (e.g. additional forms). Details here:
http://answers.microsoft.com/en-us/office/forum/office_2007-access/microsoft-office-has-detected-that-this-database/3fb41c70-f7ba-41dd-a847-e62203071466?auth=1
Check the row count in the tables, the tables most likely have large amounts of data creating latency on the read and write queries, causing the locking.
Archive older data and keep the database small and neat, perhaps create referenced databases for archived information
I gather that your MS Access database is getting corrupt when up put it on a shared drive. A Microsoft Access database may get corrupt when in a multi- user environment. Here are the workaround that you can use in order to fix it.
Step 1: Run Command Prompt as Administrator
Click on the Windows icon and type Command Prompt. Then right-click on the Command Prompt and choose Run as administrator option.
Step 2: Execute Compact and Repair Database Command
In the command prompt window, type the following command and then press ‘Enter’.
msaccess <database file name> /compact
In the command, replace <database filename> with database path. For instance,
msaccess "C:\Program Files\Reports.mdb" /compact
This will start the process to compact and repair the faulty Access database file.
Otherwise, You can check out this thread for an alternative solution : https://dba.stackexchange.com/questions/71906/ms-access-mdb-ldb-database-corrupted/171275#171275

Cpanel doesnt show database but it does exist

I have a problem with Cpanel, or atleast with my database, because i cant see my database trough either cpanel,mysql databases or phpmyadmin but when i tried to run a import sql script it states that the database exists. How can i access my database, i have heard some databasemapping resets on cpanel level but the problem is that i cant access the server on any way(only my site via FTP ofcourse).
It looks like i dont have permission, also my firstly created (head mysql account) is gone, or atleast i cant login with the same credentials as before. Whenever i try to add an mysql user it says completed(user created succesfully) but when looking at all users there aren't any users stated.
Sounds strange doesn't it?
I hope someone knows the answer, i need the database back.
You can use Adminer for importing and exporting data via ftp. Please try.

jBASE 4.1 Database Noobster Questions

I am a software developer with devlopment experience in C#, C++ .Net alongwith SQL Server 2005/08, Oracle and mysql. But somehow i dont get jBASE to work at Windows XP SP3 machine.
My goal is setup user accounts, create database on a JBASE ainstallation, authenticate and backup/restore few table via a C++ program. And i dont need to do it with builtin backup/restore tools of jBASE.
I am able to install jBASe 4.1 aling with all its accessories on my WINXPSP3 machine. I was able to run the jSlimserver and TEMENOUS server along with licnesing server. I was able to add the license key as well. But after that what i was supposed to do? i have no idea about it.
The docs and online help doesnt answer a simple question of how to create a database! The google search results from the jbase site all go to the 404 Pages!
Can a jBASE expert guide to the following steps:
Create a jBASE database.
Create users
Authenticate via those users
Connect to database
Create tables and insert data.
Connect via a C++ or C# program to connect to jBASE DB and backup/restore tables.
I know that this is too much too ask but i dont get to get the JBASE system. I cant get it to work on my System somehow. Btw, jdc and jexloree doesnt seem to do anything. I have checked that enironmental variables for jBASE are setup correctly and i have verified them. There are no extra JRE or JDK installations on my system. Besides all that, only licensing client, slim server and temenous server seem to run and listen for connections and no other execuatable ever seems to work.
A simple tutorial to achieve the objective will be highly appreciated. Also if anyone can point out the mistake that i have done or anything i might need to check, then please do so. I will be highly encouraged and obliged.
Thanks
Steve
I hope this will help, if you have not already found a why to do this.
Setup jBase User and Database
Create a Security Group called
'Jbase' or what every you want to
call it
Add a User to this group. I would
recommend adding your administrator
user to it as well
Create a folder in you file system
to save the database information
into
Assign the 'Jbase' Security group to
the folder, and give it "Full"
read/write/execute access.
Creating the database:
Make sure the current users you
are logged on with is the 'Jbase'
security group.
go to the command prompt, and CD
to the folder you create to store
the database
run the jShell 'jsh' from that
location
use CREATE-FILE to create the
files/tables you want to store your
information in.
Inserting data:
There are several ways to enter data. You can use ED, your can your programming environment, or you can create a quick MultiValue/jBase compiled server script to ask for the data and write them to a file/table.

Why am I getting errors after renaming my database in CakePHP?

After I uploaded my application created using cakephp, I found out that I had to rename the database. I renamed my database accordingly and changed the settings in the database.php file in the "config" folder. But my application is still not running.
I am being shown this error message
"Missing Database table"
"Error: Database table tbl_topics for model Topic was not found."
I have double checked the existence of tbl_topics in the database (it is there in the database) but the application says "table not found"
what might be the problem, please help me out...
Make sure the host/user/pass that you've set-up in the config.php file have access to that database and table
You could also try running cake schema generate --dry which will spit back any problems with the connection that you might be having
Also have a look in your app/tmp/logs for some extra information on the problems you are experiencing
Take the username and password you are using for cakephp and it's db connection and connect to the database from the command line. I'm presuming you are using a unix-type system and mysql?
mysql --user=user_name --password=your_password db_name
...and then try to run a simple select:
SELECT * FROM tbl_topics
If you get an error there, it will at least identify that it is a low level db problem and the likely solution is that you need to grant permissions to that username to select from that database. Your current access levels for that user is probably granting access to the db under the old name.
You have probably uploaded your cache files as well. Make sure you delete all the files in /app/tmp/cache/*
Warning: Don't delete the folders, files only!
Also, make sure your tmp folder and all the subfolders are world-writable.
One last thought would be to check your model cache. I don't know why that would impact you with respect to connecting, but it's worth taking a look in app/tmp/cache.
:-)
finally got it.... :-D
I forgot to assign the user access to my application's database on main server. After assigning the permissions all went fine.
Anyways thank you all for your valuable answers... It helped me gain some additional knowledge about cakephp.

Resources