EXP、EXPDP導出和IMP、IMPDP導入語句


當我們沒有遠程服務器系統操作權限,而只有遠程數據庫操作權限的時候,無法將DMP文件copy在服務器目錄下,只能使用EXP和IMP操作。

EXP全庫導出語句:

exp username/password@ip:port/servername file="E:\dmppath.dmp" full=y ignore=y;

IMP全庫導入語句:

imp username/password@ip:port/servername file="E:\dmppath.dmp" full=y ignore=y;

IMP單表導入語句:

imp  username/password@ip:port/servername file="E:\dmppath.dmp" tables=(emp) ignore=y;(如果是多張表可以用逗號隔開)

IMP只導入表結構(包含視圖、函數,不含觸發器和存儲過程):

imp username/password@ip:port/servername file="E:\dmppath.dmp" fromuser=from_username touser=to_username rows=n;

IMP只導入數據:

imp username/password@ip:port/servername file="E:\dmppath.dmp" fromuser=c##from_username touser=to_username statistics=none  ignore=y;

IMPDP數據泵導入:

impdp tzxmspsx/Tzxmsp123_hl@61.185.238.209:1521/tzxmsppub  schemas=tzxmspsx directory=XSDDIR  dumpfile=E:\TZXMSPDF1129.dmp logfile=exp.log

IMPDP更改表空間和用戶導入:

impdp  username/password@ip:port/servername directory=DATA_DIR dumpfile=example.DMP REMAP_SCHEMA=olduser:newuser remap_tablespace=oldtablespace:newtablespace,EXAMPLE_TEMP:newtablespace_temp

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM