ALTER ACTIVE STANDBY PAIR
This statement is not supported in TimesTen Scaleout.
In TimesTen Classic:
You can change an active standby pair by:
-
Adding or dropping a subscriber database
-
Altering store attributes
Only the
PORT
andTIMEOUT
attributes can be set for subscribers. -
Including tables, sequences or cache groups in the replication scheme
-
Excluding tables, sequences or cache groups from the replication scheme
See Making Other Changes to an Active Standby Pair in Oracle TimesTen In-Memory Database Replication Guide.
Required Privilege
ADMIN
Usage with TimesTen Scaleout
This statement is not supported with TimesTen Scaleout.
SQL Syntax
ALTER ACTIVE STANDBY PAIR {SubscriberOperation
|StoreOperation
|InclusionOperation
|NetworkOperation
} [...];
Syntax for SubscriberOperation
:
{ADD | DROP } SUBSCRIBER FullStoreName
Syntax for StoreOperation
:
ALTER STOREFullStoreName
SETStoreAttribute
Syntax for InclusionOperation
:
[{ INCLUDE | EXCLUDE }{TABLE [[Owner.]TableName [,...]]| CACHE GROUP [[Owner.]CacheGroupName [,...]]| SEQUENCE [[Owner.]SequenceName [,...]]} [,...]]
Syntax for NetworkOperation
:
ADD ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName { { MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost } PRIORITY Priority } [...] DROP ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName { MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost } [...]
Parameters
Parameter | Description |
---|---|
|
Indicates a subscriber database. |
|
Indicates that updates should no longer be sent to the specified subscriber database. This operation fails if the replication scheme has only one subscriber. |
|
Indicates changes to the attributes of a database. Only the See CREATE ACTIVE STANDBY PAIR For information on |
|
The database, specified as one of the following:
For example, if the database path is This is the database file name specified in the
|
|
Includes in or excludes from replication the tables, sequences or cache groups listed.
You cannot use the |
|
Adds Can be specified more than once. For |
|
Drops Can be specified more than once. For |
|
Clause can be specified more than once. Valid for both |
|
Variable expressed as an integer from 1 to 99. Denotes the priority of the IP address. Lower integral values have higher priority. An error is returned if multiple addresses with the same priority are specified. Controls the order in which multiple IP addresses are used to establish peer connections. Required syntax of |
Description
-
You must stop the replication agent before altering an active standby pair. The exceptions are for those objects and statements that are automatically replicated and included based on the values of the
DDL_REPLICATION_LEVEL
andDDL_REPLICATION_ACTION
attributes. See ALTER SESSION for more information. -
You can only alter the active standby pair replication scheme on the active database. See Making Other Changes to an Active Standby Pair in Oracle TimesTen In-Memory Database Replication Guide for more information.
-
Do not use
ALTER ACTIVE STANDBY PAIR
when using Oracle Clusterware with TimesTen. See Restricted Commands and SQL Statements in Oracle TimesTen In-Memory Database Replication Guide for more information.Instead, perform the tasks described in Changing the Schema section of the Oracle TimesTen In-Memory Database Replication Guide.
-
Use
ADD SUBSCRIBER
FullStoreName
to add a subscriber to the replication scheme. -
Use
DROP SUBSCRIBER
FullStoreName
to drop a subscriber from the replication scheme. -
Use the
INCLUDE
orEXCLUDE
clause to include the listed tables, sequences or cache groups in the replication scheme or to exclude them from the replication scheme. Use oneINCLUDE
orEXCLUDE
clause for each object type (table, sequence or cache group). TheALTER ACTIVE STANDBY
statement is not necessary for those objects and statements that are automatically replicated and included based on the values of theDDL_REPLICATION_LEVEL
andDDL_REPLICATION_ACTION
attributes. See ALTER SESSION for more information. However, ifDDL_REPLICATION_LEVEL
is 2 or greater andDDL_REPLICATION_ACTION
="EXCLUDE
", use theINCLUDE
clause to include replicated objects into the replication scheme. -
Do not use the
EXCLUDE
clause for AWT cache groups. -
When
DDL_REPLICATION_LEVEL
is 2 or greater, theINCLUDE
clause can only be used with empty tables on the active database. The contents of the corresponding tables on the standby and any subscribers will be truncated before the table is added to the replication scheme.
Examples
Add a subscriber to the replication scheme.
ALTER ACTIVE STANDBY PAIR ADD SUBSCRIBER rep4;
Drop two subscribers from the replication scheme.
ALTER ACTIVE STANDBY PAIR DROP SUBCRIBER rep3 DROP SUBSCRIBER rep4;
Alter the store attributes of the rep3
and rep4
databases.
ALTER ACTIVE STANDBY PAIR ALTER STORE rep3 SET PORT 23000 TIMEOUT 180 ALTER STORE rep4 SET PORT 23500 TIMEOUT 180;
Add a table, a sequence and two cache groups to the replication scheme.
ALTER ACTIVE STANDBY PAIR INCLUDE TABLE my.newtab INCLUDE SEQUENCE my.newseq INCLUDE CACHE GROUP my.newcg1, my.newcg2;
Add NetworkOperation
clause to active standby pair:
ALTER ACTIVE STANDBY PAIR ADD ROUTE MASTER rep1 ON "machine1" SUBSCRIBER rep2 ON "machine2" MASTERIP "1.1.1.1" PRIORITY 1 SUBSCRIBERIP "2.2.2.2" PRIORITY 1;