Oracle exp imp備份、恢複資料表空間資料步驟

來源:互聯網
上載者:User

Oracle exp imp備份、恢複資料表空間資料步驟

Oracle 備份分為邏輯備份和物理備份。邏輯備份就是 exp/imp;物理備份有:冷備、熱備和 RMAN 備份。exp/imp 有三種模式,表模式、使用者模  式和全庫模式。

Oracle匯入匯出expdp IMPDP詳解

Oracle 10g expdp匯出報錯ORA-4031的解決方案

Oracle 10gr2 rac expdp 報錯UDE-00008 ORA-31626

Oracle中利用expdp/impdp備份資料庫的使用說明

1、使用 exp/imp 備份資料表空間

exp user/password@server file=filefullpathname log=logfullpathname

例如,作者要匯出使用者名稱為 bsm,密碼為 forebsm,sid 為 bsm 的資料表空間,Linux平台下使用的命令如下:

exp bsm/forebsm@bsm owner=bsm file=/home/bsm.ump log=/home/bsmexp.log

(bsm/forebsm@bsm

指使用者名稱/密碼@執行個體名,下同)

備份檔案 bsm.mmp 將會在目錄/home下產生

2、使用 exp/imp 恢複資料表空間

imp user/password@server ignore=y rows=y full=y commit=y buffer=4096000 file=filefullpathname

仍以上面的例子,將資料表空間資料恢複,Linux平台命令如下:

imp bsm/forebsm@bsm fromuser=bsm touser=bsm file=/home/bsm.ump log=/home/bsmimp.log

當在兩個資料庫中移植資料表空間時,需要注意在後面的哪個資料庫中建立資料表空間需要比原來資料庫的資料表空間大於或等於絕對不能小於,否則會報錯。

後記:exp/imp 進行資料恢複時,三種模式下都需要先建庫,然後建立資料表空間,建立使用者,最後使用上面介紹的語句進行恢複。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.