使用前提
數據庫
DIRECTORY操做spa
select * from dba_directories;
create DIRECTORY hndir as 'D:\oracldir\hndata';
drop directory hndir;
EXPDP(導出文件)code
create DIRECTORY hndir as 'D:\oracldir\hndata';
grant read,write on DIRECTORY hndir to SYS;
expdp HNQY/HNQY@ORCL DIRECTORY=hndir DUMPFILE=hnqy.dmp FULL=y;
expdp HNQY/HNQY@ORCL DIRECTORY=hndir TABLES=t_card,t_user dumpfile=hnqy.dmp;
IMPDP(導入數據)blog
create DIRECTORY hndir as 'D:\oracldir\hndata';
grant read,write on DIRECTORY hndir to SYS;
impdp HNQY/HNQY@ORCL DIRECTORY=hndir DUMPFILE=hnqy.dmp;
impdp HNQY/HNQY@ORCL DIRECTORY=hndir TABLES=t_card,t_user dumpfile=hnqy.dmp;
impdp HNQY/HNQY@ORCL DIRECTORY=hndir DUMPFILE=hnqy.dmp REMAP_TABLESPACE=ASSETS:HNQY_DATA REMAP_SCHEMA=SCOTT:HNQY ;
impdp HNQY/HNQY@ORCL DIRECTORY=hndir TABLES=SCOTT.t_card,SCOTT.t_user dumpfile=hnqy.dmp REMAP_TABLESPACE=ASSETS:HNQY_DATA REMAP_SCHEMA=SCOTT:HNQY;