不知道密码导出oracle数据库,Oracle数据库密码重置、导入导出库命令示例应用
重置辦法如下:打開(kāi)CMD命令提示符,然后輸入下面命令進(jìn)行重置:
輸入sqlplus /nolog,回車(chē)
SQL> conn /as sysdba
已連接;
SQL>alter user system identified by "123456"; ---(123456就是重置的密碼了)
SQL>alter user sys identified by "123456";
下面介紹的是導(dǎo)入導(dǎo)出的實(shí)例,向?qū)雽?dǎo)出看實(shí)例基本上就可以完成,因?yàn)閷?dǎo)入導(dǎo)出很簡(jiǎn)單。
數(shù)據(jù)導(dǎo)出:
1 將數(shù)據(jù)庫(kù)TEST完全導(dǎo)出,用戶(hù)名system 密碼manager 導(dǎo)出到D:\daochu.dmp中
exp system/[email?protected] file=d:\daochu.dmp full=y
2 將數(shù)據(jù)庫(kù)中system用戶(hù)與sys用戶(hù)的表導(dǎo)出
exp system/[email?protected] file=d:\daochu.dmp owner=(system,sys)
3 將數(shù)據(jù)庫(kù)中的表table1 、table2導(dǎo)出
exp system/[email?protected] file=d:\daochu.dmp tables=(table1,table2)
4 將數(shù)據(jù)庫(kù)中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導(dǎo)出
exp system/[email?protected] file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
上面是常用的導(dǎo)出,對(duì)于壓縮我不太在意,用winzip把dmp文件可以很好的壓縮。
不過(guò)在上面命令后面 加上 compress=y 就可以了
數(shù)據(jù)的導(dǎo)入
1 將D:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST數(shù)據(jù)庫(kù)中。
imp system/[email?protected] file=d:\daochu.dmp
上面可能有點(diǎn)問(wèn)題,因?yàn)橛械谋硪呀?jīng)存在,然后它就報(bào)錯(cuò),對(duì)該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2 將d:\daochu.dmp中的表table1 導(dǎo)入
imp system/[email?protected] file=d:\daochu.dmp tables=(table1)
基本上上面的導(dǎo)入導(dǎo)出夠用了。不少情況我是將表徹底刪除,然后導(dǎo)入。
數(shù)據(jù)導(dǎo)出:
exp hkb/[email?protected]_14 full=y file=c:\orabackup\hkbfull.dmp log=c:\orabackup\hkbfull.log;
導(dǎo)出注意事項(xiàng):導(dǎo)出的是當(dāng)前用戶(hù)的的數(shù)據(jù),當(dāng)前用戶(hù)如果有DBA的權(quán)限,則導(dǎo)出所有數(shù)據(jù)!
同名用戶(hù)之間的數(shù)據(jù)導(dǎo)入:
imp hkb/[email?protected] file=c:\orabackup\hkbfull.dmp log=c:\orabackup\hkbimp.log full=y
不同名之間的數(shù)據(jù)導(dǎo)入:
imp system/[email?protected] fromuser=hkb touser=hkb_new file=c:\orabackup\hkbfull.dmp
log=c:\orabackup\hkbimp.log;
這就是微學(xué)網(wǎng)-程序員之家為你提供的"Oracle數(shù)據(jù)庫(kù)密碼重置、導(dǎo)入導(dǎo)出庫(kù)命令示例應(yīng)用"希望對(duì)你有所幫助.本文來(lái)自網(wǎng)絡(luò),轉(zhuǎn)載請(qǐng)注明出處:http://www.weixuecn.cn/article/6502.html
總結(jié)
以上是生活随笔為你收集整理的不知道密码导出oracle数据库,Oracle数据库密码重置、导入导出库命令示例应用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 转-- iOS 30多个iOS常用动画,
- 下一篇: 给数据库字段增加前缀