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 beginning of chapter Go to next page

OCI Relational Functions, 2 of 38


OCIConnectionPoolCreate()

Purpose

Initializes the connection pool.

Syntax

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 );

Parameters

envhp (IN)

A pointer to the environment where the connection pool is to be created

errhp (IN/OUT)

An error handle which can be passed to OCIErrorGet().

poolhp (IN)

An allocated pool handle.

poolName (OUT)

The name of the connection pool connected to.

poolNameLen (OUT)

The length of the string pointed to by poolName.

dblink (IN)

Specifies the database (server) to connect to.

dblinkLen (IN)

The length of the string pointed to by dblink.

connMin (IN)

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.

connMax (IN)

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.

connIncr (IN)

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.

poolUsername (IN)

Connection pooling requires an implicit primary session and this attribute provides a username for that session.

poolUserLen (IN)

The length of poolUsername.

poolPassword (IN)

The password for the username poolUsername.

poolPassLen (IN)

The length of poolPassword.

mode (IN)

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.

Comments

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.

See Also:

"Connection Pool Handle Attributes"

Related Functions

OCIConnectionPoolDestroy(), OCILogon2(), OCIServerAttach()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback