ttCacheConnPoolGet

This procedure retrieves the current values of the cache connection pool parameters.

The ChildServer connection attribute identifies each child server process, where ChildServer=n and n is a number ranging from 1 to the number of running child server processes. Once connected to the child server process, you can run the ttCacheConnPoolGet('current') built-in procedure that is meant for a specific child server process.

For more details, see Managing a Cache Connection Pool to the Oracle Database for Dynamic Load Requests in Oracle TimesTen In-Memory Database Cache Guide.

Required Privilege

This procedure requires TimesTen cache administration manager or Admin privileges to run.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic but not supported in TimesTen Scaleout.

Related Views

This procedure has no related views.

Syntax

ttCacheConnPoolGet(state)

Parameters

The ttCacheConnPoolGet has the parameter state. This parameter can be either:

  • saved: Returns the cache connection parameters that are saved on the Oracle database. When querying the saved configuration, you can run the ttCacheConnPoolGet built-in procedure from a direct connection, a single-threaded client/server connection or a multithreaded client/server connection.

  • current: Returns the cache connection parameters that have defined the cache connection pool for this current child server process. When querying the current configuration of a specific child server process, you can run the ttCacheConnPoolGet built-in procedure only from a multithreaded client/server connection.

Result Set

ttCacheConnPoolGet returns the following values:

Column Type Description

MinSize_CURRENT

TT_INTEGER

The set value for the minimum number of open connections for the cache connection pool.

MaxSize_CURRENT_

TT_INTEGER

The set value for the maximum number of open connections for the cache connection pool.

IncrSize_CURRENT

TT_INTEGER

The set value for the increment by which the number of open connections increases when needed.

Timeout_CURRENT

TT_INTEGER

A timeout (in seconds) for the connections in the cache connection pool. Connections that idle for more than this timeout are terminated to maintain an optimum number of open connections and returned to the cache connection pool.

ConnNoWait_CURRENT

TT_INTEGER

A directive given whether to wait for an available connection from the cache connection pool when no connection is immediately available. Valid values are:

  • Disabled (0): Any dynamic load operations wait for an available connection in the cache connection pool before proceeding.

  • Enabled (1): Any dynamic load operations fail with an error if there is no available connection in the cache connection pool.

OpenCount_CURRENT

TT_INTEGER

The current number of open connections in the cache connection pool. If you query the saved parameters, a -1 is displayed for this value.

BusyCount_CURRENT

TT_INTEGER

The current number of busy connections in the cache connection pool. If you query the saved parameters, a value of -1 is displayed for this value.

LastError_CURRENT

TT_INTEGER

Displays the number of the last Oracle Database error returned (if applicable) when attempting to retrieve a connection from the cache connection pool. For example, a value of 1034 would indicate that "ORA-0134: ORACLE not available" error was the last Oracle Database error returned. When requesting current and no Oracle Database error is returned, a 0 is returned.

If you query the saved parameters, a -1 is displayed for this value.

Examples

Query the values for the cache connection pool that are saved on the Oracle database.

Command> call ttCacheConnPoolGet('saved');
< 1, 10, 1, 10, 0, -1, -1, -1>

This procedure is available only for cache operations.