Friday, January 18, 2008

oracle import/export dumps

An easy way to port data from one oracle database to another is import/export (bundled with oracle client software). Open a dos-box/shell and type

exp user/pw@tnsname file=export_data.dmp tables=table1,table2,table3

Import the data again with:

imp user/pw@tnsname file=export_data.dmp fromuser=olduser touser=newuser

Remind:
  • an export made by an user with dba-rights can't be imported by a user without dba-rights. Export the data with a user without dba-rights
  • You can check a dump-file on having been exported by a dba-user by opening it in Textpath. On the second line the first character is a U for User or D for DBA.
  • an oracle 9 client cannot export data from an oracle 10 database
  • If importing geodata from a 9 to a 10 database, use SDO_MIGRATE.TO_CURRENT(tabname,column_name) to convert the geometries.

No comments: