Thursday, March 28, 2019

ORA-00314: log 42 of thread 2, expected sequence# 37363 doesn’t match 37361 and ORA-01624: log 1 needed for crash recovery of thread 1

ORA-00314: log 42 of thread 2, expected sequence# 37363 doesn’t match 37361
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ORA-01624: log 1 needed for crash recovery of thread 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

recover database until  cancel give above error
and clear log file gives below error

ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of thread 1
ORA-00312: online log 1 thread 1: '//'
ORA-00312: online log 1 thread 1: '//'

To implement the solution, please execute the following steps:

1) Switch the logfile on primary so that group can become non-current.

connect / as sysdba
alter system switch logfile;



2) Copy from primary to standby.
If you are  working with Group 1 on the primary then copy both  files for group 1 from the primary to the standby machine into an alternate location at operating system level.


3) Move current group one files on the standby to a different location


4) Rename the logfile- Move the copied  redo logs into the group 1 current location

ALTER DATABASE RENAME FILE
'/FULL_PATH_OF_OLD_LOCATION/AND_REDO_LOG_NAME.LOG'
TO
'/FULL_PATH_OF_NEW_LOCATION/AND_REDO_LOG_NAME.LOG';



5) Clear the logfile :

alter database clear logfile group;


6)alter database drop standby logfile group1 .



Clear standby redo with ora-314 error.

Stop recovery on standby side.

SQL> Alter database recover managed standby database cancel;

clear standby redo group 404. -



SQL>  alter database clear logfile group 404


You may have to use the 'unarchived'-Keyword to be able to clear the Standby RedoLog Group in most Cases, eg.

SQL> alter database clear unarchived logfile group 404;



another good solution is to copy the requested archive log into restored database, and recover database

1. copy the next 2-3 archives to target database same location or  different location(if it is different location, register the archive location through RMAN using below command )
CATALOG START WITH 'location path';


2.alter database recover database until cancel;
enter auto, when prompted

3.open database with resetlogs.

for better safety, shut immediate and startup the database.




No comments:

Post a Comment