Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

A
Handle and Descriptor Attributes

This appendix describes the attributes for OCI handles and descriptors, which can be read with OCIAttrGet(), and modified with OCIAttrSet().

Conventions

For each handle type, the attributes which can be read or changed are listed. Each attribute listing includes the following information:

Mode

The following modes are valid:

READ - the attribute can be read using OCIAttrGet()

WRITE - the attribute can be modified using OCIAttrSet()

READ/WRITE - the attribute can be read using OCIAttrGet(), and it can be modified using OCIAttrSet().

Description

This is a description of the purpose of the attribute.

Attribute Datatype

This is the datatype of the attribute. If necessary, a distinction is made between the datatype for READ and WRITE modes.

Valid Values

In some cases, only certain values are allowed, and they are listed here.

Example

In some cases an example is included.

Environment Handle Attributes

OCI_ATTR_BIND_DN

Mode

READ/WRITE

Description

The login name (DN) to use when connecting to the LDAP server.

Attribute Datatype

text *

OCI_ATTR_CACHE_ARRAYFLUSH

Mode

READ/WRITE

Description

When this attribute is set to TRUE, during OCICacheFlush() the objects that belong to the same table are flushed together, which can considerably improve performance. This mode should only be used when the order in which the objects are flushed is not important. During this mode it is not guaranteed that the order in which the objects are marked dirty is preserved.

See Also:

"Object Cache Parameters" and "Flushing Changes to Server"

Attribute Datatype

boolean

OCI_ATTR_CACHE_MAX_SIZE

Mode

READ/WRITE

Description

Sets the maximum size (high watermark) for the client-side object cache as a percentage of the optimal size. Set the value at 110% of the optimal size (OCI_ATTR_CACHE_OPT_SIZE). The object cache uses the maximum and optimal values for freeing unused memory in the object cache.

See Also:

"Object Cache Parameters"

Attribute Datatype

ub4 *

OCI_ATTR_CACHE_OPT_SIZE

Mode

READ/WRITE

Description

Sets the optimal size for the client-side object cache in bytes. The default value is 8M bytes.

See Also:

"Object Cache Parameters"

Attribute Datatype

ub4 *

OCI_ATTR_ENV_CHARSET_ID

Mode

READ

Description

Local (client-side) character set ID. Users can update this setting only after creating the environment handle but before calling any other OCI functions. This restriction ensures the consistency among data and metadata in the same environment handle. In UTF-16 mode, an attempt to get this attribute is invalid.

Attribute Datatype

ub2 *

OCI_ATTR_ENV_NCHARSET_ID

Mode

READ

Description

Local (client-side) national character set ID. Users can update this setting only after creating the environment handle but before calling any other OCI functions. This restriction ensures the consistency among data and metadata in the same environment handle. In UTF-16 mode, an attempt to get this attribute is invalid.

Attribute Datatype

ub2 *

OCI_ATTR_ENV_UTF16

Mode

READ

Description

Encoding method is UTF-16. The value 1 means that the environment handle is created in UTF-16 mode, while 0 means that it is not. This mode can only be set by the call to OCIEnvCreate() and cannot be changed later.

Attribute Datatype

ub1 *

OCI_ATTR_LDAP_AUTH

Mode

READ/WRITE

Description

The authentication mode. The following are the valid values:

0x0: No authentication; anonymous bind.

0x1: Simple authentication; username/password authentication.

0x5: SSL connection with no authentication.

0x6: SSL: only server authentication required.

0x7: SSL: both server authentication and client authentication are required.

0x8: Authentication method will be determined at runtime.

Attribute Datatype

ub2

OCI_ATTR_LDAP_CRED

Mode

READ/WRITE

Description

If the authentication method is "simple authentication" (username/password authentication), then this attribute holds the password to use when connecting to the LDAP server.

Attribute Datatype

text *

OCI_ATTR_LDAP_CTX

Mode

READ/WRITE

Description

The administrative context of the client. This is usually the root of the Oracle RDBMS LDAP schema in the LDAP server.

Attribute Datatype

text *

OCI_ATTR_LDAP_HOST

Mode

READ/WRITE

Description

The name of the host on which the LDAP server runs.

Attribute Datatype

text *

