sqlite2 path/to/olddb .dump > backupfile
sqlite3 path/to/newdb < backupfile
How to convert an sqlite 2 database into an sqlite 3 database
Posted in general.
– January 14, 2006
8 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Hello!
I tried this way and it seems to work good, but for a unicode database table fields !! I think that part didn’t work right. So, any Ideas to solve such problem?
Thanks.
Where can I get sqlite2? It doesn’t appear to come with the version distro, at least not for Gentoo.
Like, you know, the internet man.
Sometimes, some distros call sqlite to sqlite2. Try that.
Oh, and I think you can do something like this:
sqlite path/to/olddb .dump | sqlite3 path/to/newdb
Hallo @lazloman
try this
http://www.sqlite.org/sqlite-2_8_17.zip
http://www.sqlite.org/sqlitedll-2_8_17.zip
I search in Internet and see that all asked how to convert sqlite 2 to sqlite 3. I need vise versa operation! Please do anybody knows how to convert sqlite 3 to sqlite 2? I use SQLite under Windows XP. Thank you.
Real Hike: just do the same, but swap sqlite2 to sqlite3:
sqlite3 path/to/olddb .dump > backupfile
sqlite2 path/to/newdb < backupfile
I tried this but I think the autoincrement in the primary key of the original database is causing an issue with the import.