Skip Headers
Oracle® TimesTen In-Memory Database Reference
Release 11.2.1

Part Number E13069-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

ttAdmin

Description

Allows you to:

Required privilege

This utility requires no privileges to query the database.Replication options require the ADMIN privilege.

Cache options require the CACHE_MANAGER privilege.

All other options require the ADMIN privilege.

If authentication information is not supplied in the connection string or DSN, this utility prompts for a user ID and password before continuing.

Syntax

ttAdmin {-h | -help | -?}

ttAdmin {-V | -version}

ttAdmin [-ramPolicy always|manual|inUse [-ramGrace secs] ]
[-ramLoad] [-ramUnload]
[-repPolicy always|manual|norestart]
[-reqpQueryThresholdGet]
[-reqpQueryThresholdSet seconds]
[-repStart | -repStop]
[[-cacheUidGet] |
 [-cacheUidPwdSet -cacheUid uid [-cachePwd pwd]] |
 [-cachePolicy always | manual| norestart] |
 [-cacheStart] | 
 [-cacheStop [-stopTimeout seconds]]]
[-query]
{-connStr connection_string | DSN} 

Options

ttAdmin has the options:

Option Description
-connStr connection_string An ODBC connection string containing the name of the data store, the server name and DSN (if necessary) and any relevant connection attributes.
DSN Specifies an ODBC data source name of the data store to be administered.
-h -help

-?

Prints a usage message and exits.
-cachePolicy Defines the policy used to determine when the cache agent for the data store should run. This option requires CACHE_MANAGER privileges.
-cacheStart Starts a cache agent for the data store. This option requires CACHE_MANAGER privileges.
-cacheStop Stops a cache agent for the data store. 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 objects that were used by the AUTOREFRESH feature. This option requires CACHE_MANAGER privileges.
-cachePwd The password associated with the cache administration user ID that is used to manage AUTOREFRESH cache groups and ASYNCHRONOUS WRITETHROUGH cache groups. The cache administration user has extended privileges. See "Grant privileges to the Oracle users" in the Oracle In-Memory Database Cache User's Guide for more details. This option requires CACHE_MANAGER privileges.
-cacheUid 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. This option requires CACHE_MANAGER privileges.

See "Grant privileges to the Oracle users" in the Oracle In-Memory Database Cache User's Guide for more details.

-cacheUidGet Gets the current cache administration user ID for the specified data store. This option requires CACHE_MANAGER privileges.
-cacheUidPwdSet Sets the cache administration user ID and password for the specified data store. This option requires CACHE_MANAGER privileges. Must be set in conjunction with the -cacheUid and -cachePwd options. Some things to consider are:
  • The cache administration user ID and password only need to be specified once for each new data store.

  • The cache administration user ID and password cannot be set while either the cache agent or the replication agent are running.

  • The cache administration user ID cannot be reset while there are ASYNCHRONOUS WRITETHROUGH cache groups or AUTOREFRESH cache groups (with a state that is not equal to OFF) on the data store.

  • The cache administration password can be changed at any time.

-query Displays a summary of the policy settings for the named data store.
-ramGrace secs Only effective if -ramPolicy is inUse. If non-zero, the data store is kept in RAM for secs seconds prior to being unloaded after the last application disconnects from the data store.
-ramLoad Valid only when -ramPolicy is set to manual. Causes the data store to be loaded into RAM.
-ramPolicy policy Defines the policy used to determine when the data store is loaded into system RAM.
  • always - Specifies that the data store should remain in system RAM all the time.

  • manual- Specifies that the data store is only to be loaded in system RAM when explicitly loaded by the user (using the ramLoad option).

  • inUse - (default) Specifies that the data store is only loaded in system RAM when in use (i.e., when applications are connected). The -ramGrace option may be used to modify the behavior of this policy.This option cannot be used with temporary data stores. TimesTen only allows a temporary data store to be loaded into RAM manually. Trying to set the policy generates a warning.

This option requires ADMIN privileges.

-ramUnload Valid only when -ramPolicy is set to manual. Causes the data store to be unloaded from RAM.
-repPolicy Defines the policy used to determine when the replication agent starts.
  • always - Specifies that the agent should always be running for the data store. This option immediately starts the replication agent and when the daemon restarts the replication agent is restarted.

  • manual- (default) Specifies that the replication agent must be manually started and stopped.

  • norestart - Specifies that the replication agent for the data store is not to be restarted after a failure.

This option requires ADMIN privileges.

-repPolicy Defines the policy used to determine when the replication agent starts.
  • always - Specifies that the agent should always be running for the data store. This option immediately starts the replication agent and when the daemon restarts the replication agent is restarted.

  • manual- (default) Specifies that the replication agent must be manually started and stopped.

  • norestart - Specifies that the replication agent for the data store is not to be restarted after a failure.

This option requires ADMIN privileges.

-repQueryThresholdGet Returns the number of seconds that a query can be executed by the replication agent before TimesTen writes a warning to the support log and throws an SNMP trap.

A value of 0 and indicates that no warning is sent.

This option requires ADMIN privileges.

-repQueryThresholdSet This option specifies the number of seconds that a query can be executed by the replication agent before TimesTen writes a warning to the support log and throws an SNMP trap.

