ttCacheADGStandbyStateSet

For an Active Data Guard environment, the user can call the ttCacheADGStandbyStateSet built-in procedure to inform the cache agent of the state of the standby Oracle database.

  • Set the state of the standby Oracle database to OK and the cache agent autorefreshes only those transactions that have been replicated from the primary Oracle database to the standby Oracle database.

    • If the standby Oracle database fails and if you have set a timeout with the ttCacheADGStandbyTimeoutSet built-in procedure, then the state changes to FAILED if the standby Oracle database does not respond after the timeout is reached.

    • If the standby Oracle database fails and you did not set the timeout, then autorefresh stalls until the standby Oracle database recovers (unless you set the state of the standby Oracle database to FAILED).

  • Set the state of the standby Oracle database to FAILED if you know the standby Oracle database has failed and it should not be used as part of the autorefresh. When you set the state to FAILED, the cache agent does not wait for transactions to be replicated to the standby Oracle database and continues the autorefresh with only the primary Oracle database. The cache agent does not include the standby Oracle database in the autorefresh, even if it has recovered and is currently active, until you change the state to OK.

Required Privilege

This procedure requires no privileges.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic but not supported in TimesTen Scaleout.

Related Views

This procedure has no related views.

Syntax

ttCacheADGStandbyStateSet('[OK | FAILED]')

Parameters

ttCacheADGStandbyStateSet has the parameters:

Parameter Type Description

ADGStandbyState

TT_VARCHAR(20) NOT NULL

OK: Tells the cache agent that the standby Oracle database in an Active Data Guard configuration is active. This is the default.

FAILED: Tells the cache agent that the standby Oracle database in the Active Data Guard configuration has failed. The cache agent does not try to contact the standby Oracle database and continues the autorefresh with only the primary Oracle database.

Result Set

ttCacheADGStandbyStateSet returns no results.

Examples

The following example shows how to call the ttCacheADGStandbyStateSet built-in procedure to set the state of the standby Oracle database in an Active Data Guard environment first to OK and then to FAILED. The ttCacheADGStandbyStateGet built-in procedure retrieves the value of the current state of the standby Oracle database.

Command> call ttCacheADGStandbyStateSet('OK');
Command> call ttCacheADGStandbyStateGet();
< OK >
1 row found.
 
Command> call ttCacheADGStandbyStateSet('FAILED');
Command> call ttCacheADGStandbyStateGet();
< FAILED >
1 row found.