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 > log held

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-06, 13:49
wehrle wehrle is offline
Registered User
 
Join Date: Jul 2005
Posts: 99
log held

DB2 8.2
AIX 5.3

I have received the following twice within the last two months in the DB2 .nfy file. Left alone, the logs reach saturation and brings DB2 down. My question is: How can I receive this notice via email?

ADM1823E The active log is full and is held by application handle "22".
Terminate this application by COMMIT, ROLLBACK or FORCE APPLICATION.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 11-08-06, 15:39
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Increase the size and/or number of primary and secondary log files. This is specified in the database configuration (db2 get db cfg).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 11-08-06, 16:47
Nageswaran Nageswaran is offline
Registered User
 
Join Date: Jul 2002
Posts: 48
As of now for getting the email notification, you have to write a script to send a mail by capturing get snapshot for database. In the snapshot of database you will have information about amount of log space used.

Thanks
Nagesh
Reply With Quote
  #4 (permalink)  
Old 11-08-06, 18:36
wehrle wehrle is offline
Registered User
 
Join Date: Jul 2005
Posts: 99
Increasing the size or number of log files would be postponing the inevitable, assuming no one notices the error. The issue is that something has gone awry for a user and that the transaction log is being held by his agent process which is stopping the transaction log from being archived. Eventually, all the logs, no matter their size or number would be consumed. I wanted to pursue email notification of the error so to take action, presumably, as soon as posssible.

Is it not possible for the health monitor to be used somehow to send the notice via email?

If I must write a script to accomplish this, I am thinking it would make more sense to grep for the error in the notification file (.nfy) and send the email.

Thanks.
Reply With Quote
  #5 (permalink)  
Old 11-08-06, 18:53
Nageswaran Nageswaran is offline
Registered User
 
Join Date: Jul 2002
Posts: 48
You can grep the .nfy file, but you will get to know after the log has become full. But if you can use the get snapshot for command then you can try to avoid, situation.

Thanks
Nagesh
Reply With Quote
  #6 (permalink)  
Old 11-08-06, 19:04
wehrle wehrle is offline
Registered User
 
Join Date: Jul 2005
Posts: 99
So, the health monitor would be of no use here? (I realize though the health monitor would likely be a performance hit if it could be used here.)

Thanks again.
Reply With Quote
  #7 (permalink)  
Old 11-08-06, 19:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by wehrle
So, the health monitor would be of no use here? (I realize though the health monitor would likely be a performance hit if it could be used here.)

Thanks again.
Logs can fill up in a matter of seconds, and implementing preventive measures (increasing the log file size and number of files) is the only reasonable approach.

Obviously, more frequent commits by applications and utilities is also important.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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