- CATALOG_NAME
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
and the constraint that caused the error is a referential, check, or
unique constraint, the server name of the table that owns the constraint is
returned.
If the returned SQLSTATE is class 42 (Syntax Error or Access
Rule Violation), the server name of the table that caused the error is returned.
If the returned SQLSTATE is class 44 (WITH CHECK OPTION Violation),
the server name of the view that caused the error is returned. Otherwise,
the empty string is returned.
- CLASS_ORIGIN
- Returns 'ISO 9075' for those SQLSTATEs whose class is defined by ISO
9075. Returns 'ISO/IEC 13249' for those SQLSTATEs whose class is defined by
SQL/MM. Returns 'DB2 UDB SQL' for those SQLSTATEs whose class is defined by IBM DB2 Universal Database(TM) SQL. Returns the value set by user written code
if available. Otherwise, the empty string is returned.
- COLUMN_NAME
- If the returned SQLSTATE is class 42 (Syntax Error or Access Rule Violation)
and the error was caused by an inaccessible column, the name of the column
that caused the error is returned. Otherwise, the empty string is returned.
- CONDITION_IDENTIFIER
- If the value of the RETURNED_SQLSTATE corresponds to an unhandled user-defined
exception (SQLSTATE 45000), then the condition name of the user-defined exception
is returned.
- CONDITION_NUMBER
- Returns the number of the conditions.
- CONSTRAINT_CATALOG
- If the returned SQLSTATE is:
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
the name of the server that contains the table that contains the constraint
that caused the error is returned. Otherwise, the empty string is returned.
- CONSTRAINT_NAME
- If the returned SQLSTATE is:
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
the name of the constraint that caused the error is returned. Otherwise,
the empty string is returned.
- CONSTRAINT_SCHEMA
- If the returned SQLSTATE is:
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
the name of the schema of the constraint that caused the error is returned.
Otherwise, the empty string is returned.
- CURSOR_NAME
- If the returned SQLSTATE is class 24 (Invalid Cursor State), the name
of the cursor is returned. Otherwise, the empty string is returned.
- DB2_ERROR_CODE1
- Returns an internal error code. Otherwise, the value zero is returned.
- DB2_ERROR_CODE2
- Returns an internal error code. Otherwise, the value zero is returned.
- DB2_ERROR_CODE3
- Returns an internal error code. Otherwise, the value zero is returned.
- DB2_ERROR_CODE4
- Returns an internal error code. Otherwise, the value zero is returned.
- DB2_INTERNAL_ERROR_POINTER
- For some errors, this will be a negative value that is an internal error
pointer. Otherwise, the value zero is returned.
- DB2_LINE_NUMBER
- For a CREATE PROCEDURE for an SQL function, SQL procedure,
or SQL trigger where an error is encountered parsing the SQL procedure body,
returns the line number where the error possibly occurred. Otherwise, the
value zero is returned.
- DB2_MESSAGE_ID
- Returns the message ID corresponding to the MESSAGE_TEXT.
- DB2_MESSAGE_ID1
- Returns the underlying i5/OS CPF escape message that originally caused
this error. Otherwise, the empty string is returned.
- DB2_MESSAGE_ID2
- Returns the underlying i5/OS CPD diagnostic message that originally
caused this error. Otherwise, the empty string is returned.
- DB2_MESSAGE_KEY
- For a CALL statement, returns the i5/OS message key of the error that
caused the procedure to fail. For a trigger error in a DELETE, INSERT, or
UPDATE statement, returns the message key of the error that was signaled from
the trigger program. The i5/OS QMHRCVPM API can be used to return the message
description and message data for the message key. Otherwise, the value zero
is returned.
- DB2_MODULE_DETECTING_ERROR
- Returns an identifier indicating which module detected the error. For
a SIGNAL statement issued from a routine, the value 'ROUTINE' is returned.
For other SIGNAL statements, the value 'PROGRAM' is returned.
- DB2_NUMBER_FAILING_STATEMENTS
- For a NOT ATOMIC embedded compound SQL statement, returns the number
of statements that failed. Otherwise, the value zero is returned.
- DB2_OFFSET
- For a CREATE PROCEDURE for an SQL procedure where an error is encountered
parsing the SQL procedure body, returns the offset into the line number where
the error possibly occurred, if available. For an EXECUTE IMMEDIATE or a PREPARE
statement where an error is encountered parsing the source statement, returns
the offset into the source statement where the error possibly occurred. Otherwise,
the value zero is returned.
- DB2_ORDINAL_TOKEN_n
- Returns the nth token. n must be a value from 1 to 100. For example,
DB2_ORDINAL_TOKEN_1 would return the value of the first token, DB2_ORDINAL_TOKEN_2
the second token. A numeric value for a token is converted to character before
being returned. If there is no value for the token, the empty string is returned.
- DB2_PARTITION_NUMBER
- For a partitioned database, returns the partition number of the database
partition that encountered the error or warning. If no errors or warnings
were encountered, returns the partition number of the current node. Otherwise,
the value zero is returned.
- DB2_REASON_CODE
- Returns the reason code for errors that have a reason code token in
the message text. Otherwise, the value zero is returned.
- DB2_RETURNED_SQLCODE
- Returns the SQLCODE for the specified diagnostic.
- DB2_ROW_NUMBER
- If the previous SQL statement is a multiple row insert or a multiple
row fetch, returns the number of the row where the condition was encountered,
when such a value is available and applicable. Otherwise, the value zero is
returned.
- DB2_SQLERRD_SET
- Returns Y to indicate that the DB2_SQLERRD1 through DB2_SQLERRD6 items
may be set. Otherwise, a blank is returned.
- DB2_SQLERRD1
- Returns the value of SQLERRD(1) from the SQLCA returned by the server.
- DB2_SQLERRD2
- Returns the value of SQLERRD(2) from the SQLCA returned by the server.
- DB2_SQLERRD3
- Returns the value of SQLERRD(3) from the SQLCA returned by the server.
- DB2_SQLERRD4
- Returns the value of SQLERRD(4) from the SQLCA returned by the server.
- DB2_SQLERRD5
- Returns the value of SQLERRD(5) from the SQLCA returned by the server.
- DB2_SQLERRD6
- Returns the value of SQLERRD(6) from the SQLCA returned by the server.
- DB2_TOKEN_COUNT
- Returns the number of tokens available for the specified diagnostic.
- DB2_TOKEN_STRING
- Returns a X'FF' delimited string of the tokens for the specified diagnostic.
- MESSAGE_LENGTH
- Identifies the length (in characters) of the message text of the error,
warning, or successful completion returned from the previous SQL statement
that was executed.
- MESSAGE_OCTET_LENGTH
- Identifies the length (in bytes) of the message text of the error, warning,
or successful completion returned from the previous SQL statement that was
executed.
- MESSAGE_TEXT
- Identifies the message text of the error, warning, or successful completion
returned from the previous SQL statement that was executed.
- PARAMETER_MODE
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition is related to the ith parameter
of the routine, the parameter mode of the ith parameter
is returned. Otherwise, the empty string is returned.
- PARAMETER_NAME
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
the condition is related to the ith parameter
of the routine, and a parameter name was specified for the parameter when
the routine was created, the parameter name of the ith
parameter is returned. Otherwise, the empty string is returned.
- PARAMETER_ORDINAL_POSITION
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition is related to the ith parameter
of the routine, the value of i is returned. Otherwise,
the empty string is returned.
- RETURNED_SQLSTATE
- Returns the SQLSTATE for the specified diagnostic.
- ROUTINE_CATALOG
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
and the condition is related to the ith parameter
of the routine, or if the returned SQLSTATE is:
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition was raised as the result of an assignment to an SQL
parameter during an routine invocation, the server name of the routine is
returned. Otherwise, the empty string is returned.
- ROUTINE_NAME
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
and the condition is related to the ith parameter
of the routine, or if the returned SQLSTATE is:
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition was raised as the result of an assignment to an SQL
parameter during an routine invocation, the name of the routine is returned.
Otherwise, the empty string is returned.
- ROUTINE_SCHEMA
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
and the condition is related to the ith parameter
of the routine, or if the returned SQLSTATE is:
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition was raised as the result of an assignment to an SQL
parameter during an routine invocation, the schema name of the routine is
returned. Otherwise, the empty string is returned.
- SCHEMA_NAME
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
and the constraint that caused the error is a referential, check, or
unique constraint, the schema name of the table that owns the constraint is
returned.
If the returned SQLSTATE is class 42 (Syntax Error or Access
Rule Violation), the schema name of the table that caused the error is returned.
If the returned SQLSTATE is class 44 (WITH CHECK OPTION Violation),
the schema name of the view that caused the error is returned. Otherwise,
the empty string is returned.
- SERVER_NAME
- If the previous SQL statement is a CONNECT, DISCONNECT, or SET CONNECTION,
the name of the server specified in the previous statement is returned. Otherwise,
the name of the server where the statement executed is returned.
- SPECIFIC_NAME
- If the returned SQLSTATE is:
- class 39 (External Routine Invocation Exception), or
- class 38 (External Routine Exception), or
- class 2F (SQL Routine Exception), or
and the condition is related to the ith parameter
of the routine, or if the returned SQLSTATE is:
- class 22 (Data Exception), or
- class 23 (Integrity Constraint Violation), or
- class 01 (Warning)
and the condition was raised as the result of an assignment to an SQL
parameter during an routine invocation, the specific name of the procedure
or function is returned. Otherwise, the empty string is returned.
- SUBCLASS_ORIGIN
- Returns 'ISO 9075' for those SQLSTATEs whose subclass is defined by
ISO 9075. Returns 'ISO/IEC 9579' for those SQLSTATEs whose subclass is defined
by RDA. Returns 'ISO/IEC 13249-1', 'ISO/IEC 13249-2', 'ISO/IEC 13249-3', 'ISO/IEC
13249-4', or 'ISO/IEC 13249-5' for those SQLSTATEs whose subclass is defined
SQL/MM. Returns 'DB2 UDB SQL' for those SQLSTATEs whose subclass is defined
by IBM DB2 Universal Database SQL. Returns the value
set by user written code if available. Otherwise, the empty string is returned.
- TABLE_NAME
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 23 (Integrity Constraint Violation), or
- class 27 (Triggered Data Change Violation), or
- 40002 (Transaction Rollback - Integrity Constraint Violation),
and the constraint that caused the error is a referential, check, or
unique constraint, the table name that owns the constraint is returned.
If the returned SQLSTATE is class 42 (Syntax Error or Access Rule Violation),
the table name that caused the error is returned.
If the returned SQLSTATE
is class 44 (WITH CHECK OPTION Violation), the table name that caused the
error is returned. Otherwise, the empty string is returned.
- TRIGGER_CATALOG
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 27 (Triggered Data Change Violation),
the name of the trigger is returned. Otherwise, the empty string is returned.
- TRIGGER_NAME
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 27 (Triggered Data Change Violation),
the name of the trigger is returned. Otherwise, the empty string is returned.
- TRIGGER_SCHEMA
- If the returned SQLSTATE is:
- class 09 (Triggered Action Exception), or
- class 27 (Triggered Data Change Violation),
the schema name of the trigger is returned. Otherwise, the empty string
is returned.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.