The specified value takes effect the next time the replication agent is started. The query threshold for the replication agent applies to SQL execution on detail tables of materialized views, ON DELETE CASCADE operations and some internal operations.

.The value must be greater than or equal to 0.

Default is 0 and indicates that no warning is sent.

This option requires ADMIN privileges.

-repStop Stops the data store's replication agent.
-stopTimeout seconds Specifies that the TimesTen daemon should kill the cache agent if it doesn't stop within seconds.

If set to 0, the daemon waits forever for the cache agent. The default value is 100 seconds.

This option requires CACHE_MANAGER privileges.

-V | -version Prints the release number of ttAdmin and exits.

Examples

A data store referred to by DSN SalesData is used by some very performance sensitive applications. So that applications do not have to wait for the data store to be loaded from disk into RAM, this data store must always remain in RAM. To achieve this, use:

ttAdmin -ramPolicy always SalesData

The SalesData data store is normally always resident in RAM. However, it is not being used at all today and should be loaded only when applications are connected to it. To change the RAM policy, use:

ttAdmin -ramPolicy inUse SalesData

To manually control whether the SalesData data store is loaded into RAM and to load it now, use:

ttAdmin -ramPolicy manual -ramLoad SalesData

To manually unload the SalesData data store from RAM, thus preventing any new applications from connecting to the data store, use:

ttAdmin -ramPolicy manual -ramUnload SalesData

A data store referred to by DSN History is not always in use. Permanently loading it into RAM unnecessarily uses memory. This data store is idle for long periods, but when it is in use multiple users connect to it in rapid succession. To improve performance, it may be best to keep the data store in RAM when applications are connected to it and to keep it in RAM for 5 minutes (300 seconds) after the last user disconnects. With this RAM policy, as long as applications are connected to the data store, the data store remains in RAM. To set this policy, use:

ttAdmin -ramPolicy inUse -ramGrace 300 History

A data store referred to by DSN SalesData is used to cache Oracle data. Use the following ttAdmin command to start the cache agent for the SalesData DSN:

ttAdmin -cacheStart SalesData

You can also use the -cachePolicy option to ask the TimesTen data manager daemon to start the cache agent every time the data manager itself is started. Use:

ttAdmin -cachePolicy always SalesData

To turn off the automatic start of cache agent, use:

ttAdmin -cachePolicy manual SalesData

To set the cache administration user ID and password, the -cacheUidPwdSet flag in conjunction with the -cacheUid and -cachePwd options can be used with ttAdmin. For example, if the cache administration user ID and password on the data store SalesData should be scott and tiger respectively, use:

ttAdmin -cacheUidPwdSet -cacheUid scott -cachPwd tiger SalesData

To get the current cache administration user ID for the SalesData DSN, use:

ttAdmin -cacheUidGet SalesData

ttAdmin displays the following output:

Cache User Id: scott
RAM Residence Policy: inUse
Replication Agent Policy: manual
Replication Manually Started: False
Cache Agent Policy: manual
Cache Agent Manually Started: False

Notes

If TimesTen is installed as a user instance, and the user attempts to start the cache agent for a data store with a relative path, TimesTen looks for the data store relative to where it is running, and fails. Therefore, a relative path should not be used in this scenario. For example, on Windows, if you have specified the path for the data store as DataStore=./dsn1 and attempt to start the cache agent with the command ttAdmin -cacheStart dsn1, the cache agent does not start because it looks for the data store in install_dir\srv\dsn1. For Unix it looks in a directory in /var/TimesTen/instance/.

When using AUTOREFRESH (automatic propagation from Oracle to TimesTen) or ASYNCHRONOUS WRITETHROUGH cache groups, you must specify the cache administration user ID and password. This user account is used to perform AUTOREFRESH and ASYNCHRONOUS WRITETHROUGH operations.

To load Oracle data, 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 the Oracle In-Memory Database Cache User's Guide for more details. For details on other environment variables that you may want to set, see "Environment variables" in the Oracle TimesTen In-Memory Database Installation Guide.

This utility is supported only for TimesTen Data Manager DSNs. It is not supported for TimesTen Client DSNs.

If ttAdmin is used with -repStart and it does not find a replication definition, the replication agent is not started and ttAdmin prints out an error message. For example:

$ ttAdmin -repstart repl1
*** [TimesTen][TimesTen 11.2.1.0.0 ODBC Driver][TimesTen]TT8191: This store (repl1 on my_host) is not involved in a replication scheme -- file "eeProc.c", lineno 11016, procedure "RepAdmin()"
*** ODBC Error = S1000, TimesTen Error = 8191

If ttAdmin is used with the -ramPolicy always option, a persistent system connection is created on the data store. The -ramPolicy always option can only be specified on shared data stores.

The only -ramPolicy value supported for temporary data stores is the -ramPolicy manual option with the -ramLoad option specified at the same time.

If ttAdmin is used with -repPolicy manual (the default) or -repPolicy always, then the -ramPolicy always option should also be used. This ensures that the replication agent begins recovery after a failure as quickly as possible.

See also


ttStatus
ttCachePolicySet
ttCacheUidGet
ttCacheUidPwdSet
ttCacheStart
ttCacheStop