Oracle 19c RAC: Restore Lost Control Files and SPFILE Using RMAN

Oracle RAC Disaster Recovery Scenario

In Oracle RAC environments, losing control files and SPFILE can completely stop database operations. This guide explains how to recover an Oracle 19c RAC database (File System based, NOT ASM) when:

  • All control files are lost
  • SPFILE is lost
  • Datafiles are intact
  • Archive logs are available
  • RMAN auto backup of control file and SPFILE exists

This is a real-world production recovery scenario commonly faced by DBAs.

Environment Details

Servers

HostnameIP Address
ggate01.localdomain.com192.168.56.172
ggate02.localdomain.com192.168.56.173

Software Details

  • Oracle Grid Infrastructure: 19c
  • Oracle Database Home: 19c
  • Database Name: mydb
  • Instances: mydb1, mydb2
  • Storage Type: File System (Non-ASM)

Recovery Objective

  • Restore SPFILE from RMAN auto backup
  • Restore control files
  • Recover database to a consistent state
  • Bring both RAC instances online

👉 No datafile restore is required because datafiles are intact.


Step-by-Step Recovery Procedure


Step 1: Stop All RAC Instances

Stop the database on all nodes to avoid any file access conflicts.

srvctl stop database -d mydb -o abort

Verify database status:

srvctl status database -d mydb

Step 2: Create a Temporary PFILE

Since SPFILE is lost, create a minimal PFILE to start the database in NOMOUNT mode.

vi /tmp/initmydb.ora

Add the following parameter:

db_name='mydb'

Save and exit.


Step 3: Start One Instance in NOMOUNT Mode

Login to SQL*Plus on one node only.

sqlplus / as sysdba

Start the instance using the temporary PFILE:

startup nomount pfile='/tmp/initmydb.ora';

Step 4: Restore SPFILE from RMAN Auto Backup

Connect to RMAN:

rman target /

Set the database DBID (required when control files are missing):

SET DBID=3132869757;

Restore the SPFILE:

RESTORE SPFILE TO '/tmp/spfile_mydb.ora'
FROM '/u03/oradata/MYDB/autobackup/<handle_name>';

Step 5: Restart Database Using Restored SPFILE

Shutdown the instance:

shutdown immediate;

Start again in NOMOUNT mode (now using the restored SPFILE):

startup nomount;

Step 6: Restore Control Files and Recover Database

Restore control files from RMAN auto backup:

RESTORE CONTROLFILE FROM AUTOBACKUP;

Mount the database:

ALTER DATABASE MOUNT;

Recover the database:

RECOVER DATABASE;

Open database with resetlogs

ALTER DATABASE OPEN RESETLOGS;

✅ At this stage, the database is consistent and open.


Step 7: Copy SPFILE to Shared Location and Register with CRS

Copy SPFILE to shared storage (NFS or common file system):

cp /tmp/spfile_mydb.ora /u03/oradata/mydb/

Update CRS to use the correct SPFILE:

srvctl modify database -d mydb -spfile /u03/oradata/MYDB/spfile_mydb.ora

Verify configuration:

srvctl config database -d mydb

Step 8: Start Remaining RAC Instance

Check current database status:

srvctl status database -d mydb

Start the second instance:

srvctl start instance -i mydb2 -d mydb

Verify both instances:

srvctl status database -d mydb

Final Validation Checklist

  • Database opens successfully with RESETLOGS
  • Both RAC instances are running
  • SPFILE is correctly registered with CRS
  • No control file or SPFILE errors in alert logs

Unknown's avatar

Author: SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply

Discover more from SmartTechWays - Innovative Solutions for Smart Businesses

Subscribe now to keep reading and get access to the full archive.

Continue reading