OCI_ATTR_LDAP_PORT

Mode

READ/WRITE

Description

The port on which the LDAP server is listening.

Attribute Datatype

ub2

OCI_ATTR_OBJECT

Mode

READ

Description

Returns TRUE if the environment was initialized in object mode.

Attribute Datatype

boolean *

OCI_ATTR_PINOPTION

Mode

READ/WRITE

Description

This attribute sets the value of OCI_PIN_DEFAULT for the application associated with the environment handle.

For example, if OCI_ATTR_PINOPTION is set to OCI_PIN_RECENT, then if OCIObjectPin() is called with the pin_option parameter set to OCI_PIN_DEFAULT, then the object is pinned in OCI_PIN_RECENT mode.

Attribute Datatype

OCIPinOpt *

OCI_ATTR_ALLOC_DURATION

Mode

READ/WRITE

Description

This attribute sets the value of OCI_DURATION_DEFAULT for allocation durations for the application associated with the environment handle.

Attribute Datatype

OCIDuration *

OCI_ATTR_PIN_DURATION

Mode

READ/WRITE

Description

This attribute sets the value of OCI_DURATION_DEFAULT for pin durations for the application associated with the environment handle.

Attribute Datatype

OCIDuration *

OCI_ATTR_HEAPALLOC

Mode

READ

Description

The current size of the memory allocated from the environment handle. This may help you track where memory is being used most in an application.

Attribute Datatype

ub4 *

OCI_ATTR_OBJECT_NEWNOTNULL

Mode

READ/WRITE

Description

When this attribute is set to TRUE, newly created objects have non-NULL attributes.

See Also:

"Creating Objects"

Attribute Datatype

boolean *

OCI_ATTR_OBJECT_DETECTCHANGE

Mode

READ/WRITE

Description

When this attribute is set to TRUE, applications receive an ORA-08179 error when attempting to flush an object which has been modified in the server by another committed transaction.

See Also:

"Implementing Optimistic Locking"

Attribute Datatype

boolean *

OCI_ATTR_SHARED_HEAPALLOC

Mode

READ

Description

Returns the size of the memory currently allocated from the shared pool. This attribute works on any environment handle but the process must be initialized in shared mode to return a meaningful value. This attribute is read as follows:

ub4 heapsz = 0;
OCIAttrGet((dvoid *)envhp, (ub4)OCI_HTYPE_ENV,
           (dvoid *) &heapsz, (ub4 *) 0,
           (ub4)OCI_ATTR_SHARED_HEAPALLOC, errhp);
Attribute Datatype

ub4 *

OCI_ATTR_WALL_LOC

Mode

READ/WRITE

Description

If the authentication method is SSL authentication, this attribute contains the location of the client wallet.

Attribute Datatype

text *

Error Handle Attributes

OCI_ATTR_DML_ROW_OFFSET

Mode

READ

Description

Returns the offset (into the DML array) at which the error occurred.

Attribute Datatype

ub4 *

Service Context Handle Attributes

OCI_ATTR_ENV

Mode

READ

Description

returns the environment context associated with the service context.

Attribute Datatype

OCIEnv **

OCI_ATTR_IN_V8_MODE

Mode

READ

Description

Allows you to determine whether an application has switched to Oracle release 7 mode (for example, through an OCISvcCtxToLda() call). A nonzero (true) return value indicates that the application is currently running in Oracle release 8 mode, a zero (false) return value indicates that the application is currently running in Oracle release 7 mode.

Attribute Datatype

ub1 *

Example

The following code sample shows how this parameter might be used:

in_v8_mode = 0; 
OCIAttrGet ((dvoid *)svchp, (ub4)OCI_HTYPE_SVCCTX, (ub1 *)&in_v8_mode,  
                    (ub4) 0, OCI_ATTR_IN_V8_MODE, errhp); 
if (in_v8_mode) 
     fprintf (stdout, "In V8 mode\n"); 
else 
     fprintf (stdout, "In V7 mode\n");

OCI_ATTR_SERVER

Mode

READ/WRITE

Description

When read, returns the pointer to the server context attribute of the service context.

When changed, sets the server context attribute of the service context.

Attribute Datatype

OCIServer ** / OCIServer *

