Recovery cases: perte d’un controlfile multiplexé

Recovery en cas de perte d’un controlfile multiplexé. Il reste l’autre membre. Après redémarrage en nomount pour avoir des fichiers consistents, il suffit de restaurer le controlfile manquant à partir de celui qui reste.

Ici un exemple en utilisant Recovery Advisor, sur une base de demo créée ici.

Voici mes controlfiles:

RMAN> select status,name from v$controlfile;

RMAN> select status,name from v$controlfile;
using target database control file instead of recovery catalog
STATUS 
-------
NAME                                                                            
--------------------------------------------------------------------------------
/u/DEMO/DATA/DEMO100/control01.ctl
/u/DEMO/FRA/DEMO100/control02.ctl
Recovery Manager complete.

J’en supprime un:

Failure simulation

+ rm /u/DEMO/DATA/DEMO100/control01.ctl
+ ls -l '/u/DEMO/DATA/DEMO100/control*.ctl'
ls: cannot access /u/DEMO/DATA/DEMO100/control*.ctl: No such file or directory

Erreur dès que j’essaie de me connecter avec RMAN:


Recovery Manager: Release 12.1.0.1.0 - Production on Sat Nov 16 21:41:41 2013

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-06003: ORACLE error from target database: 
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u/DEMO/DATA/DEMO100/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

Donc je redémarre en nomount avec sqlplus:

SQL*Plus: Release 12.1.0.1.0 Production on Sat Nov 16 21:41:41 2013
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> startup force;
ORACLE instance started.

Total System Global Area  417546240 bytes
Fixed Size		    2289064 bytes
Variable Size		  327156312 bytes
Database Buffers	   79691776 bytes
Redo Buffers		    8409088 bytes
ORA-00205: error in identifying control file, check alert log for more info

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Et voici la résolution automatique avec Recovery Advisor:


Recovery Manager: Release 12.1.0.1.0 - Production on Sat Nov 16 21:41:47 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
connected to target database: DEMO100 (not mounted)

RMAN> list failure;

RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================

Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
6878       CRITICAL OPEN      16-NOV-13     Control file /u/DEMO/DATA/DEMO100/control01.ctl is missing


RMAN> advise failure;

RMAN> advise failure;
List of Database Failures
=========================

Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
6878       CRITICAL OPEN      16-NOV-13     Control file /u/DEMO/DATA/DEMO100/control01.ctl is missing

analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=123 device type=DISK
analyzing automatic repair options complete

Mandatory Manual Actions
========================
no manual actions available

Optional Manual Actions
=======================
no manual actions available

Automated Repair Options
========================
Option Repair Description
------ ------------------
1      Use a multiplexed copy to restore control file /u/DEMO/DATA/DEMO100/control01.ctl  
  Strategy: The repair includes complete media recovery with no data loss
  Repair script: /u/DEMO/diag/rdbms/demo100/DEMO100/hm/reco_3683885895.hm


RMAN> repair failure;

RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u/DEMO/diag/rdbms/demo100/DEMO100/hm/reco_3683885895.hm

contents of repair script:
   # restore control file using multiplexed copy
   restore controlfile from '/u/DEMO/FRA/DEMO100/control02.ctl';
   sql 'alter database mount';

Do you really want to execute the above repair (enter YES or NO)? executing repair script

Starting restore at 16-NOV-13
using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy
output file name=/u/DEMO/DATA/DEMO100/control01.ctl
output file name=/u/DEMO/FRA/DEMO100/control02.ctl
Finished restore at 16-NOV-13

sql statement: alter database mount
released channel: ORA_DISK_1
repair failure complete

Do you want to open the database (enter YES or NO)? database opened



Recovery Manager complete.

Arrêt de la base le temps de recopier le controlfile existant. Aucune perte de donnée.

Laisser un commentaire