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

ttCacheSqlGet

Description

Generates the Oracle SQL statements to install or uninstall Oracle objects for:

This is useful when the user creating the cache group does not have adequate privilege to write on the Oracle database. The Oracle DBA can then use the script generated by this built-in procedure to create the Oracle objects.

Required privilege

This procedure requires the CACHE_MANAGER privilege.

Syntax

ttCacheSqlGet('feature_name', 'cache_group_name', install_flag)

Parameters

ttCacheSqlGet has these parameters:

Parameter Type Description
feature_name TT_VARCHAR (100) Can be specified as INCREMENTAL_AUTOREFRESH or ASYNCHRONOUS_WRITETHROUGH.
cache_group_name TT_VARCHAR (100) The name of the cache group. Specify NULL when installing objects for ASYNCHRONOUS WRITETHROUGH cache groups or to uninstall all Oracle objects in the AUTOREFRESH user's account.
install_flag TT_INTEGER NOT NULL If install_flag is 1, ttCacheSqlGet returns Oracle SQL to install the autorefresh or asynchronous writethrough Oracle objects.

If install_flag is 0, ttCacheSqlGet returns SQL to uninstall the previously created objects.


Result set

ttCacheSqlGet returns the result set:

Column Type Description
retval TT_VARCHAR (4096) NOT NULL The Oracle SQL statement to uninstall or install autorefresh or asynchronous writethrough Oracle objects.
continueFlag TT_SMALLINT NOT NULL Non zero only if the Oracle SQL statement in the retval result column exceeds 4096 bytes and must be continued into the next result row.

Example

CALL ttCacheSqlGet('INCREMENTAL_AUTOREFRESH', 'westernCustomers', 1);

To remove all Oracle objects in the AUTOREFRESH user's account, use:

CALL ttCacheSqlGet('INCREMENTAL_AUTOREFRESH', NULL, 0);

Notes

This procedure is available only for IMDB Cache.

Each returned retval field contains a separate Oracle SQL statement that may be directly executed on Oracle. A row may end in the middle of a statement, as indicated by the continueFlag field. In this case, the statement must be concatenated with the previous row to produce a usable SQL statement.

The script output of this procedure is not compatible with Oracle's SQL*Plus utility. However, you can use the ttIsql cachesqlget command to generate a script that is compatible with the SQL*Plus utility.

You can specify NULL for the cache_group_name option to generate Oracle SQL to clean up Oracle objects after a data store has been destroyed by the ttDestroy utility.