The initCacheAdminSchema.sql Script

The Oracle database cache administration user requires certain privileges to automatically create the Oracle database objects.

The cache administration user requires privileges used to:

  • Store information about TimesTen databases that are associated with a particular cache environment.

  • Enforce the predefined behaviors of cache groups with autorefresh. In this case, the cache administration user requires certain privileges to automatically create these Oracle database objects.

  • Enforce the predefined behavior for AWT cache groups.

For security purposes, if you do not want to grant the CREATE CLUSTER, CREATE INDEXTYPE, CREATE OPERATOR, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, and EXECUTE ON SYS.DBMS_LOB package privileges to the cache administration user required to automatically create the Oracle Database objects, you can use the initCacheAdminSchema.sql script. See Required Privileges for Cache Administration User for Cache Operations for a full list of privileges granted by this script.

To create the Oracle Database tables and triggers used to enforce the predefined behaviors of particular cache group types, run the SQL*Plus script timesten_home/install/oraclescripts/initCacheAdminSchema.sql as the sys user. These objects must be created before you can create cache groups with autorefresh and AWT cache groups. The initCacheAdminSchema.sql script requires the cache administration user name as input.

In addition to the privileges granted to the cache administration user by running the initCacheAdminSchema.sql script, you may need to grant the user privileges such as SELECT or INSERT on the cached Oracle Database tables depending on the types of cache groups you create and the operations that you perform on the cache groups and their cache tables.

As the sys user, use SQL*Plus to run the initCacheAdminSchema.sql script to create Oracle Database objects, which are used to manage caching data. These Oracle Database objects enforce the predefined behaviors of a cache group with autorefresh and AWT cache groups, and grant a limited set of privileges to the cache administration user. In the following example, the Oracle database cache administration user name is cacheadmin.

SQL> @initCacheAdminSchema "cacheadmin"
SQL> exit

Other Oracle database objects associated with Oracle database tables that are cached in a cache group with autorefresh are needed to enforce the predefined behaviors of these cache group types. See Manually Creating Oracle Database Objects for Cache Groups with Autorefresh for details about how to create these additional objects as part of the steps for creating a cache group with autorefresh.

To view a list of the Oracle database objects created and used by TimesTen to manage the caching of Oracle database data, run the following query in SQL*Plus as the sys user:

SQL> SELECT owner, object_name, object_type FROM all_objects WHERE object_name 
  2  LIKE 'TT\___%' ESCAPE '\';

The query returns a list of tables, indexes, and triggers owned by the cache administration user.