RMAN-06024: no backup or copy of the control file found to restore

During duplication of my Oracle database 11g R2 in RHEL 5.8 (64) from one host to another host from RMAN backup sets, I end up receiving the above error from DUPLOCATE command. Here is procedure and solution that solved my problem

As part of preparation for duplication process I Copied the backup sets to the disk location‘/u01/app/oracle/flash_recovery_area/HRMTEST/’, then catalog the entire location. Here is the output of the CATALOGcommand

RMAN> catalog start with ‘/u01/app/oracle/flash_recovery_area/HRMTEST/’;

searching for all files that match the pattern /u01/app/oracle/flash_recovery_area/HRMTEST/

List of Files Unknown to the Database

=====================================

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/archivelog/2013_10_02/o1_mf_1_20_94qm7mt5_.arc

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/control02.ctl

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/backupset/2013_10_02/o1_mf_annnn_TAG20131002T103621_94qm7oky_.bkp

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/backupset/2013_10_02/o1_mf_nnndf_TAG20131002T103424_94qm40hl_.bkp

Do you really want to catalog the above files (enter YES or NO)? yes

cataloging files…

cataloging done

List of Cataloged Files

=======================

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/archivelog/2013_10_02/o1_mf_1_20_94qm7mt5_.arc

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/backupset/2013_10_02/o1_mf_annnn_TAG20131002T103621_94qm7oky_.bkp

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/backupset/2013_10_02/o1_mf_nnndf_TAG20131002T103424_94qm40hl_.bkp

List of Files Which Where Not Cataloged

=======================================

File Name: /u01/app/oracle/flash_recovery_area/HRMTEST/control02.ctl

RMAN-07519: Reason: Error while cataloging. See alert.log.

RMAN>

After finishing other settings finally I prepared the script file with DUPLICATE command and other options inside, I launched the RAMN, I connected to target database and auxiliary instance successful then executed the script. Here is where RMAN threw back errors as follows:

[oracle@Lugao-srv06 ~]$ export ORACLE_SID=HRMDB

[oracle@Lugao-srv06 ~]$ rman

Recovery Manager: Release 11.2.0.1.0 – Production on Wed Oct 2 11:09:38 2013

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

RMAN> connect target sys

target database Password:

connected to target database: HRMDB (DBID=1167958271)

RMAN> connect auxiliary sys@HRMTEST

auxiliary database Password:

connected to auxiliary database: HRMTEST (not mounted)

RMAN> @duplicate

RMAN> run{

2> allocate auxiliary channel aux1 device type disk;

3> allocate auxiliary channel aux2 device type disk;

4> duplicate target database to HRMTEST;

5> }

… (Some output removed)

Starting restore at 02-OCT-13

channel aux1: starting datafile backup set restore

channel aux1: restoring control file

channel aux1: reading from backup piece /u01/app/oracle/flash_recovery_area/HRMDB/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

channel aux1: ORA-19870: error while restoring backup piece /u01/app/oracle/flash_recovery_area/HRMDB/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

ORA-19505: failed to identify file “/u01/app/oracle/flash_recovery_area/HRMDB/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp”

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

failover to previous backup

released channel: aux1

released channel: aux2

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

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

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

RMAN-03002: failure of Duplicate Db command at 10/02/2013 11:18:25

RMAN-03015: error occurred in stored script Memory Script

RMAN-06026: some targets not found – aborting restore

RMAN-06024: no backup or copy of the control file found to restore

RMAN>

RMAN> **end-of-file**

After tough investigation and googling the error, I came across this site that gave me the solutiondatabaseninja.blogspot.com/2011/12/rman-06026-some-targets-not-found-rman.html.It is interesting that RMAN is not aware of the this backup piece even after catalog the entire location

RMAN> list backuppiece ‘/u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp’;

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

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

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

RMAN-03002: failure of list command at 10/02/2013 11:27:01

RMAN-20260: backup piece not found in the repository

RMAN-06092: error while looking up backup piece

RMAN>

Based on the suggestion from the site, I decided to catalog individual backup piece from that location as follow

RMAN> catalog backuppiece ‘/u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp’;

cataloged backup piece

backup piece handle=/u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp RECID=56 STAMP=827753278

RMAN>

Now, RMAN is aware of the backup piece

RMAN> list backuppiece ‘/u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp’;

List of Backup Pieces

BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name

——- ——- — — ———– ———– ———-

56      29      1   2   AVAILABLE   DISK       /u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

RMAN>

Finally the DUPLICATE command completed successful

RMAN> @duplicate

RMAN> run{

2> allocate auxiliary channel aux1 device type disk;

3> allocate auxiliary channel aux2 device type disk;

4> duplicate target database to HRMTEST;

5> }

… (Some output removed)

channel aux1: starting datafile backup set restore

channel aux1: restoring control file

channel aux1: reading from backup piece /u01/app/oracle/flash_recovery_area/HRMDB/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

channel aux1: errors found reading piece handle=/u01/app/oracle/flash_recovery_area/HRMDB/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp

channel aux1: failover to piece handle=/u01/app/oracle/flash_recovery_area/HRMTEST/autobackup/2013_10_02/o1_mf_s_827750184_94qm7skq_.bkp tag=TAG20131002T103624

channel aux1: restored backup piece 1

channel aux1: restore complete, elapsed time: 00:00:03

output file name=/u01/app/oracle/oradata/HRMTEST/control01.ctl

output file name=/u01/app/oracle/oradata/HRMTEST/control02.ctl

output file name=/u01/app/oracle/oradata/HRMTEST/control03.ctl

Finished restore at 02-OCT-13

… (Some output removed)

contents of Memory Script:

{

Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 02-OCT-13

released channel: aux1

released channel: aux2

RMAN>

RMAN> **end-of-file**

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s