OCI_ATTR_SESSION

Mode

READ/WRITE

Description

When read, returns the pointer to the authentication context attribute of the service context.

When changed, sets the authentication context attribute of the service context.

Attribute Datatype

OCISession **/ OCISession *

OCI_ATTR_STMTCACHESIZE

Mode

READ/WRITE

Description

The default value of the statement cache size is 20, for a statement cache enabled session. The user can increase or decrease this value, by setting this attribute on the service context handle.

Attribute Datatype

ub4 */ ub4

OCI_ATTR_TRANS

Mode

READ/WRITE

Description

When read, returns the pointer to the transaction context attribute of the service context.

When changed, sets the transaction context attribute of the service context.

Attribute Datatype

OCITrans ** / OCITrans *

Server Handle Attributes

OCI_ATTR_ENV

Mode

READ

Description

Returns the environment context associated with the server context.

Attribute Datatype

OCIEnv **

OCI_ATTR_EXTERNAL_NAME

Mode

READ/WRITE

Description

The external name is the user-friendly global name stored in sys.props$.value$, where name = 'GLOBAL_DB_NAME'. It is not guaranteed to be unique unless all databases register their names with a network directory service.

Database names can be exchanged with the server in case of distributed transaction coordination. Server database names can only be accessed if the database is open at the time the OCISessionBegin() call is issued.

Attribute Datatype

text ** (READ) / text * (WRITE)

OCI_ATTR_FOCBK

Mode

READ/WRITE

Description
See Also:

"Application Failover Callbacks"

Attribute Datatype

OCIFocbkStruct *

OCI_ATTR_INTERNAL_NAME

Mode

READ/WRITE

Description

Sets the client database name that will be recorded when performing global transactions. The name can be used by the DBA to track transactions that may be pending in a prepared state due to failures.

Attribute Datatype

text ** (READ) / text * (WRITE)

OCI_ATTR_IN_V8_MODE

Mode

READ

Description

Allows you to determine whether an application has switched to Oracle release 7 mode (for example, through an OCISvcCtxToLda() call). A nonzero (TRUE) return value indicates that the application is currently running in Oracle release 8 mode, a zero (FALSE) return value indicates that the application is currently running in Oracle release 7 mode.

Attribute Datatype

ub1 *

OCI_ATTR_NONBLOCKING_MODE

Mode

READ/WRITE

Description

This attribute determines the blocking mode.

When read, the attribute value returns TRUE if the server context is in nonblocking mode. When set, it toggles the nonblocking mode attribute.

See Also:

"Nonblocking Mode"

Attribute Datatype

ub1

OCI_ATTR_SERVER_GROUP

Mode

READ/WRITE

Description

An alpha-numeric string not exceeding 30 characters specifying the server group.

See Also:

"Password and Session Management"

Attribute Datatype

ub4

OCI_ATTR_SERVER_STATUS

Mode

READ

Description

Returns the current status of the server handle. Values are:

Attribute Datatype

ub4

Example

The following code sample shows how this parameter might be used:

ub4 serverStatus = 0
OCIAttrGet((dvoid *)srvhp, OCI_HTYPE_SERVER,
        (dvoid *)&serverStatus, (ub4 *)0, OCI_ATTR_SERVER_STATUS, errhp);
if (serverStatus == OCI_SERVER_NORMAL)
        printf("Connection is up.\n");
else if (serverStatus == OCI_SERVER_NOT_CONNECTED)
        printf("Connection is down.\n");

Authentication Information Handle

These attributes also apply to the user session handle.

See Also:

"User Session Handle Attributes"

User Session Handle Attributes

These attributes also apply to the authentication information handle.

OCI_ATTR_APPCTX_ATTR

Mode

WRITE

Description

Specifies a an attribute name of the externally initialized context.

Attribute Datatype

text *

OCI_ATTR_APPCTX_LIST

Mode

READ

Description

Gets the application context list descriptor for the session.

Attribute Datatype

text *

OCI_ATTR_APPCTX_NAME

Mode

WRITE

Description

Specifies the namespace of the externally initialized context.

Attribute Datatype

text *

OCI_ATTR_APPCTX_SIZE

Mode

WRITE

Description

