SOLVED

ORA-00742

Asked by OracleDba16 viewsoracle

#oracle#error

Solutions(1)

Accepted Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
ORA-00742 Log read detects lost write in thread 1 sequence 149 block 38233

In this post we will see how to solve

ORA-00742: Log read detects lost write-in

thread 1 sequence, You can encounter this error if your Oracle Database machine was suddenly stopped without proper shutdown command due to some unavoidable problem like Power Failure, Power cable issue, etc.

STEP1:

In this step, tried to login to the database, and below is an error.

Select status from v$instance;

STATUS

———–

MOUNTED

Alter database open;

ERROR at line 1:

ORA-00742: Log read detects lost write in thread 1 sequence 149 block 38233

ORA-00372: online log 2 thread 1: ‘/u01/oradata/test01/redo02.log’

STEP2:

Check the status of log file 2 in v$log & v$logfile and you can notice log group 2 is the current logfile.

SQL> Set lines 300

Set pages 3000

Col MEMBER for a60

Select * from v$logfile;

SQL> Select * from v$log;

STEP3:

Try to clear the current log file most likely it will fail as group log 2 is the current logfile.

Alter database clear unarchived logfile group 2;

ERROR at line 1:

ORA-01624: log 2 needed for crash recovery of instance test01 (thread 1)

ORA-00312: online log 2 thread 1: ‘/u01/oradata/test01/redo02.log’

STEP4:

So we will try to perform manual recovery on the database, Please note since Group log 2 is current it will be not archived, and the requested archive log sequence 149 is the current redo logfile, and hence I have provided manually redo log 2 file location.

SQL> recover database until cancel;

SQL> alter database open resetlogs;

ERROR at line 1 :

ORA-00600: internal error code

STEP 5:

SQL> !mv /u01/oradata/test01/redo02.log  /u01/oradata/test01/redo02.log

SQL> recover database using backup controlfile until cancel;

SQL> alter database open resetlogs;

Database altered.

SQL> select status from v$instance;

Hope It Helps !
OracleDba

Post Your Solution