log in as sys
create a directory object pointing to the direktory where the backup set is to be created
Create directory expdp_dir as 'C:\Oracle\backupset';
grant the nessecary priviliges to the system user
Grant read,write on directory expdp_dir to system;
finally from the command prompt
expdp system/manager DIRECTORY=expdp_dir DUMPFILE=expfull_DB.dmp FULL=y LOGFILE=expfull_DB.log
thats it!, two files expfull_DB.dmp and expfull_DB.log in the c:\oracle\backupset directory.
if you only want to backup a schema then use the following from the command prompt
C:\>expdp scott/toger DIRECTORY=expdp_dir DUMPFILE=scott_exp.dmp SCHEMAS=scott LOGFILE=scott_imp.log
Importing a backup set i equally simple
from the command prompt
impdp system/manager DIRECTORY=expdp_dir DUMPFILE=expfull_DB.dmp FULL=y LOGFILE=impfull_DB.log
and for a single schema
impdp scott/tiger DIRECTORY=expdp_dir DUMPFILE=scott_exp.dmp
SCHEMAS=scott LOGFILE=scott_imp.log
7 comments:
Thank you very much. This commands were really useful!!!
Thanks for the straight forward how-to
I tried your commands but for the last one(i.e the expdp), I had the following error:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name EXPDP_DIR is invalid
whereas expdp_dir was created sucessfully.
We have a customer with a 2.5TB database - to evaluate the work we need to do - we would like to see a portion of that database (say 20%) of the complete database - all tables? Can this be easily done?
You must make sure that the directory already exists.
If using 'C:\Oracle\backupset', you must create that directory in the file system first.
Thanks a lot!
Simple, fast, straight and direct to the point!!
i did it and it worked....had to manually create the directory though
Post a Comment