Initializes the externally initialized context array size with the number of attributes.

Attribute Datatype

text *

OCI_ATTR_APPCTX_VALUE

Mode

WRITE

Description

Specifies a value of the externally initialized context.

Attribute Datatype

text *

OCI_ATTR_CERTIFICATE

Mode

WRITE

Description

Specifies the certificate of the client for use in proxy authentication.

Attribute Datatype

ub1 *

OCI_ATTR_CERTIFICATE_TYPE

Mode

WRITE

Description

Specifies the type for proxy authentication. If not specified, the default type of X.509 is used.

Attribute Datatype

text *

OCI_ATTR_CLIENT_IDENTIFIER

Mode

WRITE

Description

Specifies the user identifier in the session handle. Used for auditing light-weight users. The first character of the identifier should not be ':'. If it is, the behavior is unspecified.

Attribute Datatype

text *

Example
OCIAttrSet(session, OCI_HTYPE_SESSION,(dvoid *)"appuser1",
           (ub4)strlen("appuser1"),OCI_ATTR_APPCTX_IDENTIFIER, error_handle) ; 

OCI_ATTR_DISTINGUISHED_NAME

Mode

WRITE

Description

Specifies distinguished name of the client for use in proxy authentication.

Attribute Datatype

text *

OCI_ATTR_INITIAL_CLIENT_ROLES

Mode

WRITE

Description

Specifies the role or roles that the client is to initially possess when the application server connects to Oracle on its behalf.

Attribute Datatype

ub4

OCI_ATTR_MIGSESSION

Mode

READ/WRITE

Description

Specifies the session identified for the session handle. Allows you to clone a session from one environment to another, in the same process or between processes. These processes can be on the same machine or different machines. For a session to be cloned, the session must be authenticated as migratable.

See Also:

"Password and Session Management"

Attribute Datatype

ub1 *

Example

The following code sample shows how this attribute might be used:

OCIAttrSet ((dvoid *) authp, (ub4) OCI_HTYPE_SESSION, (dvoid *) mig_session, 
            (ub4) sz, (ub4) OCI_ATTR_MIGSESSION, errhp);

OCI_ATTR_PASSWORD

Mode

WRITE

Description

Specifies a password to use for authentication.

Attribute Datatype

text *

OCI_ATTR_PROXY_CREDENTIALS

Mode

WRITE

Description

Specifies that the credentials of the application server are to be used for proxy authentication.

Attribute Datatype

ub4

OCI_ATTR_USERNAME

Mode

WRITE

Description

Specifies a username to use for authentication.

Attribute Datatype

text *

Connection Pool Handle Attributes

OCI_ATTR_CONN_TIMEOUT

Mode

READ/WRITE

Description

Connections idle for more than this time value (in seconds) are terminated, to maintain an optimum number of open connections.This attribute can be set dynamically. If this attribute is not set, the connections are never timed out.

Attribute Datatype

ub4 */ub4

OCI_ATTR_CONN_NOWAIT

Mode

READ/WRITE

Description

This attribute determines if retrial for a connection has to be done when all connections in the pool are found to be busy and the number of connections has already reached the maximum.

If this attribute is set, an error is thrown when all the connections are busy and no more connections can be opened. Otherwise the call waits till it gets a connection.

When read, the attribute value is returned as TRUE if it has been set.

Attribute Datatype

ub1 */ub1

OCI_ATTR_CONN_BUSY_COUNT

Mode

READ

Description

Returns the number of busy connections.

Attribute Datatype

ub4 *

OCI_ATTR_CONN_OPEN_COUNT

Mode

READ

Description

Returns the number of open connections.

Attribute Datatype

ub4 *

OCI_ATTR_CONN_MIN

Mode

READ

Description

Returns the number of minimum connections.

Attribute Datatype

ub4 *

OCI_ATTR_CONN_MAX

Mode

READ

Description

Returns the number of maximum connections.

Attribute Datatype

ub4 *

OCI_ATTR_CONN_INCR

Mode

READ

Description

Returns the connection increment parameter.

Attribute Datatype

ub4 *

Session Pool Handle Attributes

The attributes used for session pooling are:

OCI_ATTR_SPOOL_BUSY_COUNT

Mode

READ

