Diagnostic Error Files

DB2 records warnings and errors as a normal part of its operation. By default, error logs are placed in the sqllib<instance-name> directory in Windows and OS/2, and in the <instance-owner>/sqllib/db2dump directory in Unix. You can modify the location where errors are logged by setting the DIAGPATH variable in the database manager configuration.

db2diag.log

This is the primary diagnostic log for DB2 UDB and should be the first point of reference for the administrator whenever unexpected errors occur. The DIAGPATH parameter can be used to alter the location that this file is written to. The default location is sqllib/db2dump for UNIX platforms and sqllib/db2 for Windows platforms. The DIAGLEVEL parameter controls exactly how much information is logged in the file.

The DIAGPATH parameter is a database manager configuration parameter, so you could change it in the Control Center by right-clicking on the appropriate instance and clicking Configure. You also can use the CLP or Command Center.

UPDATE DBM CFG USING DIAGPATH <valid pathname for a file>

The level of diagnostic information, DIAGLEVEL, is also a database manager configuration parameter. The DIAGLEVEL parameter can be set to the following values:

0— No diagnostic data (not recommended)

1— Severe errors only

2— All errors (severe and not severe)

3— All errors and warnings (default)

4— All errors, warnings, informational messages, and other internal diagnostic information

The default DIAGLEVEL is usually sufficient for normal DB2 UDB operations. However, during the initial setup of DB2, or when errors are occurring, the DIAGLEVEL could be updated to gather as much information as possible.

UPDATE DBM CFG USING DIAGLEVEL 4

The db2diag.log file is used mostly by database administrators, but application programmers may need to look at this log as well, particularly if they are having troubles with their UDFs or stored procedures. For example, there could be information in here concerning failed DARI (Fenced Stored Procedures) processes.

db2alert.log

If an error is determined by DB2 to be an alert, then an entry is made in the db2alert.log file and to the operating system logs. An alert is an error notification when a severe error occurs. Alerts can also trigger SNMP traps.

Dump files

Sometimes, when a DB2 process or thread fails and signals an error, it will also log extra information in external binary dump files. These files are more or less unreadable and are intended for DB2 Customer Service Personnel.

Trap files

DB2 creates a trap file if an operating system trap/segmentation violation/exception occurs.

jdbcerr.log

A DB2 Java Daemon process logs its errors in this file, located in your DIAGPATH, or in the default error-logging directory. This file will indicate successful or failed attempts for the startup of the JDBC net driver. Unfortunately, many of the error codes that show up for EINFO are not documented. Some of the error codes logged here may actually be TCP/IP protocol errors. For example, error code '2' probably indicates that DB2PATH is set incorrectly. For the most part, this file is only useful to DB2 Service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.101.72