SQL$HELP72.HLB  —  GET_DIAGNOSTICS, Arguments  statement-item-name
    Specifies the kind of diagnostic information you can retrieve
    about a previously executed SQL statement. You can gather the
    following diagnostic data:

    o  ACCESS_MODE returns the character string READ ONLY, READ
       WRITE, or BATCH UPDATE to indicate the type of transaction
       that is active. These character strings are of the CHAR data
       type. The argument also returns NONE when no transaction is
       active. See the SET_TRANSACTION statement for a description of
       transaction access modes.

    o  CALLING_ROUTINE returns a string of data type CHAR(31) of
       the name of the calling routine. If there is no name for the
       calling routine, spaces are returned.

    o  CONNECTION_NAME returns the current connection name.

    o  DATABASE_HANDLE returns the current database handle (or
       stream) identifier.

    o  CURRENT_ROW returns the integer value for the number of rows
       that have been fetched by the innermost FOR control statement.

    o  GLOBAL_TRANSACTION returns an integer of 1 when a global
       transaction is active and an integer of 0 otherwise.

    o  ISOLATION_LEVEL returns the character string READ COMMITTED,
       REPEATABLE READ, or SERIALIZABLE to indicate the isolation
       level of a transaction. These character strings are of
       the CHAR data type. The argument also returns NONE when no
       transaction is active. See the SET_TRANSACTION statement for a
       description of transaction isolation
       levels.

    o  LIMIT_CPU_TIME returns an INTEGER value for the session's
       execution CPU time limit in seconds. If zero (0)
       is returned it is equivalent to no CPU time limit.
       This value is established by either the logical name
       RDMS$BIND_QG_EXEC_CPU_TIMEOUT or the SET QUERY EXECUTION LIMIT
       CPU TIME statement.

    o  LIMIT_ELAPSED_TIME returns an INTEGER value for the session's
       execution elapsed time limit in seconds. If zero (0) is
       returned it is equivalent to no elapsed time limit. This value
       is established by either the logical name RDMS$BIND_QG_EXEC_
       ELAPSED_TIMEOUT or the SET QUERY EXECUTION LIMIT ELAPSED TIME
       statement.

    o  LIMIT_ROWS_FETCHED returns a BIGINT value for the session's
       row limit. If zero (0) is returned, it is equivalent to no
       row limit. This value is established by the logical name
       RDMS$BIND_QG_REC_LIMIT.

    o  ROW_COUNT returns an integer for the number of rows affected
       by an INSERT, searched UPDATE, searched DELETE, or a FOR
       cursor loop statement.

    o  TRACE_ENABLED returns an INTEGER value to indicate if the
       TRACE flag has been enabled using the statement SET FLAGS
       'TRACE', or by either of the logical names RDMS$SET_FLAGS
       or RDMS$DEBUG_FLAGS. A zero (0) is returned if the flag is
       disabled, otherwise a one (1) is returned to indicate that
       tracing is enabled.

    o  TRANSACTION_ACTIVE returns an integer of 1 when a transaction
       is active and an integer of 0 otherwise.

    o  TRANSACTIONS_COMMITTED returns an integer value for the number
       of transactions that have been committed during the processing
       of a multistatement procedure.

    o  TRANSACTIONS_ROLLED_BACK returns an integer value for the
       number of transactions that have been rolled back during the
       processing of a multistatement procedure.

    o  TRANSACTION_CHANGE_ALLOWED

       There are many situations where the SQL language programmer
       would like to start or end a transaction but does not know if
       a transaction statement (SET TRANSACTION, START TRANSACTION,
       COMMIT or ROLLBACK) is currently permitted. The transaction
       statements are not permitted in the following cases:

       o  During a multi-database or global transaction. In this case
          the transaction must be coordinated by the client, not a
          server-based procedure.

       o  When a BEGIN ATOMIC compound statement is in the outer
          scope.

       o  When a FOR cursor loop is active in an outer scope.

       The TRANSACTION_CHANGE_ALLOWED clause allows the programmer
       to detect these restricted locations and conditionally execute
       a COMMIT, ROLLBACK, START TRANSACTION or SET TRANSACTION as
       needed.

       The result data type is INTEGER. If transaction changes are
       permitted then a value one (1) will be assigned. Otherwise the
       result will be zero (0).

    o  HOT_STANDBY_MODE

       This option returns a text string that indicates if this
       database is participating in a Hot Standby configuration as
       master (returns 'MASTER'), or as standby (returns 'STANDBY'),
       or is not in such a configuration (returns 'NONE').

       The result data type is CHAR (31).

    o  SERVER_IDENTIFICATION

       This option returns a text string containing the Oracle Rdb
       release number. This is useful for log file annotation.

       The result data type is CHAR (31).

    o  TRANSACTION_TIMESTAMP

       This option returns the date and time that the last
       transaction was started. If a transaction is not active, the
       returned date and time may be for a prior transaction.

                                      NOTE

          The database server will start transactions when
          performing database operations. So, this timestamp may
          reflect the time of an internal transaction.

       If the default date format is SQL99, this option returns a
       value with the data type TIMESTAMP(2), otherwise it returns a
       DATE (VMS) data type. The default date format can be changed
       using either the SET DIALECT or SET DEFAULT DATE FORMAT
       statements, or one of the associated module attributes.

    o  TRANSACTION_SEQUENCE

       This is the transaction sequence number (TSN) assigned to
       the most recently started transaction. The TSN is a unique
       indicator of database transaction activity, however, please
       note that the TSN may be reused in some cases. The TSN
       for a READ ONLY transaction reflects the transaction state
       which is visible to the transaction and, therefore, it was
       previously assigned to a READ WRITE transaction. If a READ
       WRITE transaction does not perform database I/O or was rolled
       back, that TSN may be reused by a subsequent READ WRITE
       transaction.

       This option returns a BIGINT data type.
Close Help