Description

Returns the number of busy sessions.

Attribute Datatype

ub4 *

OCI_ATTR_SPOOL_GETMODE

Mode

READ/WRITE

Description

This attribute determines the behavior of the session pool when all sessions in the pool are found to be busy and the number of sessions has already reached the maximum. Values are:

Attribute Datatype

ub1 */ ub1

OCI_ATTR_SPOOL_INCR

Mode

READ

Description

Returns the session increment parameter.

Attribute Datatype

ub4 *

OCI_ATTR_SPOOL_MAX

Mode

READ

Description

Returns the number of maximum sessions.

Attribute Datatype

ub4 *

OCI_ATTR_SPOOL_MIN

Mode

READ

Description

Returns the number of minimum sessions.

Attribute Datatype

ub4 *

OCI_ATTR_SPOOL_OPEN_COUNT

Mode

READ

Description

Returns the number of open sessions.

Attribute Datatype

ub4 *

OCI_ATTR_SPOOL_TIMEOUT

Mode

READ/WRITE

Description

The sessions idle for more than this time (in seconds) are terminated periodically, to maintain an optimum number of open sessions.This attribute can be set dynamically. If this attribute is not set, the least recently used sessions may be timed out if and when space in the pool is required.

Attribute Datatype

ub4 */ ub4

Transaction Handle Attributes

OCI_ATTR_TRANS_NAME

Mode

READ/WRITE

Description

Can be used to establish or read a text string which identifies a transaction. This is an alternative to using the XID to identify the transaction. The text string can be up to 64 bytes long.

Attribute Datatype

text ** (READ) / text * (WRITE)

OCI_ATTR_TRANS_TIMEOUT

Mode

READ/WRITE

Description

Can set or read a timeout value used at prepare time.

Attribute Datatype

ub4 * (READ) / ub4 (WRITE)

OCI_ATTR_XID

Mode

READ/WRITE

Description

Can set or read an XID which identifies a transaction.

Attribute Datatype

XID ** (READ) / XID * (WRITE)

Statement Handle Attributes

OCI_ATTR_CURRENT_POSITION

Mode

READ

Description

Indicates the current position in the result set. This attribute can only be retrieved. It cannot be set.

Attribute Datatype

ub4 *

OCI_ATTR_ENV

Mode

READ

Description

Returns the environment context associated with the statement.

Attribute Datatype

OCIEnv **

OCI_ATTR_NUM_DML_ERRORS

Mode

READ

Description

Returns the number of errors in the DML operation.

Attribute Datatype

ub4 *

OCI_ATTR_PARAM_COUNT

Mode

READ

Description

This attribute can be used to get the number of columns in the select-list for the statement associated with the statement handle.

Attribute Datatype

ub4 *

Example

The following code sample shows how this attribute might be used:

/* Describe of a select-list */ 
text *selstmt  = "SELECT * FROM EMP"; 
ub4 parmcnt; 
OCIParam *parmdp; 

err = OCIStmtPrepare (stmhp, errhp, selstmt,
         (ub4)strlen((char *)selstmt), 
           (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT); 
err = OCIStmtExecute (svchp, stmhp, errhp, (ub4)1, (ub4)0, 
            (const OCISnapshot*) 0, (OCISnapshot*)0, OCI_DESCRIBE_ONLY); 

/* get the number of columns in the select list */ 
err = OCIAttrGet ((dvoid *)stmhp, (ub4)OCI_HTYPE_STMT, (dvoid *) 
         &parmcnt, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, errhp); 

/* get describe information for each column */ 
for (i = 1; i < parmcnt; i++) { 
    OCIParamGet (dvoid *)stmhp, OCI_HTYPE_STMT, errhp, &parmdp, i); 
/* get the attributes for each column */ 
     } 

OCI_ATTR_PARSE_ERROR_OFFSET

Mode

READ

Description

Returns the parse error offset for a statement.

Attribute Datatype

ub2 *

OCI_ATTR_PREFETCH_MEMORY

Mode

WRITE

Description

Sets the memory level for top level rows to be prefetched. Rows up to the specified top level row count are fetched if it occupies no more than the specified memory usage limit. The default value is 0, which means that memory size is not included in computing the number of rows to prefetch.

