Performing an Upgrade with Active Standby Pair Replication
Active standby pair replication provides high availability of your data to your applications. With active standby pairs, unless you want to perform an upgrade to a new major release in a configuration that also uses asynchronous writethrough cache groups, you can perform an online upgrade to maintain continuous availability of your data during an upgrade. This section describes the following procedures:
-
Online Upgrades for an Active Standby Pair with No Cache Groups
-
Online Upgrades for an Active Standby Pair with Cache Groups
-
Offline Upgrades for an Active Standby Pair with Cache Groups
Note:
Only asynchronous writethrough or read-only cache groups are supported with active standby pairs.
Online Upgrades for an Active Standby Pair with No Cache Groups
This section includes the following topics for online upgrades in a scenario with active standby pairs and no cache groups:
Also see "Performing an Online Upgrade with Classic Replication" for an overview, limitations, and requirements.
Online Patch Upgrade for Standby Master and Subscriber
To perform an online upgrade to a new patch release for the standby master database and subscriber databases, complete the following tasks on each database. For this procedure, assume there are no cache groups.
Online Patch Upgrade for Active Master
To perform an online upgrade to a new patch release for the active master database, you must first reverse the roles of the active and standby master databases, then perform the upgrade. For this procedure, assume there are no cache groups.
Online Major Upgrade for Active Standby Pair
When you perform an online upgrade for an active standby pair to a new major release of TimesTen, you must explicitly specify the TCP/IP port for each database. If your active standby pair replication scheme is not configured with a PORT
attribute for each database, you must use the following steps to prepare for the upgrade. For this procedure, assume there are no cache groups. (Online major upgrades for active standby pairs with cache groups are only supported for read-only cache groups.)
-
Stop the replication agent on every database using the call
ttRepStop
built-in procedure or thettAdmin
utility. For example, to stop the replication agent on themaster1
database:ttAdmin -repStop master1
-
On the active master database, use the
ALTER ACTIVE STANDBY PAIR
statement to specify aPORT
attribute for every database in the active standby pair. For example, to set aPORT
attribute for themaster1
database on themaster1host
host and themaster2
database on themaster2host
host and thesubscriber1
database on thesubscriber1host
host:ALTER ACTIVE STANDBY PAIR ALTER STORE master1 ON "master1host" SET PORT 30000 ALTER STORE master2 ON "master2host" SET PORT 30001 ALTER STORE subscriber1 ON "subscriber1host" SET PORT 30002;
-
Destroy the standby master database and all of the subscribers using the
ttDestroy
utility. For example, to destroy thesubscriber1
database:ttDestroy subscriber1
-
Follow the normal procedure to start an active standby pair and duplicate the standby and subscriber databases from the active master. See Setting Up an Active Standby Pair with No Cache Groups in the Oracle TimesTen In-Memory Database Replication Guide for details.
To upgrade the instances of the active standby pair, first upgrade the instance of the standby master. While this node is being upgraded, there is no standby master database, so updates on the active master database are propagated directly to the subscriber databases. Following the upgrade of the standby node, the active and standby roles are switched and the new standby node is created from the new active node. Finally, the subscriber nodes are upgraded.
Online Upgrades for an Active Standby Pair with Cache Groups
This section includes the following topics for online patch upgrades in a scenario with active standby pairs and cache groups:
-
Online Patch Upgrade for Standby Master and Subscriber (Cache Groups)
-
Online Major Upgrade for Active Standby Pair (Read Only Cache Groups)
Also see "Performing an Online Upgrade with Classic Replication" for an overview, limitations, and requirements.
Online Patch Upgrade for Standby Master and Subscriber (Cache Groups)
To perform an online upgrade to a new patch release for the standby master database and subscriber databases, in a configuration with cache groups, complete the following tasks on each database (with exceptions noted).
Note:
Steps 2 and 4, stopping and restarting the cache agent, are not applicable for subscriber databases.
Online Patch Upgrade for Active Master (Cache Groups)
To perform an online upgrade to a new patch release for the active master database, in a configuration with cache groups, perform the following steps. You must first reverse the roles of the active and standby master databases, then perform an the upgrade.
Online Major Upgrade for Active Standby Pair (Read Only Cache Groups)
Complete the following steps to perform a major upgrade in a scenario with an active standby pair with read-only cache groups. This example upgrades from the 18.1
release to the 22.1
These steps assume that master1
is the active master database on the master1host
host and master2
is the standby master database on the master2host
host.
Note:
For more information on the built-in procedures and utilities discussed here, see Built-In Procedures and Utilities in the Oracle TimesTen In-Memory Database Reference.
Offline Upgrades for an Active Standby Pair with Cache Groups
Performing a major upgrade in a scenario with an active standby pair with asynchronous writethrough cache groups requires an offline upgrade. This is discussed in the subsection that follows.
Offline Major Upgrade for Active Standby Pair (Cache Groups)
Complete the following steps to perform a major upgrade in a scenario with an active standby pair with cache groups. You must perform this upgrade offline. (This example assumes you want to upgrade from release 18.1
to release 22.1
These steps assume master1
is an active master database on the master1host
host and master2 is a standby master database on the master2host
host. (For information about the built-in procedures and utilities discussed, refer to Built-In Procedures and Utilities in Oracle TimesTen In-Memory Database
Reference.)
If you want to create read-only subscriber databases, on each subscriber host you can create the subscriber by using the ttRepAdmin
utility -duplicate
option to duplicate the standby database. The following example creates subscriber1
, using the same ADMIN
user as above and the -nokeepCG
option to convert the cache tables to normal TimesTen tables, as appropriate for a read-only subscriber.
ttRepAdmin -duplicate -from master2 -host master2host -nokeepCG -uid pat -pwd patpwd subscriber1
For related information, refer to Rolling Out a Disaster Recovery Subscriber in the Oracle TimesTen In-Memory Database Replication Guide.