標籤:
a. 使用者名稱 system 密碼 manager 匯出到D:/daochu.dmp中
exp system/[email protected] file=d:/daochu.dmp full=y
b. 將資料庫中 system 使用者與 sys 使用者的表匯出
exp system/[email protected] file=d:/daochu.dmp owner=(system,sys)
c. 將資料庫中的表 inner_notify、notify_staff_relat匯出
exp aichannel/[email protected] file= d:/data/newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
d. 將資料庫中的表 table1 中的欄位 filed1 以"00"打頭的資料匯出
exp system/[email protected] 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/[email protected] file=d:/daochu.dmp imp aichannel/[email protected] full=y file=file= d:/data/newsmgnt.dmp ignore=y
上面可能有點問題,因為有的表已經存在,然後它就報錯,對該表就不進行匯入,後面添加 ignore=y。
f. 將 d:/daochu.dmp中的表table1 匯入
imp system/[email protected] file=d:/daochu.dmp tables=(table1)
Linux 中 Oracle dmp 檔案匯入匯出