First create the Export directory:--More detailed commands and parameters, see: http://blog.csdn.net/haibusuanyun/article/details/12584727
bys@ bys3>create directory DIR_DP as '/home/oracle/';
Directory created.
bys@ bys3>grant read,write on directory DIR_DP to public;
Grant succeeded.
Col Privilege for A15
Col Directory_name for A15
Col Directory_path for A30
SELECT privilege, Directory_name, Directory_path from User_tab_privs T, all_directories D WHERE t.table_name (+) = D.direc Tory_name ORDER by 2, 1; -You can use this statement to verify the configuration.
#######################################################
To export a table test for a user:Only bys users The following table defines not exporting data:
EXPDP bys/bys tables=bys.test1 DIRECTORY=DIR_DP dumpfile=bys1.dmp logfile=bys1.log
Only bys user data does not export the table definition:
EXPDP bys/bys tables=bys.test1 DIRECTORY=DIR_DP dumpfile=bys2.dmp logfile=bys2.log
Export Bys all objects under the user--content not write, default is all.
EXPDP bys/bys tables=bys.test1 DIRECTORY=DIR_DP file=bys3.dmp logfile=bys3.log
####################################################
To export an entire user under an object test:To export the metadata for an object under an entire user:
EXPDP bys/bys schemas=bys DIRECTORY=DIR_DP file=bys4.dmp logfile=bys4.log
Exporting objects under an entire user
EXPDP bys/bys schemas=bys DIRECTORY=DIR_DP file=bys5.dmp logfile=bys5.log
####################################################
To Import a table test for a user:1. Delete the entire table,
drop table Test1 Purge;
Import entire table with data:
IMPDP bys/bys tables=test1 DIRECTORY=DIR_DP dumpfile=bys3.dmp logfile=impdp3.log
Import Table Definition
IMPDP bys/bys tables=test1 DIRECTORY=DIR_DP dumpfile=bys3.dmp logfile=impdp2.log
To import data from a table:
IMPDP bys/bys tables=test1 DIRECTORY=DIR_DP dumpfile=bys3.dmp logfile=impdp1.log
Import All Object tests under User:Delete all tables under bys user-do not delete user
bys@ Bys3>select * from Cat;
No rows selected
##
Import only the metadata for the object under the user
IMPDP bys/bys schemas=bys DIRECTORY=DIR_DP file=bys5.dmp logfile=bys6.log
Import only the data of the object under the user
IMPDP bys/bys schemas=bys DIRECTORY=DIR_DP file=bys5.dmp logfile=bys7.log
Import all objects and data under User:--not write content=, default is all
IMPDP bys/bys schemas=bys DIRECTORY=DIR_DP file=bys5.dmp logfile=bys8.log
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.