Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

RMAN Recover lost Redo Log Group 

Expert Oracle Database Tips by Donald BurlesonMarch 25, 2015

RMAN Backup and Recovering From Loss of Current Redo Log Group

Scenario 3:  Recovering From Loss of Redo Log Member of Current Group

The following scenario will demonstrate the recovery steps from the loss of the redo log member of the Current redo log group. This is the most dangerous situation where the DBA will lose everything that is written to the redo log file which is not multiplexed.

  1. First of all, take a backup of the database (shutdown the database and copy all .dbf and .ctl files to another directory). Then get the member name of the Current redo log group and delete it. Then restart the database:

SQL>
shutdown
 immediate;
[oracle@localhost ~]$ cd $ORACLE_HOME/oradata/new/
[oracle@localhost new]$ mkdir backup
[oracle@localhost new]$ cp *.dbf backup/
[oracle@localhost new]$ cp *.ctl backup/
[oracle@localhost new]$ exit
 
SQL>
startup
<.....output trimmed .....>
Database opened.
 
SQL>
select
 a.group#, a.status, b.member
from
 v$log a, v$logfile b
where
 a.group#=b.group# and a.status='current';
 
    GROUP# STATUS           MEMBER
---------- ---------------- ----------------------------------------
3 CURRENT        /u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log
 
SQL>
host
[oracle@localhost ~]$ rm -rf
/u01/oracle/product/10.2.0/db_1/oradata/new/redo03.log
[oracle@localhost ~]$ exit
exit
 
SQL>
startup
 force
<.....output trimmed .....>
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1:
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL>

  1. It is not possible to clear the current redo log file as you have done for the loss of the inactive redo log member. It is also not possible to drop and add a nonmultiplexed current redo log member as has been done for the loss of the multiplexed member of any group. If you try it, you will fail:

SQL>
alter
 database clear unarchived logfile
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log';
alter
 database clear unarchived logfile
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log'
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance new (thread 1)
ORA-00312: online log 3 thread 1:
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log'
 
SQL>
alter
 database drop logfile
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log';
alter
 database drop logfile
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log'
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance new (thread 1) - cannot
drop
ORA-00312: online log 3 thread 1:
'/u01/ORACLE/product/10.2.0/db_1/oradata/new/redo03.log'
SQL>

  1. In this situation, you need to recover the database to the lost redo logs first sequence number. To get this scn value, use the following query:

SQL>
select
 a.first_change#, a.status, b.member
from
 v$log a, v$logfile b 
where
 a.group#=b.group# and a.status='current';
 
FIRST_CHANGE# STATUS           MEMBER
------------- ---------------- -------------------------------------
446985 CURRENT   /u01/oracle/product/10.2.0/db_1/oradata/new/redo03.log

  1. Shut down the database, restore all files from the backup directory and bring the database to mount mode. Then use the recover database until change command to recover the database until the first_change# value of the missing redo log file and open the database with the resetlogs option:

SQL>
shutdown
 immediate;
[oracle@localhost ~]$ cd $ORACLE_HOME/oradata/new
[oracle@localhost new]$ rm -rf *.dbf
[oracle@localhost new]$ rm -rf *.ctl
[oracle@localhost new]$ cd ./backup
[oracle@localhost new]$ mv ./backup/* .
[oracle@localhost new]$ exit
 
SQL>
startup
 mount
<.....output trimmed .....>
Database mounted.
SQL>
recover
 database until change 446985;
Media recovery complete.
SQL>
alter
 database open resetlogs;
Database altered.
SQL>

Scenario 4:  Recovering From Loss of Redo Log Member of Active Group

The active group member is needed for instance recovery, so you may need to perform an incomplete recovery if you lost its members as you have done for the group members with current status. Remember, the first action which should be performed when the active member of the redo log file is lost is running the alter system checkpoint command. If it does not fail, then go on and clear the redo log file as you have done in the inactive member loss.

If it fails, then you have only one option which is performing an incomplete recovery. All steps are the same as in the current group loss scenario.

 

 

 
 
 
Get the Complete
Oracle Backup & Recovery Details 

The landmark book "Oracle Backup & Recovery: Expert secrets for using RMAN and Data Pump " provides real world advice for resolving the most difficult Oracle performance and recovery issues. Buy it for 40% off directly from the publisher.
 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster