Oracle 10+ Import and Export

From WickyWiki
Revision as of 07:26, 5 July 2013 by Admin (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In Oracle 10 you can in addition to the old imp/exp use the Oracle datapump (impdb.exe and expdp.exe) these tools create a job on the Oracle Server to export or import data. The old import is also available with oracle 10 but use datapump if you can. You will need to create a Oracle directory for the dump-file. The datapump can also be initiated from within an Oracle pl/sql session by starting a datapump job.

Create Oracle directory:

connect system
create or replace directory dir1 as 'C:/TEMP';
grant read, write on directory dir1 to user1;

Export command-line:

expdp system/ password@sid dumpfile=user1.dmp schemas=user1 directory=dir1 tables=table1%

Import command-line:

impdp system/password  dumpfile=user1.dmp directory=dir1

Note: you can ‘remap’ tablespaces instead of needing to create them as they appear in the export file.

Get help:

impdp HELP=Y
expdp HELP=Y