Sei sulla pagina 1di 2

Common SQLCODES

0 Successful execution

+100 Not Found


Empty table

+111 For a Create Index, the subpages option has been specified and is ignored. This is OK.

-180 The format, or the range, of the value that is being used as a Timestamp or Date is incorrect
-181 " " " " " " " " " " " " " " " " " " "

-204 1) Tablespace \ Table \ Index \ View not found


2) For Dynamic SQL, either use 'DYNAMICRULES(BIND)' in BIND, or run Dynamic Synonyms
(For FWS, create the Summarization Synonyms by running the FWSCDSYN JCL)

-206 Column not in table or view:


1) Column name is misspelled (look for 'TOKENS=', if problem is in BIND)
2) Check From clause for SELECT or DELETE
3) There is a correlated reference in GROUP BY.
4) There is an unresolved qualified reference in HAVING.

-302 The value of input variable or parameter number is invalid or too large for the target column or the target value.
Check the column type and length of the value or the data type and contents of the input host variable or parameter
position-number. Ensure that the value of the host variable or parameter will fit in the column or contains valid
decimal data.

-305 1) Column is NULLable. Need NULL indicator host variable.


2) For COUNT, AVG, MAX, MIN and SUM, could use NULL indicator host variable (regardless of
column being NULLable or not). Or, rely on checking the SQLCODE.
Equivalent to +100.

-501 Cursor identified in Fetch or Close is not open

-502 Cursor identified in Open is already open

-507 Cursor identified in Delete or Update is not open

-530 Foreign Key invalid on Insert or Update (Referential Integrity issue)

-540 UNIQUE INDEX for a table does not match the PRIMARY KEY for the same table
This SQLCODE will usually not show up when the UNIQUE INDEX is created.

-532 The dependent relationship restricts the deletion of row because of a delete rule of RESTRICT.

-551 Need to run Grant


-552 " " " "
-553 " " " "

562 Grant has already been done; This is OK.

-601 1) Tablespace \ Table \ Index \ View has already been created; This is usually OK.
2) Dynamic Synonyms have already been run; This is OK.
(For FWS, the FWSCDSYN JCL has already created the Summarization Synonyms)

-803 Duplicate key on Insert

-805 1) Need to run Grant


2) Need to run Bind (TSs between DBRM and CLNK/BLNK don't match)
/opt/scribd/conversion/tmp/scratch6619/51580923.doc Page 1 of 2
3) If still getting -805 after a successful Bind, check to see if either the DBRM, or CLNK/BLNK, module is
missing from the PDS (and library concatenation is allowing the successful Bind). Recompile or copy
missing module (only if the code is identical between the 2 environments) to the PDS and Bind.
4) Maybe Xpeditor open

-811 Select returns more than one row Use Fetch?

-818 Need to run Bind (TSs between DBRM and CLNK/BLNK don't match)

-904 Unavailable resource ROLLBACK has NOT been performed


1) Tablespace \ Table \ Index has been migrated
2) Tablespace full?
3) BIND needed?
4) Authority?
5) RACFed in CICS?
6) Database or Tablespace left in an Inconsistent State due to a DB2 utility function failure.
Run '-START DATABASE(ABC) SPACENAM(XYZBBSE) ACCESS(FORCE)'

-905 Resource Limit Exceeded: You should get the following lower case info:
RESOURCE NAME = resource-name LIMIT = limit-amount1 CPU SECONDS
(limit-amount2 SERVICE UNITS) DERIVED FROM limit-source
Where
resource-name: The name of the resource whose limit was exceeded. It is also the name of the column in the DB2
table from which the limit was derived. The resource-name can be ASUTIME, which is the number of CPU
seconds permitted for each SQL statement.
limit-amount1: The maximum number of CPU seconds permitted
limit-amount2: The maximum number in service units permitted
limit-source: The source used to derive the limit-amount: the name of a resource limit specification table, a system
parameter, or the SYSIBM.SYSROUTINES catalog table. If the source is a system parameter, the resource limit
specification table did not contain an applicable entry or an error occurred while accessing the table.

-908 If AutoReBind, Run bind package JCL for module, may have to recompile and bind

-911 Deadlock or Timeout ROLLBACK has been performed

-913 Deadlock or Timeout ROLLBACK has NOT been performed

-922 Authorization failed because of one of the following error types:


- User authorization
- Plan access
- Duplicate exit requested
- Installation error

-923 The connection to DB2 failed for one of the following the reasons:
- DB2 not up
- DB2 not operational
- DB2 shutdown in progress
- DB2 restricted access mode
- Allocation error, possible causes:
- The application plan does not exist.
- The application plan is inoperative. An explicit REBIND or BIND is required.
- The application plan is invalid. Underlying resources have changed.
- A required database, table space, table, or index is unavailable.
- Data set allocation failed for a required data set.
- There is insufficient virtual storage.
- DB2 - CICS attachment not up

-924 - User ID does not have Authority Use correct User ID or have User ID granted authority
- DB2 Subsystem is invalid for environment In batch JCL, change to correct value, e.g., 'DB5D', 'DB2F'
/opt/scribd/conversion/tmp/scratch6619/51580923.doc Page 2 of 2

Potrebbero piacerti anche