您的位置:首页 > 数据库 > Oracle

oracle rman备份恢复报错处理10例

2016-07-28 13:50 555 查看
1.在生产数据库上执行,报RMAN-20004错

RMAN> list backup of datafile 41;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of list command at 07/27/2013 18:37:05

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20004: target database name does not match name in recovery catalog

解决方法:
  a.在测试数据库上的rman中执行:unregister database

  b.在正式库上执行:register database

2.在测试库上执行恢复时,报以下RMAN-20201错

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of set command at 07/27/2013 17:18:28

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20201: datafile not found in the recovery catalog

RMAN-06010: error while looking up datafile: 42

解决方法

方法一. resync catalog

方法二.如果同步不成功

RMAN> resync catalog;

full resync skipped, target database not mounted

则查看incarnation

RMAN> list incarnation;

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

1       9       RIS      58234393         PARENT  575432     27-MAR-08

1       2       RIS      58234393         PARENT  9680274163178 10-APR-08

1       16767   RISTST2  58234393         CURRENT 10436796710674 14-NOV-12

上面查看到有ristst2测试库的注册信息,影响到无法查询恢复文件。

所以先在测试库中执行unregister database,再在正式库中register database。

然后再list backup of datafile就能找到文件了。

3.从catalog恢复database时报RMAN-06023: no backup or copy of datafile 1 found to restore
解决方法:检查连接catalog的帐号和密码是否与备份脚本中的一致。

4.rman恢复时报ORA-27211错误
RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of allocate command on t1 channel at 12/19/2013 11:09:11

ORA-19554: error allocating device, device type: SBT_TAPE, device name:

ORA-27211: Failed to load Media Management Library

查看libobk.so是否安装和建立:

-bash-3.00$ cd $ORACLE_HOME/lib

-bash-3.00$ ls -ltr|grep libobk.so

lrwxrwxrwx   1 ristest2 dba           21 Dec 19 16:33 libobk.so -> /usr/lib/libnsrora.so

若没有,建立link文件:

solaris:

ln -s /usr/lib/libnsrora.so libobk.so

aix:

ln -s /usr/lib/libnsrora.a libobk.a 

测试是否正常:

-bash-3.00$sbttest libobk.so

he sbt function pointers are loaded from oracle.static library.

libobk.so could not be loaded.  Check that it is installed

解决方法

   a.上面检查libobk.so表示有存在和安装

   b.将以下变量加入.profile中

   -bash-3.00$ echo $LIBPATH

/apps/ristest2/product/10gr2/lib:/apps/ristest2/product/10gr2/network/lib:/lib:/usr/lib:/usr/local/lib

    -bash-3.00$  echo $LD_LIBRARY_PATH

/apps/ristest2/product/10gr2/lib:/apps/ristest2/product/10gr2/network/lib:/usr/lib:/usr/local/lib

测试正常。

-bash-3.00$ sbttest libobk.so

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: vendor description string=NMDA Oracle v1.2.0

sbtinit: allocated sbt context area of 2216 bytes

sbtinit: Media manager is version 1.2.0.0

sbtinit: proxy copy is supported

sbtinit: maximum concurrent proxy copy files is 0

-- sbtinit2 succeeded

-- regular_backup_restore starts ................

5.在测试环境中恢复rac数据库,报ORA-19511错

channel t1: starting datafile backup set restore

channel t1: specifying datafile(s) to restore from backup set

channel t1: restoring datafile 00003 to /mestst/mestst1data/undotbs1.267.830966683

channel t1: reading from backup piece fullnkotm027_1_1

channel t2: ORA-19870: error while restoring backup piece fullniotlvv3_1_1

ORA-19507: failed to retrieve sequential file, handle="fullniotlvv3_1_1", parms=""

ORA-27029: skgfrtrv: sbtrestore returned error

ORA-19511: Error received from media manager layer, error text:

   Could not locate the LNM save file 'fullniotlvv3_1_1' on server 'mhpl800'. (2:9:2)

channel t2: starting datafile backup set restore

channel t2: specifying datafile(s) to restore from backup set

channel t2: restoring datafile 00004 to /mestst/mestst1data/undotbs2.269.830966691

channel t2: reading from backup piece fullnjotm01o_1_1

解决方法

 在测试环境主机的/etc/hosts中加入正式rac两节点的主机名和IP对应关系。

6.rman恢复时报RMAN-06004错误,如下:

Starting restore at 14-NOV-14

released channel: t1

released channel: t2

released channel: t3

released channel: t4

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 11/14/2014 23:22:33

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

解决方法

 set dbid=xxxxx;

 再执行恢复脚本。

7.rman恢复时报ORA-27191错误,如下:

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 01/08/2015 21:57:53

ORA-27191: sbtinfo2 returned error

Additional information: 3480

解决方法

检查host记录,发现主机名与localhost写在了同一行

-bash-4.1$ cat /etc/hosts

::1 msuu332 localhost

127.0.0.1 msuu332 msuu332.midea.com.cn localhost loghost

#Backup Level 1

10.16.16.66    mhpl800

10.16.16.67    mhpl801

10.16.16.68    mhpl802

要另起一行写,改成如下:

::1 localhost

127.0.0.1 localhost loghost

10.16.18.161 msuu332 msuu332.midea.com.cn

8.正式库上list操作,报RMAN-20001错误,如下:

RMAN> list backup of datafile 1;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of list command at 01/15/2015 09:30:53

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

解决方法

 在库上执行:register database

9.测试库上rman恢复时报0509-022错误,如下:

0509-022 Cannot load module /usr/lib/nsr/lib64/libDDBoost.so. 0509-026 System error:A file or directory in the path name does not exist.
解决方法

lrwxrwxrwx    1 1201     dba              20 Jan 04 22:11 libobk.a -> /usr/lib/libnsrora.a

link文件的onwer显示异常,在$ORACLE_HOME/lib下rm libobk.a,再ln -s /usr/lib/libnsrora.a libobk.a。

10.备份时报ora-00245错误处理

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03008: error while performing automatic resync of recovery catalog

ORA-00245: control file backup failed; target is likely on a local file system
解决方法:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+dg1/VERLMS/snapcf_verlms.f'; 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: