共計(jì) 1527 個(gè)字符,預(yù)計(jì)需要花費(fèi) 4 分鐘才能閱讀完成。
這篇文章主要介紹 Oracle 中 exp 和 imp 怎么用,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
Oracle 數(shù)據(jù)庫導(dǎo)入導(dǎo)出方法:
數(shù)據(jù)導(dǎo)出:
1. 將數(shù)據(jù)庫 TEST 完全導(dǎo)出,用戶名 system 密碼 manager 導(dǎo)出到 D:\daochu.dmp 中
exp system/manager@TEST file=d:\daochu.dmp full=y
2. 將數(shù)據(jù)庫中 system 用戶與 sys 用戶的表導(dǎo)出
exp system/manager@TEST file=d:\daochu.dmp owner=system,sys
3. 將數(shù)據(jù)庫中的表 inner_notify、notify_staff_relat 導(dǎo)出
exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
4. 將數(shù)據(jù)庫中的表 table1 中的字段 filed1 以 00 打頭的數(shù)據(jù)導(dǎo)出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1)query=\ where filed1 like 00% \
上面是常用的導(dǎo)出,對于壓縮,既用 winzip 把 dmp 文件可以很好的壓縮。
也可以在上面命令后面加上 compress= y 來實(shí)現(xiàn)。
數(shù)據(jù)的導(dǎo)入:
1. 將 D:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST 數(shù)據(jù)庫中。
imp system/manager@TEST file=d:\daochu.dmp
imp aichannel/aichannel@HUST full=y file= d:\data\newsmgnt.dmp ignore=y
上面可能有點(diǎn)問題,因?yàn)橛械谋硪呀?jīng)存在,然后它就報(bào)錯(cuò),對該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2. 將 d:\daochu.dmp 中的表 table1 導(dǎo)入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
2.plsql:
數(shù)據(jù)導(dǎo)出:
TOOLS-Export user objects(用戶對象)
TOOLS-Export tables(表)
數(shù)據(jù)的導(dǎo)入:
TOOLS-Import tables
Oracle Import(表)SQL Inserts(用戶對象)
也可以將用戶對象的語句拷貝出來,粘貼到 Command Window 這樣的好處是可以看到執(zhí)行的過程。
EXP-00091: Exporting questionable statistics.
SQL select * from v$nls_parameters where parameter= NLS_CHARACTERSET
PARAMETER VALUE
——————————- —————————————————————————————————
NLS_CHARACTERSET ZHS16GBK
SQL host
lpding- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
lpding- exp scott/scott file=/oracle/exp/scott_emp.dmp log scott_emp.log tables=emp
以上是“Oracle 中 exp 和 imp 怎么用”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注丸趣 TV 行業(yè)資訊頻道!