记一次控制文件恢复异常处理

在一次需要采用RMAN恢复一个新建的测试库时,发现控制文件无法正常恢复,特此记录本次处理过程如下。

环境介绍:
Source DB: 2-Node Oracle Database 11g R2 RAC On AIX (11.2.0.4 with ASM)
Target DB: Single Instance Database 11g R2 On AIX (11.2.0.4 with ASM)

问题描述:

$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 3 17:01:55 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: XXXXXX (not mounted)

RMAN> restore controlfile from '/orabackup_2/XXXXXX/auto_c-1209310969-20160603-01.ctl';

Starting restore at 2016-06-03 17:02:00
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=475 device type=DISK

channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/03/2016 17:02:03
ORA-19870: error while restoring backup piece /orabackup_2/XXXXXX/auto_c-1209310969-20160603-01.ctl
ORA-19504: failed to create file "+DG_DAT01"
ORA-17502: ksfdcre:4 Failed to create file +DG_DAT01
ORA-15001: diskgroup "DG_DAT01" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete

使用RMAN恢复控制文件的时候,产生以上报错。

解决思路:
1、ASM磁盘组权限问题,Oracle用户未加asmadmin权限

[root@cti:/]# id oracle
uid=400(oracle) gid=400(oinstall) groups=501(dba),402(oper),405(asmdba)
[root@cti:/]# id grid
uid=401(grid) gid=400(oinstall) groups=501(dba),403(asmadmin),404(asmoper),405(asmdba)
#采用如下方法修改:
[root@cti:/]# usermod -G dba,oper,asmdba,asmadmin oracle
[root@cti:/]# id oracle
uid=400(oracle) gid=400(oinstall) groups=501(dba),402(oper),403(asmadmin),405(asmdba)

2、确定ASM磁盘已经被挂载

ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  8388608   3416064  3415760                0         3415760              0             N  DG_DAT01/
MOUNTED  EXTERN  N         512   4096  8388608   1536000  1535816                0         1535816              0             N  DG_IDX01/
MOUNTED  EXTERN  N         512   4096  8388608    307200   307080                0          307080              0             N  FRA/

3、如果是ASM磁盘组权限问题,需重启主机

上述确认无误后,重启主机

$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 3 18:06:06 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: XXXXXX (not mounted)

RMAN> restore controlfile from '/orabackup_2/XXXXXX/auto_c-1209310969-20160603-01.ctl';

Starting restore at 2016-06-03 18:06:13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=948 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
output file name=+DG_DAT01/XXXXXX/controlfile/current.256.913572375
output file name=+DG_IDX01/XXXXXX/controlfile/current.256.913572377
output file name=+FRA/XXXXXX/controlfile/current.256.913572377
Finished restore at 2016-06-03 18:06:18

控制文件恢复成功

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据