ttRamPolicySet

This procedure defines the policy used to determine when a database is loaded into memory. The policy can be either always, manual, or inUse.

Required Privilege

This procedure requires the ADMIN privilege.

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

ttRamPolicySet('ramPolicy', [ramGrace])

Parameters

ttRamPolicySet has the parameters:

Parameter Type Description

ramPolicy

TT_VARCHAR (10) NOT NULL

The policy used to determine when the database is loaded into system RAM. Valid values are:

always - Specifies that the database should remain in system RAM all the time.

manual - Specifies that the database is only to be loaded in system RAM when explicitly loaded by the user, using the ttAdmin -ramLoad command.

inUse - Specifies that the database is only loaded in system RAM when in use (when applications are connected). This option cannot be used with temporary databases. TimesTen only allows a temporary database to be loaded into RAM manually. Trying to set the policy generates a warning.

ramGrace

TT_INTEGER

Sets the number of seconds the database is kept in RAM after the last application has disconnected. This number is only effective if ramPoliy is inUse. This parameter is optional, and when omitted or set to NULL, the existing ramGrace period is left unchanged.

Result Set

ttRamPolicySet returns no results.

Examples

To set the policy for loading a database into RAM to be inUse and for the database to kept in RAM for 10 seconds after the last application has disconnected, use:

CALL ttRamPolicySet('inUse', 10);

See Also