Table of Contents

About

TimesTen allows you to specify a RAM policy that determines when the database is loaded and unloaded from main memory. The policy options are:

Policy Default Description
InUse Yes Load the database on first connection and unload on last disconnect.
Inuse with RamGrace Keep the database in memory for a “grace period” after the last disconnect.
Always Keep the database in memory at all time and automatically load the database upon restart of the TimesTen daemon process.
Manual Load and unload the database manually

How to

Choose the RAM policy

  • The InUse policy is the default setting and is convenient, particularly for development use. A disadvantage of this policy is that the first connection of the application needs to wait for the database to be loaded. If you have a relatively large database and the application does not always have a connection to the database, you may incur unnecessary wait time when the database needs to be loaded.
  • The InUse with RamGrace policy is useful for applications with frequent periods of “idle” time where there is no connection to the database at all. Setting a “grace period” to keep the database in memory can avoid unnecessary load/unload operations.
  • The Manual policy gives the database administrator more control over when the TimesTen database is loaded and unloaded. For enterprise companies where the TimesTen database is managed as part of their operational procedure to support the TimesTen applications, this policy is commonly used in system startup and shutdown procedures.
  • The Always policy keeps the database in memory whenever the server is up or rebooted, independent of the applications. This policy is useful if you have multiple applications sharing the database.

Get the RAM Policy

Use the ttAdmin utility to set or get the RAM policy.

[oracle@Exalytics-01 ~]$ ttAdmin MyDSN
RAM Residence Policy            : inUse
Replication Agent Policy        : manual
Replication Manually Started    : False
Cache Agent Policy              : manual
Cache Agent Manually Started    : False

Once the Ram policy is changed with another value than the default, the ttstatus utility gives also the Ram Policy.

TimesTen status report as of Wed Jun 20 14:16:57 2012

Daemon pid 23522 port 53396 instance tt1122
TimesTen server pid 23531 started on port 53397
------------------------------------------------------------------------
Data store /u01/app/oracle/product/aggregate_store/tt_aggr_store/di_tt_aggr_store
There are no connections to the data store
.........
.........
.........
RAM residence policy: Always
Replication policy  : Manual
Cache Agent policy  : Manual
PL/SQL enabled.

Set the RAM Policy

Use the ttAdmin utility to set or get the RAM policy.

[oracle@Exalytics-01 ~]$ ttAdmin -ramPolicy always MyDSN
RAM Residence Policy            : always
Replication Agent Policy        : manual
Replication Manually Started    : False
Cache Agent Policy              : manual
Cache Agent Manually Started    : False