The grantCacheAdminPrivileges.sql Script

The grantCacheAdminPrivileges.sql script grants privileges to the cache administration user that are required to automatically create Oracle Database objects used to manage the caching of Oracle Database data when particular cache group operations are performed.

See Required Privileges for Cache Administration User for Cache Operations for a complete list of privileges that need to be granted to the cache administration user in order to perform particular cache group and cache table operations.

Run the timesten_home/install/oraclescripts/grantCacheAdminPrivileges.sql as the sys user. The cache administration user name is passed as an argument to the grantCacheAdminPrivileges.sql script.

Note:

Alternatively, you can create these objects as described in The initCacheAdminSchema.sql Script before performing any cache group operations if, for security purposes, you do not want to grant certain privileges to the cache administration user required to automatically create objects necessary for managing autorefresh.

In addition to the privileges granted to the cache administration user by running the grantCacheAdminPrivileges.sql script, this user may also need to be granted 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 grantCacheAdminPrivileges.sql script to grant privileges to the cache administration user. The cache administration user then automatically creates Oracle Database objects used to manage caching Oracle Database data in a TimesTen database.

The grantCacheAdminPrivileges.sql script requires the Oracle database cache administration user name as input, which is cacheadmin in this example.

SQL> @grantCacheAdminPrivileges cacheadmin
SQL> exit

For example, with cache groups with autorefresh, the Oracle database objects used to enforce the predefined behaviors of these cache group types are automatically created if the objects do not already exist and one of the following occurs:

  • The cache group is created with its autorefresh state set to PAUSED or ON.

  • The cache group is created with its autorefresh state set to OFF and then altered to either PAUSED or ON.