Wednesday, May 27, 2015

ORA-00322: log 4 of thread 2 is not current copy

ORA-00322: log  of thread 2 is not current copy ORA-00312: online log 4 thread 2:


This error can occur in the RAC database . the Redo log file  of the particular node is not in sync with the second node .. the redo log is shared between the n numbers of nodes in the database .. the redo  will be located in more then two disk group's .. when one of the node's control file does not have the sync with the current redo log which is updated by the another instance  then this problem occurs .. when we restart cluster services

Step 1

Errors in file /prod02/oracle/12.1.0/diag/rdbms/omprd/OMPRD2/trace/OMPRD2_ora_4851.trc:
ORA-00322: log 4 of thread 2 is not current copy
ORA-00312: online log 4 thread 2: '+DATA/omprd/onlinelog/group_4.343.829020465'

Step 2 

Check the aert log and check the trace file 
check the trace file 
----- END DDE Actions Dump (total 0 csec) -----
DDE: Problem Key 'ORA 312' was flood controlled (0x1) (no incident)
ORA-00312: online log 4 thread 2: '+DATA/omprd/onlinelog/group_4.343.829020465'
ORA-00312: online log 4 thread 2: '+FLASH/omprd/onlinelog/group_4.258.829020469'
ORA-00322: log 4 of thread 2 is not current copy
ORA-00312: online log 4 thread 2: '+DATA/omprd/onlinelog/group_4.343.829020465'
ORA-00312: online log 4 thread 2: '+FLASH/omprd/onlinelog/group_4.258.829020469'

Step 3 open the first node of the database or the node which does  not have the error 

Open the any one of the database node which does not gives the error and here in this practice we have the node one does not have the error so open the node one database and mount he node two database if we open the database then it will gives the error

oragrid @ db01/home/oragrid >srvctl start database -d OMPRD
PRCR-1079 : Failed to start resource ora.omprd.db
CRS-5017: The resource action "ora.omprd.db start" encountered the following error:
ORA-00322: log 4 of thread 2 is not current copy
ORA-00312: online log 4 thread 2: '+DATA/omprd/onlinelog/group_4.343.829020465'
ORA-00312: online log 4 thread 2: '+FLASH/omprd/onlinelog/group_4.258.829020469'
. For details refer to "(:CLSN00107:)" in "/prod01/oracle/12.1.0/12.1.0/grid/log/db02/agent/crsd/oraagent_oraprod/oraagent_oraprod.log".

CRS-2674: Start of 'ora.omprd.db' on 'db02' failed
CRS-2632: There are no more servers to try to place resource 'ora.omprd.db' on that would satisfy its placement policy

so open the first node and then mount the second node of the database 

Step 4 Mount the second node 

Mount the node two which the redo log file is inconsistent by using the startup mount 

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

Step 5 clear the log file group which have the issue 

Move to the first node and then clear the logfile group which is mismatch between the two nodes 

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 4;

Database altered.

SQL>

As this command erase all the data in the log file if you need to recover the database then the Specific log file will create the issue so we need to take the full database backup after this command 

Step 6 Open all the Second node of the database 

Now move to the Node 2 of the Second database

SQL> alter database open;

Database altered.

SQL>




No comments:

Post a Comment