Alex的博客

本博客的文章均为原创,是本人从事行业多年来所遇见一些小问题的解决心得,希望可以帮助到大家!



RAC+DG环境下,物理备库恢复控制文件报错解决!

提示说DATA磁盘组不存在。

RMAN> restore standby controlfile from '/rman_backup/standby_0eq45vbn_1_1.ctl';


Starting restore at 2015/04/12 05:38:55
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=132 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 04/12/2015 05:38:57
ORA-19870: error while restoring backup piece /rman_backup/standby_0eq45vbn_1_1.ctl
ORA-19504: failed to create file "+DATA/phydb/controlfile/cont.ctl"
ORA-17502: ksfdcre:3 Failed to create file +DATA/phydb/controlfile/cont.ctl
ORA-15001: diskgroup "DATA" does not exist or is not mounted
ORA-15040: diskgroup is incomplete

RMAN> 


查看当前挂载的磁盘组。

dg-> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 12 05:36:15 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  839282688 bytes
Fixed Size    2257880 bytes
Variable Size  608177192 bytes
Database Buffers  222298112 bytes
Redo Buffers    6549504 bytes
SQL> 
SQL> 
SQL> select name ,state from v$asm_diskgroup;

NAME       STATE
------------------------------ ---------------------------------
GRIDDG       MOUNTED
FLASH       MOUNTED
DATA       MOUNTED

SQL> 
SQL> 
看到上面,我们可以看到3个磁盘组都是mountd状态,为已经挂载的状态,那么解决办法就是。先把物理备库停下来!然后给oracle权限改下,然后再启动数据库到弄nomount状态。

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
dg-> exit
logout
[root@dg rman_backup]# 
[root@dg rman_backup]# cd /u01/app/oracle/product/11.2.0/db_1/bin/
[root@dg bin]# chown oracle.asmadmin ora
orabase  oracg    oracle   oracleO  oradism  oraenv   orajaxb  orapipe  orapki   orapwd   orapwdO  oraxml   oraxsl   
[root@dg bin]# chown oracle.asmadmin oracle 
[root@dg bin]# chmod 6751 oracle

[root@dg bin]# su - oracle
dg-> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 12 05:43:00 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  839282688 bytes
Fixed Size    2257880 bytes
Variable Size  608177192 bytes
Database Buffers  222298112 bytes
Redo Buffers    6549504 bytes
SQL> 

接下来再执行rman导入!

dg-> rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Apr 12 05:46:35 2015

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

connected to target database: DEVDB (not mounted)

RMAN> restore standby controlfile from '/rman_backup/standby_0eq45vbn_1_1.ctl';

Starting restore at 2015/04/12 05:46:38
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=131 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=+DATA/phydb/controlfile/cont.ctl
Finished restore at 2015/04/12 05:46:42

RMAN> 

可以看到恢复控制文件成功!

浏览1768  评论0  niko于 2015-4-12 13:34
发言