Wednesday 10 February 2010

db2diag log analysis tool

db2diag is one file which gives clues to error that might have occurred to database.
But instead of going to db2diag file we can run a command from CLP to see the error messages and info about any specific SQL error code.

It is the log analysis tool and it allows you to search, filter, and format the DB2 diagnostic logs. One of the simple examples is that I wanted to see when errors or warnings were produced on my test system. I could do that by calling:

db2diag -l Error,Warning -fmt "%ts %level %db"

sample output:
2010-02-09-13.46.24.828000 Error XXLIC_DB
2010-02-09-13.46.24.828000 Error XXLIC_DB
2010-02-09-13.46.25.046000 Warning XXLIC_DB
2010-02-09-13.46.25.062000 Warning XXLIC_DB
2010-02-09-13.46.25.093000 Warning XXLIC_DB

The output is much quicker to digest than the diagnostic itself.

what I have been upto recently...

This is the first entry in 2010..must say being regular with blog is something I need to prioritize as this is not only a way to share the knowledge and experience which many can find useful but can be very handy to place important stuff which I can come back to refer....
for the past month I have been traveling to many database sites and making migration, version upgrade and other fine tuning tasks...
Troubleshooting is one thing that we come across often so I m going do dedicate one post for that.