### FUNCTION_TYPE = BIND DEFINE AUTHORIZE STATEMENT TRANSACTION HANDLE DESCRIBE

    set ORA_OCI_UCBPKG=ocispy8i
    sqlplus

Note: this example was run under ORACLE OCI v9i.

    OCISPY (Version 0.2.1) for ORACLE OCI v8i and higher.
    Copyright (c) 2001 by Sergey Sikorskiy.
    Copy policy: FREE FOR COMMERCIAL AND NON-COMMERCIAL USE.
    Download last release: http://www.geocities.com/ocispy/

    OCIHandleFree type: OCI_HTYPE_ERROR (error handle)
    OCIHandleAlloc type: OCI_HTYPE_ERROR (error handle)
    OCIHandleAlloc type: OCI_HTYPE_ERROR (error handle)
    OCIHandleAlloc type: OCI_HTYPE_SERVER (server handle)
    OCIHandleAlloc type: OCI_HTYPE_SVCCTX (service handle)
    OCIHandleAlloc type: OCI_HTYPE_SESSION (authentication handle)
    OCIHandleAlloc type: OCI_HTYPE_SESSION (authentication handle)
    OCIAttrGet handle type: OCI_HTYPE_SERVER, attr name: OCI_ATTR_STATEMENT (statement txt in stmt hdl)
    OCIAttrSet handle type: OCI_HTYPE_SVCCTX, attr name: OCI_ATTR_SERVER (the server handle)
    OCIAttrSet handle type: OCI_HTYPE_SESSION, attr name: OCI_ATTR_USERNAME (username attribute)
    OCIAttrSet handle type: OCI_HTYPE_SESSION, attr name: OCI_ATTR_PASSWORD (password attribute)
    OCIAttrSet handle type: OCI_HTYPE_SVCCTX, attr name: OCI_ATTR_SESSION (the user session handle)
    OCISessionBegin
    OCIHandleAlloc type: OCI_HTYPE_STMT (statement handle)
    OCIStmtPrepare stmt:
    [SELECT NULL FROM DUAL FOR UPDATE NOWAIT]

    OCIStmtExecute iters: 0, mode: OCI_DEFAULT
    OCIStmtFetch nrows: 1, mode: OCI_DEFAULT
    OCIHandleFree type: OCI_HTYPE_STMT (statement handle)
    OCIHandleAlloc type: OCI_HTYPE_STMT (statement handle)
    OCIStmtPrepare stmt:
    [BEGIN DBMS_OUTPUT.DISABLE; END;]

    OCIStmtExecute iters: 1, mode: OCI_DEFAULT
    OCIAttrGet handle type: OCI_HTYPE_STMT, attr name: OCI_ATTR_SQLFNCODE (the SQL verb of the statement)
    OCIAttrGet handle type: OCI_HTYPE_SESSION, attr name: OCI_ATTR_SESSLANG (session language handle)
    OCIHandleFree type: OCI_HTYPE_STMT (statement handle)
    OCIAttrGet handle type: OCI_HTYPE_SESSION, attr name: OCI_ATTR_SESSLANG (session language handle)
    OCIHandleAlloc type: OCI_HTYPE_STMT (statement handle)
    OCIStmtPrepare stmt:
    [BEGIN DBMS_APPLICATION_INFO.SET_MODULE(:1,NULL); END;]

    OCIBindByPos pos: 1 val: 'SQL*Plus' type: SQLT_CHR mode: OCI_DEFAULT
    OCIHandleAlloc type: OCI_HTYPE_BIND (bind handle)
    OCIStmtExecute iters: 1, mode: OCI_DEFAULT
    OCIHandleFree type: OCI_HTYPE_STMT (statement handle)
    OCIHandleAlloc type: OCI_HTYPE_STMT (statement handle)
    OCIStmtPrepare stmt:
    [SELECT DECODE('A','A','1','2') FROM DUAL]

    OCIDefineByPos pos: 1 type: SQLT_NUM mode: OCI_DEFAULT
    OCIHandleAlloc type: OCI_HTYPE_DEFINE (define handle)
    OCIStmtExecute iters: 1, mode: OCI_DEFAULT
    OCIHandleFree type: OCI_HTYPE_STMT (statement handle)
    OCIHandleAlloc type: OCI_HTYPE_STMT (statement handle)
    OCIStmtPrepare stmt:
    [select * from dual]

    OCIStmtGetBindInfo
    OCIStmtExecute iters: 0, mode: OCI_DEFAULT
    OCIAttrGet handle type: OCI_HTYPE_STMT, attr name: OCI_ATTR_SQLFNCODE (the SQL verb of the statement)
    OCIAttrGet handle type: OCI_HTYPE_STMT, attr name: OCI_ATTR_PARAM_COUNT (number of column in the select list)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_DATA_TYPE (the SQL type of the column/argument)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_CHARSET_FORM (Character Set Form)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_CHARSET_ID (Character Set ID)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_DATA_SIZE (maximum size of the data)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: UNKNOWN (UNKNOWN)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_NAME (the name of the column/argument)
    OCIAttrGet descriptor type: OCI_DTYPE_PARAM, attr name: OCI_ATTR_DISP_SIZE (the display size)
    OCIDefineByPos pos: 1 type: SQLT_STR mode: OCI_DEFAULT
    OCIHandleAlloc type: OCI_HTYPE_DEFINE (define handle)
    OCIAttrSet handle type: OCI_HTYPE_DEFINE, attr name: OCI_ATTR_CHARSET_FORM (Character Set Form)
    OCIStmtFetch nrows: 15, mode: OCI_DEFAULT
    OCIAttrGet handle type: OCI_HTYPE_STMT, attr name: OCI_ATTR_ROW_COUNT (the rows processed so far)
    OCIHandleFree type: OCI_HTYPE_STMT (statement handle)
    OCISessionEnd
    OCIHandleFree type: OCI_HTYPE_ERROR (error handle)
    OCIHandleFree type: OCI_HTYPE_ERROR (error handle)
    OCIHandleFree type: OCI_HTYPE_ENV (environment handle)

This page has been visited times since December, 2001