how to get particular error logs from diaglog in db2

2k views Asked by At

I am trying the db2diag command to get the all the logs ,captured in diaglog, containing a particular SQLCODE. Can any one help me with the command?

1

There are 1 answers

7
data_henrik On

Use the db2diag command and filter the DATA section for "sqlcode" followed by the particular code:

db2diag -g 'data:=sqlcode: -1063' would search for the SQLCODE -1063 (error SQL1063N).

You probably have the full documentation of the db2diag tool. You could then format the output and extract only the part of the log records you need.