歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> Linux 中 Oracle dmp 文件導入導出,oracledmp

Linux 中 Oracle dmp 文件導入導出,oracledmp

日期:2017/3/6 9:34:53   编辑:學習Linux

Linux 中 Oracle dmp 文件導入導出,oracledmp


Linux 中 Oracle dmp 文件導入導出,oracledmp


a. 用戶名 system 密碼 manager 導出到D:/daochu.dmp中

exp system/manager@SID file=d:/daochu.dmp full=y 

b. 將數據庫中 system 用戶與 sys 用戶的表導出

exp system/manager@SID file=d:/daochu.dmp owner=(system,sys) 

c. 將數據庫中的表 inner_notify、notify_staff_relat導出

exp aichannel/aichannel@SID file= d:/data/newsmgnt.dmp tables=(inner_notify,notify_staff_relat) 

d. 將數據庫中的表 table1 中的字段 filed1 以"00"打頭的數據導出

exp system/manager@SID file=d:/daochu.dmp tables=(table1) query=/" where filed1 like '00%'/" 

對於壓縮,既用 winzip 把 dmp 文件可以很好的壓縮,也可以在上面命令後面 加上 compress=y 來實現。

導出 DMP文件適用於,大型數據庫完整遷移,遷移前後的數據庫字符集要求比較嚴格,對CLOB字段支持不太友好。

對於小數據的導出其實用 PLSQL 能做的更好,更快,導出的SQL也很直觀。

對於本機安裝了oracle 客戶端,可以直接將 DMP 文件導出到本地,如果是沒有安裝,導出的文件是在linux 服務器上面。

需要用遠程工具【WINSCp,PINTY.....】連接下載下來。

e. 將 D:/daochu.dmp 中的數據導入 TEST數據庫中。

imp system/manager@SID file=d:/daochu.dmp 
imp aichannel/aichannel@HUST full=y file=file= d:/data/newsmgnt.dmp ignore=y 

上面可能有點問題,因為有的表已經存在,然後它就報錯,對該表就不進行導入,後面添加 ignore=y。

f. 將 d:/daochu.dmp中的表table1 導入

imp system/manager@SID file=d:/daochu.dmp tables=(table1)

http://xxxxxx/Linuxjc/1137522.html TechArticle

Copyright © Linux教程網 All Rights Reserved