In DB2 LUW V10.5 on Windows, is there a way to manually rotate the diaglog log file? Currently, it is almost 1GB and it is difficult to open it to find info.The diagsize is set to 0 and I cannot change it due to other constraints.
DB2 LUW V10.5 on Windows. How to Manually rotate the Diaglog using scripts
db2db2-luw
Related Question
- Db2 – List of open (uncommitted transactions) in DB2 LUW
- DB2: Database alias already exists when cataloging
- Db2 – Does DB2 LUW v10.5 Support Windows Authentication and How is it Set
- Db2 – way to run parameterized update statements using only DB2 commandline and bash
- DB2 on Windows – Fix Encoding in db2cmd and JDBC
- DB2 LUW – Choosing Between 4K, 8K, 16K, and 32K Tablespaces
- Db2 – How to identify row change timestamp columns in Db2 Table
Best Answer
The easiest way to rotate the db2diag.log file is to use the
db2diag
utility with the-A
("archive") option. It will rename the current db2diag.log file (appending the current timestamp to the file name).db2diag
is also quite useful for searching through huge db2diag.log files (instead of trying to open them in a text editor). It has many options to filter the file based on time, content of messages, etc. You can read more in the documentation.