Impact on Cache Groups When Modifying the Oracle Database Schema

When you need to issue DDL statements such as CREATE, DROP or ALTER on cached Oracle Database tables in order to make changes to the Oracle Database schema, drop the affected cache groups before you modify the Oracle Database schema. Otherwise operations such as autorefresh may fail.

You do not need to drop cache groups if you are altering the Oracle Database table to add a column.

To issue other DDL statements for Oracle Database tables, first perform the following tasks:

  1. Use DROP CACHE GROUP statements to drop all cache groups that cache the affected Oracle Database tables. If you are dropping an AWT cache group, use the ttRepSubscriberWait built-in procedure to make sure that all committed changes on the cache tables have been propagated to the cached Oracle Database tables before the cache group is dropped.

    % ttIsql "DSN=cache1;UID=cacheadmin;PwdWallet=/wallets/cacheadminwallet"
    Command> CALL ttRepSubscriberWait('_AWTREPSCHEME','TTREP','_ORACLE','sys1',-1);
  2. Stop the cache agent.

  3. Make the desired changes to the Oracle Database schema.

  4. Use CREATE CACHE GROUP statements to re-create the cache groups, if feasible.

If you want to truncate an Oracle Database table that is cached in a cache group with autorefresh, perform the following tasks:

  1. Use an ALTER CACHE GROUP statement to set the cache group's autorefresh state to PAUSED.
  2. Truncate the Oracle Database table.
  3. Manually refresh the cache group using a REFRESH CACHE GROUP statement without a WHERE or WITH ID clause.

Autorefresh operations resume after you refresh the cache group.