備份:
exp使用者名稱/密碼@本地服務名 file = 目標位址
exp user/pwd file=file.dmp owner=youruser1(使用者名稱)
(owner = a 要備份a使用者的資料)
匯入:
imp 使用者名稱/密碼@本地服務名 file=檔案的位置 ignore=y
(ignore=y的作用是忽視一些不必要的錯誤,當然,不加也可以。)
imp user/pwd file=file.dmp indexfile=***.sql fromuser=youruser1 touser=youruser2
(如果從a使用者匯出,然後匯入b使用者,則需要加上 fromuser=a touser=b)
注意:
匯出、匯入時,注意保持字符集 一致
export nls_lang=字符集格式('simplified chinese_china.zhs16gbk')
imp方式匯入時遇到imp 00017 error 6550 錯誤
解決辦法:在匯入語句後面加上statistics=none 再只執行語句即可
修改後的語句:imp **/**@orcl tablespaces=rzdocfile=e:\**\rzdoc.dmp log=e:\**\rzdoc.log full=y statistics=none
匯出oracle整個資料庫
1 將資料庫baitest完全匯出,使用者名稱system 密碼manager 匯出du到d daochu.dmp中zhi exp system manager test file d daochu.dmp full y 2 將資料庫dao中system使用者與sys使用者的表匯出 exp syst...
oracle基於時間恢復整個資料庫
使用sql plus執行閃回。1.關閉資料庫。sql shutdown abort 2啟動資料庫到掛載模式。sql startup mount 3.資料閃回。sql recover database until time 2011 11 20 07 00 00 資料閃回的另乙個可用命令 sql fl...
oracle資料庫導庫問題
一 dmp導庫過程中,資料量小的表匯入成功,到資料量大的表時開始報錯。發現原庫的表空間是users,匯入新庫後預設表空間是users,根據錯誤提示檢視新庫的的表空間users空間不大。採取源庫 新庫的表空間更換。imp 00058 遇到 oracle 錯誤 1653 ora 01653 表 zrzy...