Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Anyone have any tips on recovering a corrupt SQLite 3 database?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Anyone have any tips on recovering a corrupt SQLite 3 database?

GamerTech24GamerTech24 Member
edited August 2017 in Requests

I have a SQLite 3 database, it is from the "classic" Windows Skype, which stores all it's conversation history and chat logs, previous conference call/group chats, and more, all in this one database file called "main.db". It is standard SQLite 3, and mine specifically is pretty large as I use it as my main communications program, so something like this happening to me is not really ideal.
In the meantime I am using the Windows 10 version which was able to pull my contacts and some recent chat history from the corrupt DB so that works for now.

It has since gotten corrupt, and is unable to be read. I'm not sure what caused it, but I would be randomly signed out and when I tried to log back in again I would get a "database error, please restart" message, and I should have immediately stopped there but I kept signing in and eventually when I logged back in for however many times after it kept kicking me out everything was all messed up, contacts, chat history, everything.
It has about 2 years worth of chat logs and other conversation history I'd hate to loose and I have no recent backups of. Skype itself has a built in repair function and it looks like it's repaired the database itself before, but today when it tried to repair the database (which I later found out it was running through every time I logged in after being signed out with the error message) it was "messed up" like I described above.

I contacted their support, they informed me of the main.db SQLite3 file and that is where everything is stored, and that mine must be corrupt and they can't assist me any further. Certain stuff is stored in the "cloud", however that is only up to 30 days worth of calls, chat logs, and everything else. I can't retrieve anything past that (which would be before this summer started).

It left the last unfixed corrupt database file as main.corrupt, so I took this and tried to work with it,
Here are the messages I'm getting when trying to read it in various applications,
"Database image is malformed",
and when trying to do "sqlite3 main.db "PRAGMA integrity_check""
I get several messages looking like this,

Does anyone know of any basic commands, etc I can do to attempt to recover it? I've also searched Google and haven't had much luck. There are programs online that claim they can fix it for like $100, but I'm not entirely sure I want to spend that much money on something that may not work.

I've tried "$ sqlite3 main.corrupt ".dump" | sqlite3 main_repaired.db" but that hasn't had much success either.

I've been looking into it myself, I am not entirely sure of the format of these databases although it seems others have documented it online as well. There is even a program called "Skyperious" which allows you to load up the database and read it, however I just get the usual "Database image is malformed", and I tried using it's own repair function but haven't had much luck, I'll keep trying though

Comments

  • Keep a copy of the original SQLite file before you try repairing.

    Error code 11 indicates those database pages are corrupt. You can get more granular info with PRAGMA cell_size_check=ON.

    There's https://sqlite.org/sqlanalyze.html but don't know how much it will help. The SQLite author also does paid support (https://sqlite.org/support.html)

  • There's something in the sqlite FAQ saying they don't know of any existing tools for this, though that sounds pessimistic. I've done this type of recovery with other databases in the past and it's been possible to get most of the data out. It's the same basic idea as recovering crashed file systems. Search in the docs and sqlite3 code for recognizable data structures, then scan the file for them, etc. That said, it will likely take some determination and coding skills.

  • You can recover your corrupt SQLite 3 database file using Professional SQLite Forensic Explorer Software. The Tool supports all Windows versions and recovers data from your skype database file such as chats logs, Contact details. View the recovered data of damaged main.db within the utility and export them to another format to save the information. You can visit this link to know about SQLite Forensic Explorer : http://www.acquireforensics.com/products/sqlite-forensic-explorer/

  • @RobinsanShaw said:
    You can recover your corrupt SQLite 3 database file using Professional SQLite Forensic Explorer Software. The Tool supports all Windows versions and recovers data from your skype database file such as chats logs, Contact details. View the recovered data of damaged main.db within the utility and export them to another format to save the information. You can visit this link to know about SQLite Forensic Explorer : http://www.acquireforensics.com/products/sqlite-forensic-explorer/

    Thanks, I'll give it a try, also saw your reply to my Microsoft forum article too https://answers.microsoft.com/en-us/skype/forum/skype_windesk-skype_messms/recover-corrupt-skype-database-file/12a0b47b-562c-441c-86d4-18bc24c9aa97

  • ya he knows how to search google and spam

    Thanked by 1ricardo
  • Not so much spam when it's a credible solution to someone's query... that's what search engines (and forums are for)

    Only really an issue when the thread was set up to play out like that ... :)

    Thanked by 1RobinsanShaw
Sign In or Register to comment.