Create the TimesTen Users

First, you must create a user who performs cache group operations on the TimesTen database. We refer to this user as the TimesTen database cache administration user.

The TimesTen cache administration user must have the same name as the Oracle cache administration user that accesses the cached Oracle Database tables. The password of the TimesTen database cache administration user can be different than the password of the Oracle cache administration user.

Note:

You can create multiple cache administration users on a TimesTen database, such as one for each TimesTen DBA. However, you can only define a single cache administration user on the Oracle database for this particular TimesTen database. (You can use the same Oracle cache administration user for all TimesTen databases that connect to the Oracle database or define a separate cache administration user for each TimesTen database.) If you create multiple TimesTen cache administration users, one or more of these users can use the same Oracle cache administration user.

The TimesTen cache administration user must be assigned privileges to perform cache operations. The TimesTen cache administration user creates the cache groups. It may perform operations such as loading or refreshing a cache group (although these operations can be performed by any TimesTen user that has sufficient privileges). The TimesTen cache administration user can also monitor various aspects of the caching environment, such as asynchronous operations that are performed on cache groups such as autorefresh.

The second user that you must create is a cache table user that owns the cache tables on TimesTen and has the same name as the Oracle Database schema owner who owns Oracle Database tables to be cached in the TimesTen database. We refer to these users as cache table users, because the TimesTen cache tables are to be owned by these users. Therefore, the owner and name of a TimesTen cache table is the same as the schema owner and name of the corresponding cached Oracle Database table. The password of a cache table user can be different than the password of the Oracle Database schema owner with the same name.

The following example creates the TimesTen users. It uses the ttIsql utility to connect to the cache1 DSN as the instance administrator. One of the most frequently used TimesTen utilities is the ttIsql utility. This is an interactive SQL utility that serves the same purpose for TimesTen as SQL*Plus does for Oracle Database.

  • Creates the TimesTen database cache administration user cacheadmin whose name (in this example) is the same as the Oracle cache administration user.

  • Creates a cache table user sales whose name is the same as the Oracle Database schema owner of the Oracle Database tables to be cached in the TimesTen database.

% ttIsql cache1
Command> CREATE USER cacheadmin IDENTIFIED BY ttpwd;
Command> CREATE USER sales IDENTIFIED BY ttpwd;