Welcome to NuclearPants.com   
...different bottle, same great taste!
Querying DB2 for Error Messages

Content from :http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/c0mintro.htm

Introduction to Messages

It is assumed that you are familiar with the functions of the operating system where DB2 is installed. You can use the information contained in the following chapters to identify an error or problem and resolve the problem by using the appropriate recovery action. This information can also be used to understand where messages are generated and logged.

Message Structure

Message help describes the cause of a message and describes any action you should take in response to the message.

Message identifiers consist of a three character message prefix, followed by a four or five digit message number, followed by a single letter suffix. For example, SQL1042C. For a list of message prefixes, see Invoking message help and Other DB2 Messages. The single letter suffix describes the severity of the error message.

In general, message identifiers ending with a C are severe messages. Those ending with an E are urgent messages. Message identifiers ending with an N are error messages, those ending with a W are warning messages and an I indicates an informational message.

For ADM messages, message identifiers ending with a C are severe messages. Those ending with an E are urgent messages. Message identifiers ending with a W are important messages and an I are indicates an informational messages.

For SQL messages, message identifiers ending with an N are error messages. Those ending with a W indicate warning or informational messages. Message identifiers ending with a C indicate critical system errors.

Invoking message help

The following DB2 messages are accessible from the command line processor:

Prefix
Description
AMI
messages generated by MQ Application Messaging Interface
ASN
messages generated by DB2 Replication
CCA
messages generated by the Client Configuration Assistant
CLI
messages generated by Call Level Interface
DBA
messages generated by the Database Administration tools
DBI
messages generated by installation and configuration
DBT
messages generated by the Database tools
DWC
messages generated by the Data Warehouse Center
DB2
messages generated by the command line processor
DLFM
messages generated by Data Links File Manager
DQP
messages generated by Query Patroller
GSE
messages generated by the DB2 Spatial Extender
ICC
messages generated by the Information Catalog Center
MQL
messages generated by MQ Listener
SAT
messages generated in a satellite environment
SPM
messages generated by the sync point manager
SQL
messages generated by the database manager when a warning or error condition has been detected.

To invoke message help, open the command line processor and enter:

? XXXnnnnn 

The message text associated with a given SQLSTATE value can be retrieved by issuing:

? nnnnn

  or

? nn 

where nnnnn is a five digit SQLSTATE (alphanumeric) and nn is the two digit SQLSTATE class code (first two digits of the SQLSTATE value).

Note:
The message identifier accepted as a parameter of the db2 command is not case sensitive.

Therefore, the following commands will produce the same result:

  • ? SQL0000N
  • ? sql0000
  • ? SQL0000w

To invoke message help on the command line of a unix-based system, enter:

db2 "? XXXnnnnn"

where XXX represents a valid message prefix
and nnnnn represents a valid message number.

If the message text is too long for your screen, use the following command (on unix-based systems and others which support 'more'):

db2 "? XXXnnnnn" | more 

Other DB2 Messages

Some DB2 components return messages that are not available online or are not described in this manual. Some of the message prefixes may include:

ADM
messages generated by many DB2 components. These messages are written in the Administration Notification log file and are intended to provide additional information to System Administrators.
Note:
Although the ADM messages are available for reference, the messages are not available online.
AUD
messages generated by the DB2 Audit facility.
DIA
diagnostics messages generated by many DB2 components. These messages are written in the diagnostics log file db2diag.log, and are intended to provide additional information for users and DB2 service personnel when investigating errors.
GOV
messages generated by the DB2 governor utility.

In most cases, these messages provide sufficient information to determine the cause of the warning or error. For more information on the command or utility that generated the messages, please refer to the appropriate manual where the command or utility is documented.

Other Message Sources

When running other programs on the system, you may receive messages with prefixes other than those mentioned in this reference.

For information on these messages, refer to the information available for that program product.