Re: [sqlite] SQLite DB Structure
Firstly I'm not an SQLite expert but, now you know that, I would guess SQLite marks deleted records waiting until some clean-up process removes them and re-writes the active data. I would therefore look for some bit that is set. Try setting up a new database, adding records - taking a copy, then deleting the records and then compare the two images. That should point you to where SQLIte is tagging records. Then you go back to your target database and 'unset' the deletion flags, now you know where SQL puts them. You should then be able to see the deleted records again. -- View this message in context: http://www.nabble.com/SQLite-DB-Structure-tp25990484p26013692.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite DB Structure
Regarding: "I NEED HELP! I have SQLite3 DB (contacts from iPhone), it contains 1 record, but when I open it with NOTEPAD.EXE, I see more than 1 record. I need to repair all records from it" С уважением, I received your db (via private email) and the good news is that the PRAGMA INTEGRITY_CHECK reports that it is a healthy database. The *bad* news is that I suspect the data you are looking for was deleted From the database point of view, at bottom are the tables and the number of rows in each table. I can provide you a full dump of these records and schema, but I suspect that's not what you are seeking. I know of no utility to help you seek out data from deleted records whose data may nonetheless be still present in the database file. Using something like NOTEPAD may actually be your best bet -- see what cyrilic strings you can find. Also, John's suggestion to contact the application's support dept (Apple?) may help. There's some great-looking documention on the sqlite file structure here: http://www.sqlite.org/fileformat.html but it's not for the faint-of-heart (i.e., not so easily digested). I'm reminded of my old "databank" wristwatch. When it's battery died, I joked that I had to go get a whole new set of friends. :-( 0 ABGroup 0 ABGroupChanges 0 ABGroupMembers 3 ABMultiValue 0 ABMultiValueEntry 8 ABMultiValueEntryKey 7 ABMultiValueLabel 3 ABPerson 0 ABPersonChanges 2 ABPersonMultiValueDeletes 3 ABPersonSearchKey 0 ABPhoneLastFour 0 ABRecent 3 ABStore 26 FirstSortSectionCount 29 LastSortSectionCount 16 _SqliteDatabaseProperties 2 sqlite_sequence ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite DB Structure
Sqlite doesn't delete data from the database the way you expect. It marks space as deleted and overwrites it later as needed. The "other records" are probably just deleted blocks. Unless the VACUUM is deleting the 1 record, it hasn't reduced the file size too much. If the database is ACTUALLY corrupt (big if) nobody can help you, even this user group. More likely would be user error, or a bad delete by whatever app used this database. I would contact the company that makes that app and see what they can tell you. John -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of 1120.free Sent: Wednesday, October 21, 2009 4:19 AM To: sqlite-users@sqlite.org Subject: [sqlite] SQLite DB Structure Hi. I'm from Belarus. Sorry for my English. I NEED HELP! I have SQLite3 DB (contacts from iPhone), it contains 1 record, but when I open it with NOTEPAD.EXE, I see more than 1 record. I need to repair all records from it. Maybe it help: when I use 'VACUUM' command file size decreases too much. I attached file that I need to repair. If you can, extract lost data from it, please. It's VERY IMPORTANT for me. I don't know who can help me except you. -- С уважением, 1120.free mailto:1120.f...@gmail.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite DB Structure
Hi. I'm from Belarus. Sorry for my English. I NEED HELP! I have SQLite3 DB (contacts from iPhone), it contains 1 record, but when I open it with NOTEPAD.EXE, I see more than 1 record. I need to repair all records from it. Maybe it help: when I use 'VACUUM' command file size decreases too much. I attached file that I need to repair. If you can, extract lost data from it, please. It's VERY IMPORTANT for me. I don't know who can help me except you. -- С уважением, 1120.free mailto:1120.f...@gmail.com___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite DB Structure
Hi. I'm from Belarus. Sorry for my English. I NEED HELP! I have SQLite3 DB (contacts from iPhone), it contains 1 record, but when I open it with NOTEPAD.EXE, I see more than 1 record. I need to repair all records from it. Maybe it help: when I use 'VACUUM' command file size decreases too much. I attached file that I need to repair. If you can, extract lost data from it, please. It's VERY IMPORTANT for me. I don't know who can help me except you. -- С уважением, 1120.free mailto:1120.f...@gmail.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users