Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMAN finds autobackup controlfile but not spfile

User_8FGDLMar 6 2023

I have access to a RMAN file backup that I would like to restore on a completely new server.

I would like to extract the SPFILE from the autobackup. It seems from the log of the actually made RMAN backup that the SPFILE should be included:

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Feb 3 05:40:33 2023
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: NAME (DBID=2420327252)
RMAN> run
2> {
3> allocate channel c1 DEVICE TYPE DISK;
11> backup as compressed backupset database format '/u05/rman_backup/230113-002007/DB_%u_%d_%s_%T';
12> backup as compressed backupset archivelog all format='/u05/rman_backup/230113-002007/ARC_%u_%d_%s_%T';
13> backup current controlfile format '/u05/rman_backup/230113-002007/CF_%u_%d_%s_%T';
14> release channel c1;
22> }
23> 
using target database control file instead of recovery catalog
allocated channel: c1
Starting Control File and SPFILE Autobackup at 2023-02-03 08:27:59
Finished Control File and SPFILE Autobackup at 2023-02-03 08:28:03
released channel: c1
Recovery Manager complete.

I deleted a lot of unecessary information here, but it do looks like the SPFILE is included in the autobackup, right?

If I via RMAN on the completely new DB server do a recovery of the Control file it works:

[oracle@oracledb ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Mar 6 13:27:54 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

connected to target database: DUMMY (not mounted)

RMAN> SET DBID 2420327252;

executing command: SET DBID

RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP maxdays 40;

Starting restore at 06-MAR-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=870 device type=DISK
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20230203
channel ORA_DISK_1: AUTOBACKUP found: c-2420327252-20230203-00
channel ORA_DISK_1: restoring control file from AUTOBACKUP c-2420327252-20230203-00
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/cntrlname.dbf
Finished restore at 06-MAR-23

So it is restored. Only thing I find weird is that the restored control file is named cntrlname.dbf, I am so used to it having suffix .ctl and not .dbf, but that shouldn't matter I guess…

The thing is that when I try to restore the SPFILE it says this:

RMAN> RUN
2> {
3> ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/u05/RMAN/c_%F';
4> RESTORE SPFILE FROM AUTOBACKUP maxdays 40;
5> }
released channel: ORA_DISK_1
allocated channel: disk2
channel disk2: SID=870 device type=DISK
Starting restore at 06-MAR-23
channel disk2: AUTOBACKUP found: c-2420327252-20230203-00
channel disk2: restoring spfile from AUTOBACKUP c-2420327252-20230203-00
channel disk2: the AUTOBACKUP does not contain an SPFILE
released channel: disk2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/06/2023 13:50:04
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN>

Isn't this a bit weird? Am I missing something?

Is it because I am using a 19C installed database to install a 11g made RMAN export? I can try to find the old install files for Oracle DB 11g and redo this, but I have a feeling that this can't be the reason. If the SPFILE is not possible to retrieve I will buidl it from scratch, which is time consuming, but still doable. Really appreciate if someone can give me advice if I am missing something.

Comments
Post Details
Added on Mar 6 2023
0 comments
1,902 views