How to search db2diag tool for a specific timeframe

25 January,2017 by Tom Collins

The backup administrator was troubleshooting a DB2 backup failure with the vendor and requested the db2diag output for a specific timeframe .

The steps I took to extract the information from the db2diag tool were:

  1. Log on to the DB2 LUW instance with a suitable logon account.
  2. Go to the path of the db2diag log. Normally the db2diag log location is sqllib/db2dump but you can also check the db2 dbm cfg command. Look for the DIAGPATH parameter value. If you’re on Linux you can use the grep command - db2 get dbm cfg | grep DIAGPATH
  3. Once you have moved to the DIAGPATH location , you’ll be able to execute the db2diag command. In this db2diag command example , you’ll need to know the specific timeframe and write the command with certain time format

 

--search all db2diag between the 24th January 2017 19:00   to 24th January 2017 23:59:59

db2diag  -time 2017-01-24-19.00:2017-01-24-23.59.59

--search all db2diag between the 24th January 2017 19:00   to 24th January 2017 23:59:59 
--restricting the search just for my database DB1

db2diag -g db=DB1 -time 2017-01-24-19.00:2017-01-24-23.59.59

 

The amount of detail in the db2diag will be dependant on the DIAGLEVEL setting. A useful skill to develop is Analyzing a DB2 trap file

 Read More

db2diag.log file delete on Linux and DB2

DB2 – Managing Diagnostic Logs

How to display DB2 db2diag.log appended records using follow ...

 

Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to search db2diag tool for a specific timeframe

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright