Solved

Oracle restore out of place failed

  • 10 February 2022
  • 7 replies
  • 3501 views

Userlevel 1
Badge +9

Hello 

im facing an issue restoring an oracle database from RAC to another new server. 

case : 

we had a retired oracle RAC with a log retention backup in place.

now the customer after 10 Months need  some data from the oracle db, so we implemented a new node to restore the db on it 

configuration on the source rac was as below 

 

when i try to  perform out of place restore with control file option selected and no catalog option 

i get this error “ RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece”

i have tried more than 3 different point of times with the same issue.

i have configured the pathes in the redirect option 

i have configured the CF&SPfile option to be from autobackup once and from peice once and i got the same issue. 

 

RMAN below 

Rman Script:
[run {
allocate channel ch1 type 'sbt_tape'
PARMS="SBT_LIBRARY=/opt/commvault/Base64/libobk.a(shr.o), BLKSIZE=1048576 ENV=(CV_mmsApiVsn=2,ThreadCommandLine= -cn pendba1 -cs site_a_commserv.,CV_channelPar=ch1)"
TRACE 0;
send " -jm 131082 -a 2:714 -cl 605 -ins 205 -at 22 -j 4098865 -jt 4098865:2:1:0:59544 -rcp 0 -ms 2 -p 1 -df";
restore controlfile to '+data/switchdb/controlfile'  from  'c-3482102428-20211107-03' ;
}
exit;
]
Rman Log:[
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Feb 10 16:24:57 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04004: error from recovery catalog database: ORA-12154: TNS:could not resolve the connect identifier specified
RMAN>
connected to target database: SWITCHDB (not mounted)
RMAN> 2> 3> 4> 5> 6> 7>
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=190 device type=SBT_TAPE
channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)
sent command to channel: ch1
Starting restore at Feb 10 2022 16:25:34
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/10/2022 16:25:35
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
RMAN>
Recovery Manager complete.
]
 

appreciate your effort to support me with this issue.

icon

Best answer by Gowri Shankar 10 February 2022, 22:24

View original

If you have a question or comment, please create a topic

7 replies

Userlevel 4
Badge +12

Hi @Muhammad Abdullah ,

 

Please check the following 

 

  1. The controlfile backup piece provide does not seems to be from a 10 months old job, Its from Nov 7 2021.
  2. Provide a point in time for the control file in the advance restore options → ctrl & SPfiles tab
    Select Restore control File - > Restore from autobackup → select to point in time and provide the desired date / time when the backup was taken 
  3. Do not select “Restore control File as”. Control file path will be picked from the pfile/spfile on the destination. 
  4. Ensure you are providing the appropriate copy precedence 

 

Try another restore and let us know the outcome.

 

Regards,

Gowri Shankar 

 

Userlevel 2
Badge +7

Hello Also there is an issue with the recovery catalog connection. I would recommend to check No Catalog because it is not working

 

https://docs.oracle.com/html/E10643_07/rcmsynta2008.htm#i85188

 

RMAN Behavior When Restoring Control Files

The behavior of RMAN when restoring control files depend on a variety of factors, which are summarized in Table 3-9. Required commands and options for restoring autobackups are summarized in Table 3-10.

Table 3-9 RESTORE CONTROLFILE Scenarios

RMAN Connection RESTORE CONTROLFILE; RESTORE CONTROLFILE FROM AUTOBACKUP; RESTORE CONTROLFILE ... TO 'filename'; RESTORE CONTROLFILE ... FROM 'media_handle' or TAG 'user_tag';

No catalog, target database started in NOMOUNT state

Error. Must specify FROM AUTOBACKUP.

Restores to CONTROL_FILES locations. See Table 3-10 for required commands and options.

Must specify FROM AUTOBACKUP. Restores only to filename.

First run SET DBID. Restores from specified file (cannot restore from TAG). If TO 'filename' not used, restores to all CONTROL_FILES locations.

No catalog, target database mounted or open

Error. Must use TO 'filename', where filename is not in CONTROL_FILES list.

Error. Must use TO 'filename', where filename is not in CONTROL_FILES list.

Restores only to filename, where filename is not in CONTROL_FILES list.

RMAN issues error RMAN-06496. Use TO 'filename' instead.

Catalog, target database started in NOMOUNT state

Restores to CONTROL_FILES locations. Run SET DBID only if DB_NAME not unique in catalog.

