Sample Errors With SQL Error Codes
DB2NSFInit Error creating DB2 database DOMINO sqlcode=-1092.: Failed creating DB2 Database.
DB2NSFInit Error setting configuration parms for DB2 database DOMINO sqlcode=-5001.: Error setting configuration parameters for DB2 database.
Failed when DB2 was fetching a note. DB2-External function exception.: 38503 - [IBM][CLI Driver][DB2/NT] SQL0430N User defined function "DOMINO.ISREADER4" (specific name "SQL071107123038201") has abnormally terminated. SQLSTATE=38503 -*LOCAL.DB2.080404010142(nSERVER)
External function exception.: 38503 - [IBM][CLI Driver][DB2/LINUXX8664] SQL0430N User defined function "DOMINO.UDFADMIN" (specific name "SQL080516111334502") has abnormally terminated. SQLSTATE=38503 - 10.111.100.76.29098.08051515102(server)
How To Find Out What The SQL Error Code Means
First translate the error code to match the following format: SQL0430N
For example, for the first sql error code example we had: sqlcode=-1092, this corresponds to SQL1092N. The N is appended to the sql code number when the number is negative, i.e. if it had been sqlcode=1092, it would correspond to SQL1092 with no N.
Doing the same thing with the second example, we get: SQL5001N.
After obtaining the SQL Error Code in the correct format, you can find out its meaning in 2 ways:
Look it up in the DB2 Infocenter
Look it up manually using a command prompt or DB2 CLP
How To Find a SQL Error Code if One is not Printed to the Domino Console
We receive SQL Error Codes because these errors are actually DB2 errors, not Domino errors. There is a file that is automatically created in the DB2 program directory/instance name (by default C:\IBM\SQLLIB\DB2) called db2diag.log. This logs all DB2 related errors, including SQL error codes, so if you do not see a SQL error code on the Domino console, check db2diag.log.