TimesTen Utilities and Built-In Procedures

In addition to providing standard relational SQL functionality available through a number of programming interfaces (JDBC, ODBC, OCI, Pro*C, PL/SQL), the TimesTen product provides a large set of built-in procedures that are callable programmatically from applications, and a set of utilities for operating and managing the TimesTen databases.

Commonly Used TimesTen Utilities

To help you get started, the table below shows a number of utilities commonly used by system administrators on TimesTen:

Utility Description
  ttIsql ttIsql is a robust and powerful interactive SQL command-line utility that enables you to connect to the TimesTen database and execute SQL statements and PL/SQL blocks/functions/procedures. In addition, ttIsql provides a very large set of features for any system administrator working with a TimesTen system. A subset of its capabilities include:
  • Execute SQL DDLs, SQL DMLs, and PL/SQL statements
  • Perform admin tasks like create users, grant/revoke privileges, start/stop replication and cache agents
  • Execute TimesTen built-in procedures
  • Invoke OS host commands without leaving ttIsql
  • Explain a SQL query plan
  • Display information in the System Monitor table to monitor performance matrix of your choice
   ttAdmin ttAdmin enables a system administrator to control the RAM policy for loading/unloading a TimesTen database, or the policy for automatic or manual restart of the TimesTen replication agent and cache agent processes
   ttBackup ttBackup allows a system administrator to create a backup copy of the TimesTen database. Both full backup and incremental backup are supported.
   ttDaemonAdmin ttDaemonAdmin is used to start and stop the TimesTen daemon process. Before stopping the daemon process, it's important to disconnect all application connections to the TimesTen database in order to have a graceful shutdown. If you stop the daemon process when there are existing connections, the database will be aborted without performing the final checkpoint operation. When you later restart the database, the first connection will need to go through a recovery process to recover the transactions that did not make it to the last checkpoint file. A restart with the recovery process takes longer than a restart from a graceful shutdown.
   ttRepAdmin ttRepAdmin enables a system administrator to perform operations such as duplicating a TimesTen database, setting subscriber attributes and operations, monitoring replication status, etc.
   ttRestore ttRestore allows a system administrator to create a TimesTen database from the backup file of a ttBackup operation.
   ttSize ttSize estimates the amount of space that a given table, including any views will consume. It can be used on existing tables or to estimate table sizes when creating tables. If no owner is specified, the size information is printed for all tables of the given name. The size information includes space occupied by any indexes defined on the table.
   ttStatus ttStatus displays information for the current state of a TimesTen installation, including the state of the TimesTen system processes, names of all existing TimesTen databases, number of user connections, status of the replication and cache agents, etc.
   ttXactAdmin ttXactAdmin lists ownership, status, log and lock information for each outstanding transaction. This utility also allows you to heuristically commit, abort or forget an XA transaction branch.

Click here for a complete list of TimesTen utilities.


Commonly used TimesTen Built-in Procedures

The table below shows a number of commonly used built-in procedures for system administration:

Built-in Procedures Description
   ttCacheStart ttCacheStart starts the TimesTen cache agent responsible for caching operations and data synchronization between the TimesTen Cache and the Oracle database.
   ttConfiguration ttConfiguration returns the attribute values for the current connection to the TimesTen database.
   ttDataStoreStatus ttDataStoreStatus returns the list of processes connected to the TimesTen database specified. If the "datastore" parameter is null, the procedure returns connections for active databases.
   ttOptUpdateStats ttOptUpdateStats updates the statistics for the specified table. The optimizer relies on updated statistics to select the optimum path for SQL processing. For best performance, please update statistics regularly, particularly if the table content changes significantly.
   ttRamPolicySet ttRamPolicySet sets the policy for loading/unloading of the TimesTen database into RAM. For example, if you want to keep the database in memory at all time, you would set the ramPolicy to "always".

Click here for a complete list of TimesTen built-in procedures.