Only use with recovery catalog for testing.

Restores only to filename, where filename is not in CONTROL_FILES list.

Restores from specified file. If TO 'filename' not used, restores to all CONTROL_FILES locations.

Catalog, target database mounted or open

Error. Must use TO 'filename', where filename is not in CONTROL_FILES list.

Do not use with recovery catalog.

Restores only to filename, where filename is not in CONTROL_FILES list.

RMAN issues error RMAN-06496. Use TO 'filename' instead.

Userlevel 1
Badge +9

Hello @Gowri Shankar 
thanks for the support. 

well i followed your instruction and the restore job was able to locate the control file and the restore process started.

however, the restore job switched to pending status multiple times during the process and i resumed it and it continued but at the end the restore job failed.

below is the error for the pending status and also i’ve attached the RMAN Log for reference  

Error Code: [18:190]
Description: RMAN Script execution failed for instance [SWITCHDB] with error [channel ch1: ORA-19870: error while restoring backup piece 3084563_SWITCHDB_7o0djh7n_1_1]. Please check the Logs for more details.
Source: pendba1, Process: ClOraAgent

 

 

Userlevel 4
Badge +12

There is no enough free space on ASM 

 

channel ch1: reading from backup piece 3084563_SWITCHDB_7o0djh7n_1_1channel ch1: ORA-19870: error while restoring backup piece 3084563_SWITCHDB_7o0djh7n_1_1ORA-19504: failed to create file "+DATA/switchdb/datafile/data_d-switchdb_ts-shclog_index_fno-72"ORA-17502: ksfdcre:4 Failed to create file +DATA/switchdb/datafile/data_d-switchdb_ts-shclog_index_fno-72ORA-15041: diskgroup "DATA" space exhaustedchannel ch1: starting datafile backup set restore

 

 

Make sure there is enough disk space to accommodate the datafiles and the logs required for the restore and recovery

Resume the job

 

 

Userlevel 1
Badge +9

Hi @Gowri Shankar 

thanks for your efforts! 

 

i’ve increased the disk capacity and the restore completed with errors!, it couldn’t restore the archive logs.

is there anyway the i can locate the arch logs in the full backup which im trying to restore from?

RMAN log below 

 

Rman Log:[
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Feb 16 03:25:22 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN>
connected to target database: SWITCHDB (DBID=3482102428, not open)
using target database control file instead of recovery catalog
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11>
allocated channel: ch1
channel ch1: SID=225 device type=SBT_TAPE
channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)
allocated channel: ch2
channel ch2: SID=232 device type=SBT_TAPE
channel ch2: CommVault Systems for Oracle: Version 11.0.0(BUILD80)
sent command to channel: ch1
sent command to channel: ch2
Starting recover at Feb 16 2022 03:25:25
starting media recovery
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATA/oldswitch/datafile/data_d-switchdb_ts-system_fno-1'
released channel: ch1
released channel: ch2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/16/2022 03:25:31
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of archived log for thread 2 with sequence 52613 and starting SCN of 29940449467 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 109970 and starting SCN of 29940584431 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 109969 and starting SCN of 29940449472 found to restore
RMAN>
Recovery Manager complete.
]
Executing SQL script [ ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+FRA';
ALTER SYSTEM SET log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';
exit;
]
Executing sql [ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/opt/commvault/Base/Temp//4156498_ctlfile.trace' REUSE;
EXIT;
]
Executing sql [select decode(count(1), 1, '###spfile###', '###pfile###') from v$spparameter where rownum=1 and isspecified= 'TRUE';
exit;
]
Executing sql [STARTUP FORCE NOMOUNT;
ALTER SYSTEM SET DB_NAME='oldswitch' SCOPE=SPFILE;
ALTER SYSTEM SET DB_UNIQUE_NAME='oldswitch' SCOPE=SPFILE;
EXIT;
]
Executing sql [shutdown immediate;
startup nomount;
@'/opt/commvault/Base/Temp//CreateControlFileScript_1644974734.sql';
exit;
]
 

Userlevel 1
Badge +9

Hello, 

 

im sorry for the late response. 

i just wanted to acknowledge that restore was done successfully after i modified the point of time option in ctrl & SPfiles tab. 

 

thanks for the great support.

Userlevel 7
Badge +23

Glad to hear it!!