Examples:http://www.oraclefaq.net/2007/03/09/expdp-and-impdp-directory/
Login into oracle from command promt:
C:\Users\anand>set oracle_sid=o11gr202
C:\Users\anand>sqlplus system/manager
SQL*Plus: Release 11.2.0.2.0 Production on Thu Jun 28 12:04:30 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Create directory:
Note: For export/import please not that directory should exists in windows file system so that it will not through error.
SQL> create or replace directory SampleDump as 'D:\oracle\SampleDump';
Directory created.
Grant read,write for the directory.
SQL> grant read,write on directory SampleDump to public;
Grant succeeded.
For import:
Note: exit from oracle before running import/export commands.
Ex.
SQL> impdp system/manager directory=SampleDump dumpfile=sample78.dp.dmp logfil
=sample78.dp.log full=y;
SP2-0734: unknown command beginning "impdp sys..." - rest of line ignored.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 6
bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Users\anand>impdp system/manager directory=SampleDump dumpfile=sample78.
p.dmp logfile=sample78.dp.log full=y;
For Export:
SQL> expdp system/manager directory=SampleDump dumpfile=sample78.dp.dmp logfil
=sample78.dp.log full=y;
Also if you can have any other directory created where you can keep your logfiles.The Method to create the directory is similar as mentoned above and u can specify that your logfiles should be placed in that directory by using following syntax
#expdp system/manager directory=SampleDump dumpfile=sample78.p.dmp logfile=log_dir:
sample78.dp.log full=y;
No comments:
Post a Comment