In general, there are two categories of Db2
Warehouse log files, container logs
and Db2
Warehouse diagnostic logs.
Procedure
-
To view Db2
Warehouse container log files, do the following:
-
Get the names of all Db2
Warehouse database service pods:
kubectl -n ${PROJECT_CPD_INST_OPERANDS} get po --selector type=engine
-
Use
kubectl logs to view the Db2
Warehouse database container
logs:
kubectl -n ${PROJECT_CPD_INST_OPERANDS} logs <Db2 engine POD name> | more -
-
To view Db2
Warehouse diagnostic log files, do the following:
-
Exec into the Db2 Warehouse pod with catalog partition.
-
Go to the Db2
Warehouse diagnostic logs folder
/mnt/blumeta0/db2/log/.
Tip: The OS environment variable DIAGPATH defines the Db2
Warehouse diagnostic
logs folder.
-
Sort all the db2diag.*.log files by timestamp and view/tail the most recent one:
ls -latr ${DIAGPATH}/db2diag.*.log