欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux下Oracle如何導(dǎo)入導(dǎo)出dmp文件詳解

 更新時(shí)間:2017年07月07日 11:54:06   作者:Orson  
這篇文章主要給大家介紹了關(guān)于在Linux下Oracle如何導(dǎo)入導(dǎo)出dmp文件的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起看看吧。

前言

對(duì)于本機(jī)安裝了oracle 客戶端,下述命令都可以在 dos 執(zhí)行,當(dāng)然 dmp 文件導(dǎo)出在本地。

但在實(shí)際研發(fā)時(shí),沒人愿意在本機(jī)上安裝龐大的 oracle 軟件,這時(shí)你需要使用 Xshell/puTTY..

遠(yuǎn)程工具連接到 Linux 進(jìn)行操作,進(jìn)行 Linux 上 dmp 文件的導(dǎo)入導(dǎo)出。

正文

a. 將用戶 system 用戶表導(dǎo)出到指定路徑 D 盤

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

b. 將用戶 system 與 sys 用戶的表導(dǎo)出到指定路徑 D 盤

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

c. 將用戶 system 中的表 table_A、table_B 導(dǎo)出到指定路徑 D 盤

exp system/password@SID file= d:/daochu.dmp tables=(table_A,table_B) 

d. 將用戶 system 中的表 table1 中的字段 filed1 以"00"打頭的數(shù)據(jù)導(dǎo)出

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

   對(duì)于壓縮可以用 winzip 將 dmp 文件進(jìn)行壓縮,也可以在上面命令后面 加上 compress=y 來實(shí)現(xiàn)。

   導(dǎo)出 DMP文件適用于大型數(shù)據(jù)庫完整遷移,對(duì)遷移前后兩者服務(wù)器數(shù)據(jù)庫字符集要求一致,且對(duì)CLOB字段支持不太友好。

   對(duì)于小數(shù)據(jù)的導(dǎo)出其實(shí)用 PLSQL 能做的更好,更快,導(dǎo)出的SQL也很直觀。

e. 將 D:/daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST 數(shù)據(jù)庫中。

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

   上面命令如果出現(xiàn)問題,假設(shè)有的表已存在,對(duì)該表可以不進(jìn)行導(dǎo)入,后面添加 ignore=y 。

f. 將 d:/daochu.dmp中的表table1 導(dǎo)入

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

總結(jié)

以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流,謝謝大家對(duì)腳本之家的支持。

相關(guān)文章

最新評(píng)論