expdp: sql的命令只執行一次,以后不用再執行
mkdir /home/oracle/backup
chmod 777 /home/oracle/backup
SQL> create directory EXPDIR as '/home/oracle/backup';
SQL> grant read,write on directory EXPDIR to DEEPRADAR;
SQL> execute dbms_metadata_util.load_stylesheets;
expdp system/system密碼@SID schemas=xxx DUMPFILE=xxx.dmp DIRECTORY=EXPDIR logfile=expdp.log JOB_NAME=full
impdp: sql的命令只執行一次,以后不用再執行
如果用戶名存在:drop user username cascade
SQL> CREATE ROLE ROLE_ORACLE;
SQL> create directory IMPDIR as '/home/oracle/backup';
SQL> grant read,write on directory IMPDIR to sys;
impdp system/system密碼 directory=IMPDIR dumpfile=xxx.dmp logfile=impdp.log