I want to migrate a database from Btrieve (PSQL) to Oracle. For this i'll first convert my source db to CSV then i'll convert exported CSV to target db. I'm not sure but as far as i know, it is not possible to get schema retained while exporting a DB to CSV.
Asked
Active
Viewed 80 times
0
-
How would you export `METADATA` in csv? – Lalit Kumar B Apr 02 '15 at 09:36
-
that's what i'm asking, how would i export `METADATA`? – Anubhav Apr 02 '15 at 09:42
-
i don't know about Btrieve, but in Oracle I would do a FULL DATABASE EXPORT using EXPDP, and then IMPDP to import it. – Lalit Kumar B Apr 02 '15 at 09:55
-
which target DB you usually migrate for? – Anubhav Apr 02 '15 at 10:07
1 Answers
0
It retains its schema insofar as it can tell you the column names, and column order. And from values, you can derive the column type (for example lots of unquoted numbers suggest an int or decimal type).
But it doesn't maintain useful things like primary keys, foreign keys, constraints, defaults.
You can try getting and copying a table schema from the source db, then pasting and running it against to your new db and see if it works (with some minor tweaks). Or you could use a tool like liquibase which should be able to help here.

Neil McGuigan
- 46,580
- 12
- 123
- 152