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 > current log file in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-11, 03:05
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
current log file in db2

Why is the output of db2pd and database config file giving different output for current log number? Please find below the lines written in green for comparision.

$ db2pd -database websph -logs

Database Partition 0 -- Database websph -- Active -- Up 2 days 04:50:42

Logs:
Current Log Number 44520
Pages Written 2791
Method 1 Archive Status Success
Method 1 Next Log to Archive 44520
Method 1 First Failure n/a
Method 2 Archive Status n/a
Method 2 Next Log to Archive n/a
Method 2 First Failure n/a

Address StartLSN State Size Pages Filename
0x078000006267ABB8 0x0087BF860000 0x00000000 4000 1476 S0044519.LOG
0x078000002001FE78 0x0087C0800000 0x00000000 4000 4000 S0044520.LOG
0x078000002001FF38 0x0087C17A0000 0x00000000 4000 4000 S0044521.LOG


$ db2 get db cfg for websph|grep " First active log file"
First active log file = S0044519.LOG
Reply With Quote
  #2 (permalink)  
Old 04-12-11, 05:46
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
db2cap. The Current Log is the 'LAST' log file (most recent). The First Active Log is 'FIRST' log (oldest) log file.

S0000001.LOG
S0000002.LOG<--- First Active log
S0000003.LOG<--- Current Log
Reply With Quote
  #3 (permalink)  
Old 04-12-11, 07:23
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
Then why did it move to other log when there were still pages left to be filled in the first log?

Address StartLSN State Size Pages Filename
0x078000006267ABB8 0x0087BF860000 0x00000000 4000 1476 S0044519.LOG
0x078000002001FE78 0x0087C0800000 0x00000000 4000 4000 S0044520.LOG
Reply With Quote
  #4 (permalink)  
Old 04-12-11, 07:46
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Did you do a backup ? Did you issue a TRUNCATE LOG command ?

These are two instances I can think of that will close the logs before it is full .
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 04-13-11, 04:42
Mathew_paul Mathew_paul is offline
Registered User
 
Join Date: Oct 2007
Posts: 200
adding with sathyaram, even with db2stop and archive log command (truncated log is same i believe) will also switch logs before it fills up.
regds
Paul
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