Attribute Datatype

ub4 *

OCI_ATTR_PREFETCH_ROWS

Mode

WRITE

Description

Sets the number of top level rows to be prefetched. The default value is 1 row.

Attribute Datatype

ub4 *

OCI_ATTR_ROW_COUNT

Mode

READ

Description

Returns the number of rows processed so far. The default value is 1.

For non-scrollable cursors, OCI_ATTR_ROW_COUNT is the total number of rows fetched into user buffers with the OCIStmtFetch2() calls issued since this statement handle was executed. Since they are forward sequential only, this also represents the highest row number seen by the application.

For scrollable cursors, OCI_ATTR_ROW_COUNT will represent the maximum (absolute) row number fetched into the user buffers. Since the application can arbitrarily position the fetches, this need not be the total number of rows fetched into the user's buffers since the (scrollable) statement was executed.

Attribute Datatype

ub4 *

OCI_ATTR_ROWID

Mode

READ

Description

Returns the ROWID descriptor allocated with OCIDescriptorAlloc().

See Also:

"Positioned Updates and Deletes" and "DATE"

Attribute Datatype

OCIRowid *

OCI_ATTR_ROWS_FETCHED

Mode

READ

Description

Indicates the number of rows that were successfully fetched into the user's buffers in the last fetch or execute with nonzero iterations. It can be used for both scrollable and non-scrollable statement handles.

Attribute Datatype

ub4 *

Example
ub4 rows;
ub4 sizep = sizeof(ub4);
OCIAttrGet((dvoid *) stmhp, (ub4) OCI_HTYPE_STMT,
           (dvoid *)& rows, (ub4 *) &sizep, (ub4)OCI_ATTR_ROWS_FETCHED, errhp));

OCI_ATTR_SQLFNCODE

Mode

READ

Description

Returns the function code of the SQL command associated with the statement.

Attribute Datatype

ub2 *

Notes
See Also:

The SQL command codes are listed in Table A-1, "SQL Command Codes"

Table A-1 SQL Command Codes  
Code SQL Function Code SQL Function Code SQL Function

01

CREATE TABLE

43

DROP EXTERNAL DATABASE

85

TRUNCATE TABLE

02

SET ROLE

44

CREATE DATABASE

86

TRUNCATE CLUSTER

03

INSERT

45

ALTER DATABASE

87

CREATE BITMAPFILE

04

SELECT

46

CREATE ROLLBACK SEGMENT

88

ALTER VIEW

05

UPDATE

47

ALTER ROLLBACK SEGMENT

89

DROP BITMAPFILE

06

DROP ROLE

48

DROP ROLLBACK SEGMENT

90

SET CONSTRAINTS

07

DROP VIEW

49

CREATE TABLESPACE

91

CREATE FUNCTION

08

DROP TABLE

50

ALTER TABLESPACE

92

ALTER FUNCTION

09

DELETE

51

DROP TABLESPACE

93

DROP FUNCTION

10

CREATE VIEW

52

ALTER SESSION

94

CREATE PACKAGE

11

DROP USER

53

ALTER USER

95

ALTER PACKAGE

12

CREATE ROLE

54

COMMIT (WORK)

96

DROP PACKAGE

13

CREATE SEQUENCE

55

ROLLBACK

97

CREATE PACKAGE BODY

14

ALTER SEQUENCE

56

SAVEPOINT

98

ALTER PACKAGE BODY

15

(NOT USED)

57

CREATE CONTROL FILE

99

DROP PACKAGE BODY

16

DROP SEQUENCE

58

ALTER TRACING

157

CREATE DIRECTORY

17

CREATE SCHEMA

59

CREATE TRIGGER

158

DROP DIRECTORY

18

CREATE CLUSTER

60

ALTER TRIGGER

159

CREATE LIBRARY

19

CREATE USER

61

DROP TRIGGER

160

CREATE JAVA

20

CREATE INDEX

62

ANALYZE TABLE

161

ALTER JAVA

21

DROP INDEX

63

ANALYZE INDEX

162

DROP JAVA

22

DROP CLUSTER

64

ANALYZE CLUSTER

163

CREATE OPERATOR

23

VALIDATE INDEX

65

