When you run the “Mgrqcmdl –query=log” command, DB error, warning, or informational codes may be returned:
| 
 | 
 | 
 | 
| 
 1   
 | 
 DB_ERR_REC_LOCKED 
 | 
 Record is locked. 
 | 
| 
 2   
 | 
 DB_ERR_DUP_KEY 
 | 
 Duplicate key. 
 | 
| 
 3   
 | 
 DB_ERR_CONSTR_FAIL 
 | 
 Constraint failure. 
 | 
| 
 4 
 | 
 DB_ERR_TRIGGER_FAIL 
 | 
 Trigger failure. 
 | 
| 
 5 
 | 
 DB_ERR_REC_UPDATED 
 | 
 Record was updated. 
 | 
| 
 6 
 | 
 DB_ERR_NO_ROWS_AFFECTED 
 | 
 Record was updated by another user. 
 | 
| 
 7 
 | 
 DB_ERR_UPDATE_FAIL 
 | 
 Record update failed. 
 | 
| 
 9 
 | 
 DB_ERR_EXEC_SQL 
 | 
 Error executing the SQL command. 
 | 
| 
 10 
 | 
 DB_ERR_BAD_SQL_CMD 
 | 
 Invalid SQL command. 
 | 
| 
 11 
 | 
 DB_ERR_BADINI 
 | 
 Database initialization failed. 
 | 
| 
 12 
 | 
 DB_ERR_BADNAME 
 | 
 Invalid table name. 
 | 
| 
 13 
 | 
 DB_ERR_DAMAGED 
 | 
 Damaged table. 
 | 
| 
 15 
 | 
 DB_ERR_BADOPEN 
 | 
 Table could not be opened. 
 | 
| 
 16 
 | 
 DB_ERR_BADCLOSE 
 | 
 Failed to close table. 
 | 
| 
 17 
 | 
 DB_ERR_RSRC_LOCKED 
 | 
 Waiting for lock in database. 
 | 
| 
 18 
 | 
 DB_ERR_REC_LOCKED_NOBUF 
 | 
 Waiting to fetch locked row. 
 | 
| 
 19 
 | 
 DB_ERR_NODEF 
 | 
 Database definition could not be loaded. 
 | 
| 
 20 
 | 
 DB_ERR_REC_LOCKED_NOW 
 | 
 Record is locked. 
 | 
| 
 23 
 | 
 DB_ERR_READONLY 
 | 
 Table opened for read and attempt was made to write to it. 
 | 
| 
 25 
 | 
 DB_ERR_CAPACITY 
 | 
 Valid only when using Demo license. 
 | 
| 
 26 
 | 
 DB_ERR_TRANS_COMMIT 
 | 
 Commit transaction operation failed. 
 | 
| 
 27 
 | 
 DB_ERR_TRANS_OPEN 
 | 
 Begin transaction failed. 
 | 
| 
 28 
 | 
 DB_ERR_TRANS_ABORT 
 | 
 Rollback transaction operation failed. 
 | 
| 
 29 
 | 
 DB_ERR_BADDEF 
 | 
 Definition mismatch. 
 | 
| 
 30 
 | 
 DB_ERR_INVALID_OWNR 
 | 
 Invalid access key to table. 
 | 
| 
 31 
 | 
 DB_ERR_CLR_OWNR_FAIL 
 | 
 Failed to remove access key. 
 | 
| 
 32 
 | 
 DB_ERR_ALTER_TBL 
 | 
 Database failed to alter table. 
 | 
| 
 33 
 | 
 DB_ERR_SORT_TBL 
 | 
 Database failed to sort table. 
 | 
| 
 34   
 | 
 DB_ERR_CANOT_REMOVE 
 | 
 Table could not be deleted. 
 | 
| 
 35 
 | 
 DB_ERR_CANOT_RENAME 
 | 
 Table cannot be renamed. 
 | 
| 
 37 
 | 
 DB_ERR_TARGET_FILE_EXIST 
 | 
 Table creation failed. Table already exists. 
 | 
| 
 38 
 | 
 DB_ERR_FILE_IS_VIEW 
 | 
 Table is a view. 
 | 
| 
 39 
 | 
 DB_ERR_CANOT_COPY 
 | 
 Cannot create; drop, or copy a view. 
 | 
| 
 40 
 | 
 DB_ERR_STOP 
 | 
 Error executing the SQL command. 
 | 
| 
 41 
 | 
 DB_ERR_STR_BAD_NAME 
 | 
 Invalid table name. 
 | 
| 
 43 
 | 
 DB_ERR_BAD_QRY 
 | 
 IBM i – Invalid Open Query. 
 | 
| 
 46 
 | 
 DB_WRN_CACHE_TOO_BIG 
 | 
 Not enough memory. Table cache was not started. 
 | 
| 
 47   
 | 
 DB_ERR_LOSTREC 
 | 
 Record was lost. 
 | 
| 
 48 
 | 
 DB_ERR_FILE_LOCKED 
 | 
 Unable to lock table. 
 | 
| 
 49 
 | 
 DB_ERR_MAX_CONN_EX 
 | 
 Maximum connections reached. 
 | 
| 
 50 
 | 
 DB_ERR_DEADLOCK 
 | 
 Deadlock. 
 | 
| 
 51   
 | 
 DB_ERR_BADCREATE 
 | 
 Create error. 
 | 
| 
 52 
 | 
 DB_ERR_FIL_NOT_EXIST 
 | 
 Table does not exist. 
 | 
| 
 54 
 | 
 DB_ERR_IDX_CREATE_FAIL 
 | 
 Table index cannot be created. 
 | 
| 
 55 
 | 
 DB_ERR_CONNECT_FAIL 
 | 
 Cannot connect to the database. 
 | 
| 
 56 
 | 
 DB_ERR_FATAL 
 | 
 Unknown fatal error. 
 | 
| 
 57 
 | 
 DB_ERR_INSERT_FAIL 
 | 
 Record cannot be inserted. 
 | 
| 
 58 
 | 
 DB_ERR_DELETE_FAIL 
 | 
 Record cannot be deleted. 
 | 
| 
 60 
 | 
 DB_ERR_NOREC 
 | 
 No more records in table (usually returned when reaching the end or start of table, depending on the order of the retrieval). 
 | 
| 
 61   
 | 
 DB_ERR_NOT_EXIST 
 | 
 Table does not exist. 
 | 
| 
 62   
 | 
 DB_ERR_GET_USR_PWD 
 | 
 Incorrect database password. 
 | 
| 
 64 
 | 
 DB_ERR_NOTSUPPORT_FUNC 
 | 
 IBM i – unsupported function in the Magic Where expression. 
 |