If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQLP_BADLOG "Log File cannot be used"Logging can not continue due to an error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-11, 08:46
ATropichev ATropichev is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
Red face SQLP_BADLOG "Log File cannot be used"Logging can not continue due to an error

hi All.

I have a DB2 Express-C 9.7.4 on debian 64 bit
after last system reboot database does not start.

db2inst1@m9:~$ db2 restart database trade
SQL1042C An unexpected system error occurred. SQLSTATE=58004

This is an excerpt from db2diag.log:
MESSAGE : Crash Recovery is needed.
...
MESSAGE : Crash recovery started. LowtranLSN 0000005C823FE91E MinbuffLSN
0000005C80D24233
...
MESSAGE : ADM1530E Crash recovery has been initiated.
...
MESSAGE : DIA2051W Forward phase of crash recovery has completed. Next LSN is
"0000005C82400010".
...
MESSAGE : ZRC=0x8610000D=-2045771763=SQLP_BADLOG "Log File cannot be used"
DIA8414C Logging can not continue due to an error.
...
RETCODE : ZRC=0x8610000D=-2045771763=SQLP_BADLOG "Log File cannot be used"
DIA8414C Logging can not continue due to an error.
...
MESSAGE : Logging can not continue.
...
RETCODE : ZRC=0x870F0151=-2029059759=SQLO_WP_TERM
"The waitpost area has been terminated"
...
Crash recovery failed with rc -2029059759
LowtranLSN 0000005C823FEFDA MinbuffLSN 0000005C80D24233
Recovery started on log file S0000003.LOG.
...
MESSAGE : ADM1532E Crash recovery has failed with SQLCODE "-1042".
...
MESSAGE : ADM14001C An unexpected and critical error has occurred:
"DBMarkedBad". The instance may have been shutdown as a result.
"Automatic" FODC (First Occurrence Data Capture) has been invoked and
diagnostic information has been recorded in directory
"/home/db2inst1/sqllib/db2dump/FODC_DBMarkedBad_2011-12-16-21.37.06.8
69136_0000/". Please look in this directory for detailed evidence
about what happened and contact IBM support if necessary to diagnose
the problem.
...
MESSAGE : ADM7518C "TRADE " marked bad.
...

and then:
SQL1042C An unexpected system error occurred. SQLSTATE=58004

I try db2art:
~$ db2dart trade /RPTN trade-rpt /SCR M

in trade-rpt only one warning message - The database state is not consistent.
No more errors or warnings.

It seems all problems are in log files. Is it possible to repair log files or recreate it?

Any idea?
Thanks in advance
Attached Files
File Type: txt db2diag.txt (19.8 KB, 1 views)
Reply With Quote
  #2 (permalink)  
Old 12-16-11, 09:02
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
2011-12-16-21.37.06.868078+660 I27560050290E509 LEVEL: Warning
PID : 1743 TID : 139807053309696PROC : db2sysc
INSTANCE: db2inst1 NODE : 000 DB : TRADE
APPHDL : 0-260 APPID: *LOCAL.db2inst1.111216103654
AUTHID : DB2INST1
EDUID : 53 EDUNAME: db2agent (TRADE)
FUNCTION: DB2 UDB, recovery manager, sqlprecm, probe:4000
MESSAGE : DIA2051W Forward phase of crash recovery has completed. Next LSN is
"0000005C82400010".


2011-12-16-21.37.06.868258+660 I27560050800E539 LEVEL: Severe
PID : 1743 TID : 139807091058432PROC : db2sysc
INSTANCE: db2inst1 NODE : 000
EDUID : 71 EDUNAME: db2loggw (TRADE)
FUNCTION: DB2 UDB, data protection services, sqlpgWriteToDisk, probe:909
MESSAGE : ZRC=0x8610000D=-2045771763=SQLP_BADLOG "Log File cannot be used"
DIA8414C Logging can not continue due to an error.
DATA #1 : <preformatted>
TailPage 0 does not match pagePso 395382173720 and firstLso 394847924225


LOG file corrupted during the roll back stage,so suggest u call IBM support for help.
Reply With Quote
  #3 (permalink)  
Old 12-16-11, 09:07
ATropichev ATropichev is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
Thanks for attention


next step:

db2inst1@m9:~$ db2cklog CHECK 0 TO 15 ARCHLOGPATH /home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/
...
================================================== ======
"db2cklog": Processing log file header of "/home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/S0000004.LOG".

"db2cklog": Processing log pages of "/home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/S0000004.LOG" (total log pages: "8192").
==> page "1" ...

DBT7064E Log file validation failed because the current log record log sequence number (LSN) is not equal to the expected LSN in a log record. Current LSN: "394847924325". Expected LSN: "395382169699". Log record: "FULL".

DBT7048E The db2cklog utility determined that the current log file is invalid.

"db2cklog": Finished processing log file "S0000004.LOG". Return code: "-3006".
================================================== ======

bad log file found. what should i do? I have not paid IBM support
Reply With Quote
  #4 (permalink)  
Old 12-16-11, 09:55
ATropichev ATropichev is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
Smile Problem solved

I deleted S0000004.LOG...S0000015.LOG and database start normally.

Problem solved
Reply With Quote
  #5 (permalink)  
Old 12-17-11, 08:58
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
delete log files means lost data...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On