CREATE PROFILE

164

CREATE INDEXTYPE

24

CREATE PROCEDURE

66

DROP PROFILE

165

DROP INDEXTYPE

25

ALTER PROCEDURE

67

ALTER PROFILE

166

ALTER INDEXTYPE

26

ALTER TABLE

68

DROP PROCEDURE

167

DROP OPERATOR

27

EXPLAIN

69

(NOT USED)

168

ASSOCIATE STATISTICS

28

GRANT

70

ALTER RESOURCE COST

169

DISASSOCIATE STATISTICS

29

REVOKE

71

CREATE SNAPSHOT LOG

170

CALL METHOD

30

CREATE SYNONYM

72

ALTER SNAPSHOT LOG

171

CREATE SUMMARY

31

DROP SYNONYM

73

DROP SNAPSHOT LOG

172

ALTER SUMMARY

32

ALTER SYSTEM SWITCH LOG

74

CREATE SNAPSHOT

73

DROP SUMMARY

33

SET TRANSACTION

75

ALTER SNAPSHOT

174

CREATE DIMENSION

34

PL/SQL EXECUTE

76

DROP SNAPSHOT

175

ALTER DIMENSION

35

LOCK

77

CREATE TYPE

176

DROP DIMENSION

36

NOOP

78

DROP TYPE

177

CREATE CONTEXT

37

RENAME

79

ALTER ROLE

178

DROP CONTEXT

38

COMMENT

80

ALTER TYPE

179

ALTER OUTLINE

39

AUDIT

81

CREATE TYPE BODY

180

CREATE OUTLINE

40

NO AUDIT

82

ALTER TYPE BODY

181

DROP OUTLINE

41

ALTER INDEX

83

DROP TYPE BODY

182

UPDATE INDEXES

42

CREATE EXTERNAL DATABASE

84

DROP LIBRARY

183

ALTER OPERATOR

OCI_ATTR_STATEMENT

Mode

READ

Description

Returns the text of the SQL statement prepared in a statement handle. In UTF-16 mode, the returned statement is in UTF-16 encoding. The length is always in bytes.

Attribute Datatype

text *

OCI_ATTR_STMT_STATE

Mode

READ

Description

Returns the fetch state of that statement. This attribute can be used by the caller to determine if the session can be used in another service context or if it is still needed in the current set of data access calls. Basically, if we are in the middle of a fetch-execute cycle, then we do not want to release the session handle for another statement execution. Valid values are:

Attribute Datatype

ub4 *

OCI_ATTR_STMT_TYPE

Mode

READ

Description

The type of statement associated with the handle. Valid values are:

Attribute Datatype

ub2 *

Bind Handle Attributes

OCI_ATTR_CHAR_COUNT

Mode

WRITE

Description
See Also:

"Buffer Expansion During Binding"

Attribute Datatype

ub4 *

OCI_ATTR_CHARSET_FORM

Mode

READ/WRITE

Description

Character set form of the bind handle. The default form is SQLCS_IMPLICIT. Setting this attribute will cause the bind handle to use the database or national character set on the client side. Set this attribute to SQLCS_NCHAR for the national character set or SQLCS_IMPLICIT for the database character set.

Attribute Datatype

ub1 *

OCI_ATTR_CHARSET_ID

Mode

READ/WRITE

Description

Character set ID of the bind handle. If the character set of the input data is UTF-16 (replaces the deprecated OCI_UCS2ID, which is retained for backward compatibility), the user has to set the character set ID to OCI_UTF16ID. The bind value buffer is assumed to be a utext buffer and length semantics for input length pointers and return values changes to character semantics (number of utexts). However the size of the bind value buffer in the preceeding OCIBind call has to be stated in bytes.

If OCI_ATTR_CHARSET_FORM is set, then OCI_ATTR_CHARSET_ID should be set only afterwards. Setting OCI_ATTR_CHARSET_ID prior to setting OCI_ATTR_CHARSET_FORM will cause unexpected results.

See Also:

"Character Conversion Issues in Binding and Defining"

Attribute Datatype

ub2 *

OCI_ATTR_MAXCHAR_SIZE

Mode

WRITE

Description

Sets the number of characters that an application reserves on the server to store the data being bound.