PRAGMA integrity_check

linum

Active Member
Licensed User
Can somebody please post a sample on how to use this SQLlite (PRAGMA integrity_check) command?

I have an SQLlite database that appears to be corrupt (our network connection went down while I was writing to the database and now I can't open it).

Please Help...
 

linum

Active Member
Licensed User
Ok, I figured it out. I downloaded a command line tool from here:

http://www.sqlite.org/sqlite-3_5_6.zip

Then I used the following command to inspect my database:

B4X:
sqlite3.exe your_database.db
pragma integrity_check;


if the database turns out to be corrupt then you can try fixing it with the following command:

B4X:
d:\sqlite3.exe d:\your_database.db .dump | d:\sqlite3.exe d:\new_database.db


Hope this helps somebody else...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…