Sunday, June 26, 2011

Importing a Datapump export into Oracle with IMPDP

I never had to remember the command-line options for the old imp utility (because it prompted you for the info it needed), but with impdp, you need to know what to specify. Here is my simple example that works for me to import a Datapump export file:

impdp user/password schemas=mySchema dumpfile=myfile.dpdmp logfile=mylog.log

The schema parameter specifies which schema from the file to import.

The dumpfile parameter specifies the name of the datapump export file to import. The catch here is that the dump file location defaults to a default directory on the server (something like this):

c:\oracle\Administrator\admin\orcl\dpdump

You can change this path, but you have to create the directory in Oracle and specify it with a Directory Parameter. You have to create a directory in Oracle with something like this:

create directory MyExportDir as 'c:\exports';

Here is the detailed info for impdp on the Oracle site.

No comments: