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ù)庫中的表table1 、table2導(dǎo)出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
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)出,對(duì)于壓縮我不太在意,用winzip把dmp文件可以很好的壓縮。
不過在上面命令后面 加上 compress=y 就可以了
二、數(shù)據(jù)的導(dǎo)入
1 將D:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST數(shù)據(jù)庫中。
imp system/manager@TEST file=d:\daochu.dmp
上面可能有點(diǎn)問題,因?yàn)橛械谋硪呀?jīng)存在,然后它就報(bào)錯(cuò),對(duì)該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2 將d:\daochu.dmp中的表table1 導(dǎo)入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
注意:
你要有足夠的權(quán)限,權(quán)限不夠它會(huì)提示你。
數(shù)據(jù)庫時(shí)可以連上的??梢杂胻nsping TEST 來獲得數(shù)據(jù)庫TEST能否連上。
posted on 2007-04-17 09:27 Jerry Zhang 閱讀(124) 評(píng)論(0) 編輯 收藏