Oracle案例12——NBU Oracle恢複

來源:互聯網
上載者:User

標籤:message   dia   from   處理過程   oracl   product   col   rom   歸檔日誌   

最近在做NBU ORACLE備份的恢複測試,執行恢複時報錯ORA-27211: Failed to load Media Management Library,具體處理過程如下:
一、錯誤資訊

執行命令:

run {ALLOCATE CHANNEL ch00 TYPE SBT_TAPE;send ‘NB_ORA_CLIENT=192.168.x.x‘;send ‘NB_ORA_SERV=nbu5230‘;restore controlfile from ‘/ctrl_dTESTDB_u0at7lkpa_s10_p1_t981127978‘;release channel ch00;}

報錯資訊:

RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03009: failure of allocate command on ch00 channel at 07/10/2018 16:16:09ORA-19554: error allocating device, device type: SBT_TAPE, device name:ORA-27211: Failed to load Media Management LibraryAdditional information: 2

二、錯誤原因

由於資料庫的Lib庫不包含NBU的庫檔案,所以執行rman恢複時報錯

三、解決方案

將NBU的庫檔案放入Oracle庫檔案目錄下即可

[[email protected] oracle]$ ln -s /usr/openv/netbackup/bin/libobk.so64  /U01/app/oracle/product/11.2.0.4/lib/libobk.so
[[email protected] oracle]$ sbttest /etc/hosts

[[email protected] oracle]$ sbttest /etc/hostsThe sbt function pointers are loaded from libobk.so library.-- sbtinit succeeded-- sbtinit (2nd time) succeededsbtinit: Media manager supports SBT API version 2.0sbtinit: Media manager is version 5.0.0.0sbtinit: vendor description string=Veritas NetBackup for Oracle - Release 7.7.2 (2016011116)sbtinit: allocated sbt context area of 8 bytessbtinit: proxy copy is supported-- sbtinit2 succeeded-- regular_backup_restore starts ................................

四、知識擴充

1.NBU資料庫恢複指令碼

run {allocate channel t1 type ‘sbt_tape‘;allocate channel t2 type ‘sbt_tape‘;allocate channel t3 type ‘sbt_tape‘;send ‘NB_ORA_CLIENT=192.168.x.x‘;send ‘NB_ORA_SERV=nbu5230‘;set until sequence 12 thread 1;restore database;#switch datafile all;recover database;release channel t1;release channel t2;release channel t3;}

2.歸檔日誌恢複

run {allocate channel t1 type ‘sbt_tape‘;allocate channel t2 type ‘sbt_tape‘;send ‘NB_ORA_CLIENT=192.168.x.x‘;send ‘NB_ORA_SERV=nbu5230‘;restore archivelog from sequence 8 until sequence 12 INCARNATION ALL;release channel t1;release channel t2;}

3.其他恢複

更改還原路徑:RMAN> set archivelog destination to ‘/u01/backup‘;還原全部備份歸檔:RMAN> restore archivelog all;歸檔日誌範圍恢複:RMAN> restore archivelog from sequence 8 until sequence 12;RMAN> restore archivelog sequence between 8 and 12;從低sequence開始恢複:RMAN> restore archivelog from sequence 5;RMAN> restore archivelog low sequence 5;從高sequnece截止恢複:RMAN> restore archivelog until sequence 110;RMAN> restore archivelog high sequence 108;按時間恢複:RMAN> restore archivelog from time ‘sysdate-7‘;

 

Oracle案例12——NBU Oracle恢複

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.