oracle 备份导出,oracle 怎么备份或导入导出表
exp/imp
下面介紹的是導(dǎo)入導(dǎo)出的實例,向?qū)雽?dǎo)出看實例基本上就可以完成,因為導(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)出,對于壓縮我不太在意,用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
上面可能有點問題,因為有的表已經(jīng)存在,然后它就報錯,對該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2 將d:\daochu.dmp中的表table1 導(dǎo)入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
基本上上面的導(dǎo)入導(dǎo)出夠用了。
下面介紹的是導(dǎo)入導(dǎo)出的實例,向?qū)雽?dǎo)出看實例基本上就可以完成,因為導(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)出,對于壓縮我不太在意,用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
上面可能有點問題,因為有的表已經(jīng)存在,然后它就報錯,對該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2 將d:\daochu.dmp中的表table1 導(dǎo)入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
基本上上面的導(dǎo)入導(dǎo)出夠用了。
(導(dǎo)出服務(wù)器的請使用exp exps/exps123@10.7.1.23:1521/expsdb file=d:\daochu123.dmp owner=(exps))
不同用戶之間導(dǎo)入需添加? ?fromuser=fcs touser=fcsdb
總結(jié)
以上是生活随笔為你收集整理的oracle 备份导出,oracle 怎么备份或导入导出表的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最大流 Ford-Fulkerson 算
- 下一篇: 北大学神恽之玮斩获西蒙斯学者奖:18岁满