Set Cache Policies
Options
ttAdmin
has these options for cache:
Option | Description |
---|---|
|
An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings. |
|
An ODBC data source name of the database to be administered. |
|
Defines the policy used to determine when the cache agent for the database should run.
|
|
Starts a cache agent for the database. |
|
Stops a cache agent for the database. You should not shut down the cache agent immediately after dropping or altering a cache group. Instead, wait for at least two minutes. Otherwise, the cache agent may not get a chance to clean up the Oracle Database objects that were used by the autorefresh feature. |
|
The password associated with the cache administration user ID that manages autorefresh cache groups and asynchronous writethrough cache groups. The cache administration user has extended privileges. See Grant Privileges to the Oracle Cache Administration User in Oracle TimesTen In-Memory Database Cache Guide for more details. |
|
The cache administration user ID. The cache administration user manages autorefresh cache groups and asynchronous writethrough cache groups. The cache administration user has extended privileges. See Grant Privileges to the Oracle Cache Administration User in the Oracle TimesTen In-Memory Database Cache Guide for more details. |
|
Gets the current cache administration user ID for the specified database. |
|
Registers the cache administration user name and password for the specified database, using the
|
|
Specifies that the TimesTen daemon should stop the cache agent if it does not stop within If set to |
Examples
A database referred to by DSN database1
contains data cached from an Oracle database. Use the following ttAdmin
command to start the cache agent for database1
:
% ttAdmin -cacheStart database1
You can also use the -cachePolicy
option to ask the TimesTen data manager daemon to start the cache agent every time the data manager is started:
% ttAdmin -cachePolicy always database1
To turn off the automatic start of cache agent:
% ttAdmin -cachePolicy manual database1
To set the cache administration user ID and password, use -cacheUidPwdSet
with -cacheUid
and -cachePwd
. For example:
% ttAdmin -cacheUidPwdSet -cacheUid cacheadmin -cachePwd orapwd database1
To get the current cache administration user ID for database1
:
% ttAdmin -cacheUidGet database1
Notes
Before using any cache features, you must start the cache agent. Cache options require that you specify a value for the OracleNetServiceName
in the DSN.
When using autorefresh or asynchronous writethrough cache groups, you must specify the cache administration user ID and password. This user account performs autorefresh and asynchronous writethrough operations.
To load data from an Oracle database, the TimesTen cache agent must be running. This requires that the ORACLE_HOME
environment variable be set to the path of the Oracle installation. See Managing the Cache Agent in Oracle TimesTen In-Memory Database Cache
Guide for more details.