Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
You can change an active standby pair by:
Adding or dropping a subscriber data store
Altering store attributes. Only the PORT and TIMEOUT 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 "Changing the configuration of an active standby pair" in Oracle TimesTen In-Memory Database TimesTen to TimesTen Replication Guide.
Required privilege
ADMIN
SQL syntax
ALTER ACTIVE STANDBY PAIR { SubscriberOperation | StoreOperation | InclusionOperation | NetworkOperation } [...]
Syntax for SubscriberOperation
:
{ADD | DROP } SUBSCRIBER FullStoreName
Syntax for StoreOperation
:
ALTER STORE FullStoreName SET StoreAttribute
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
ALTER ACTIVE STANDBY PAIR has the parameters:
Parameter | Description |
---|---|
ADD SUBSCRIBER FullStoreName |
Indicates a subscriber data store. FullStoreName is the data store file name specified in the DataStore attribute of the DSN description. |
DROP SUBSCRIBER FullStoreName |
Indicates that updates should no longer be sent to the specified subscriber data store. This operation fails if the replication scheme has only one subscriber. FullStoreName is the data store file name specified in the DataStore attribute of the DSN description. |
ALTER STORE FullStoreName SET StoreAttribute |
Indicates changes to the attributes of a data store. Only the PORT and TIMEOUT attributes can be set for subscribers. FullStoreName is the data store file name specified in the DataStore attribute of the DSN description.
For information on |
FullStoreName |
The data store, specified as one of the following:
For example, if the data store path is This is the data store file name specified in the
|
{INCLUDE|EXCLUDE}
|
Includes in or excludes from replication the tables, sequences or cache groups listed.
|
ADD ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName |
Adds NetworkOperation to replication scheme. Allows you to control the network interface that a master store uses for every outbound connection to each of its subscriber stores. In the context of the ADD ROUTE clause, each master data store is a subscriber of the other master data store and each read-only subscriber is a subscriber of both master data stores.
Can be specified more than once. For |
DROP ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName |
Drops NetworkOperation from replication scheme.
Can be specified more than once. For |
MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost |
MasterHost and SubscriberHost are the IP addresses for the network interface on the master and subscriber stores. Specify in dot notation or canonical format or in colon notation for IPV6.
Clause can be specified more than once. Valid for both |
PRIORITY Priority |
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
Your must stop the replication agent before altering the active standby pair.
You may only alter the active standby pair replication scheme on the active data store. See "Changing the configuration of an active standby pair" in Oracle TimesTen In-Memory Database TimesTen to TimesTen Replication Guide for more information.
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 ALTER STORE FullStoreName
SET StoreAttribute
to change the attributes for the specified data store. Only the PORT and TIMEOUT attributes can be set for subscribers.
Use the INCLUDE or EXCLUDE clause to include the listed tables, sequences or cache groups in the replication scheme, or to exclude them from the replication scheme. Use one INCLUDE clause for each object type (table, sequence or cache group). Use one EXCLUDE clause for each object type (table, sequence or cache group).
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
data stores.
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;
See also