前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >NBU Oracle恢复案例

NBU Oracle恢复案例

作者头像
星哥玩云
发布2022-08-17 16:18:35
6400
发布2022-08-17 16:18:35
举报
文章被收录于专栏:开源部署

最近在做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:09 ORA-19554: error allocating device, device type: SBT_TAPE, device name: ORA-27211: Failed to load Media Management Library Additional information: 2

二、错误原因

由于数据库的Lib库不包含NBU的库文件,所以执行rman恢复时报错

三、解决方案

将NBU的库文件放入Oracle库文件目录下即可

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

[oracle@node1 oracle]$ sbttest /etc/hosts The sbt function pointers are loaded from libobk.so library. -- sbtinit succeeded -- sbtinit (2nd time) succeeded sbtinit: Media manager supports SBT API version 2.0 sbtinit: Media manager is version 5.0.0.0 sbtinit: vendor description string=Veritas NetBackup for Oracle - Release 7.7.2 (2016011116) sbtinit: allocated sbt context area of 8 bytes sbtinit: 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';

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库备份服务
数据库备份服务(Database Backup Service,简称 DBS)是为用户提供连续数据保护、低成本的备份服务。数据库备份拥有一套完整的数据备份和数据恢复解决方案,具备实时增量备份以及快速的数据恢复能力,它可以为多种部署形态的数据库提供强有力的保护,包括企业 IDC 数据中心、其他云厂商数据库及腾讯公有云数据库。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档