🛠️ Steps to Restore a Lost Control File in 19c RAC:
✅ Step 1: Check the Status of the RAC Database
Since the control file is missing, the database may not start. Use:
startup;
You might see an error:
ORA-00205: error in identifying control file, check alert log
✅ Step 2: Identify Available Backup of the Control File
If RMAN backups are configured, list available control file backups:
RMAN> list backup of controlfile;
Alternatively, check for any trace-based control file backups:
ls -lrt $ORACLE_BASE/diag/rdbms/$DB_NAME/$ORACLE_SID/trace/
Look for a file containing “ALTER DATABASE BACKUP CONTROLFILE TO TRACE;”
✅ Step 3: Restore the Control File from RMAN Backup
Start RMAN and restore the control file:
RMAN> restore controlfile from autobackup;
Or manually specify a backup:
RMAN> restore controlfile from ‘/path_to_backup/controlfile.bkp’;
✅ Step 4: Mount the Database
After restoring the control file, mount the database:
alter database mount;
✅ Step 5: Recover the Database
Use RMAN to apply required logs:
RMAN> recover database;
✅ Step 6: Open the Database with Resetlogs
If required, open the database with resetlogs:
alter database open resetlogs;
✅ Step 7: Recreate the Control File (if no backup exists)
If no backup is available, manually recreate the control file using a trace file:
1️⃣ Locate the latest control file trace:
ls -lrt $ORACLE_BASE/diag/rdbms/$DB_NAME/$ORACLE_SID/trace/*.trc
2️⃣ Edit the trace file and create a new control file:
CREATE CONTROLFILE REUSE DATABASE “DB_NAME” RESETLOGS ARCHIVELOG
3️⃣ Execute the script in SQL*Plus and proceed with database recovery.
🔥 Key Learnings:
✔ Always have multiple control file copies (CONTROL_FILES parameter).
✔ Ensure RMAN backups include control files (CONFIGURE CONTROLFILE AUTOBACKUP ON;).
✔ Regularly monitor and validate backup strategies to prevent downtime.