3095931 - How to truncate/archive the CLI client db2diag.log

 3095931 - How to truncate/archive the CLI client db2diag.log

SAP Knowledge Base Article, Version: 1, Released On: 11.09.2021










Symptom

To archive the Db2 database level db2diag.log you would run the following command:

db2diag -A


However, the CLI client maintains its own db2diag.log (below) which may grow large and require archiving as well.

/usr/sap/<SID>/SYS/global/db6/db2dump/db2diag.log


See resolution below for steps on how to archive the CLI client db2diag.log.


Environment

DB6 (DB2 LUW) any version.


Cause

CLI client specific db2diag.log grows large and requires maintenance.


Resolution

First, you'll use the 'db2diag' binary in the CLI installation directory to archive the CLI client db2diag.log:

/usr/sap/<SID>/SYS/global/db6/<OS>/db6_clidriver/bin/db2diag


Here are the steps:


 cd  /usr/sap/<SID>/SYS/global/db6/LINUXX86_64/db6_clidriver/bin

./db2diag -A /usr/sap/<SID>/SYS/global/db6/db2dump/db2diag.log

    db2diag: Moving "/usr/sap/DB6/SYS/global/db6/db2dump/db2diag.log"

                  to        "/usr/sap/DB6/SYS/global/db6/db2dump/db2diag.log_2021-09-07-20.36.30"

That's it.


Products

Products

SAP Solution Manager 7.2

Comments

Popular Posts