Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Relational Functions, 2 of 38
Initializes the connection pool.
sword OCIConnectionPoolCreate ( OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp, OraText **poolName, sb4 *poolNameLen, CONST OraText *dblink, sb4 dblinkLen, ub4 connMin, ub4 connMax, ub4 connIncr, CONST OraText *poolUsername, sb4 poolUserLen, CONST OraText *poolPassword, sb4 poolPassLen, ub4 mode );
A pointer to the environment where the connection pool is to be created
An error handle which can be passed to OCIErrorGet()
.
An allocated pool handle.
The name of the connection pool connected to.
The length of the string pointed to by poolName
.
Specifies the database (server) to connect to.
The length of the string pointed to by dblink
.
Specifies the minimum number of connections in the connection pool. Valid values are 0 and above.
These number of connections are opened to the server by OCIConnectionPoolCreate()
. After this, connections are opened only when necessary. Generally, it should be set to the number of concurrent statements the application is planning or expecting to run.
Specifies the maximum number of connections that can be opened to the database. Once this value is reached, no more connections are opened. Valid values are 1 and above.
Allows the application to set the next increment for connections to be opened to the database if the current number of connections are less than connMax
. Valid values are 0 and above.
Connection pooling requires an implicit primary session and this attribute provides a username for that session.
The length of poolUsername
.
The password for the username poolUsername
.
The length of poolPassword
.
The modes supported are
Ordinarily, OCIConnectionPoolCreate()
will be called with mode
set to OCI_DEFAULT.
If you wish to change the pool attributes dynamically (for example: change the connMin
, connMax
, and connIncr
parameters), call OCIConnectionPoolCreate()
with mode
set to OCI_CPOOL_REINITIALIZE. When this is done, the other parameters are ignored.
The OUT parameters poolName
and poolNameLen
will contain values to be used in subsequent OCIServerAttach()
and OCILogon2()
calls in place of the database name and the database name length arguments.
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|