7 Upgrades in TimesTen Classic
This chapter describes the process for upgrading to a new release of TimesTen Classic. For information on the upgrade process for TimesTen Scaleout, see "Upgrading a grid" and "Migrating, Backing Up and Restoring Data" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
Ensure you review the installation process in the preceding chapters before completing the upgrade procedures described in this chapter.
Topics include:
Overview of release numbers
There is a release numbering scheme for TimesTen releases. This scheme is relevant when discussing upgrades. For example, for a given release, a
.b
.c
.d
.e
:
-
a
indicates the first part of the major release. -
b
indicates the second part of the major release. -
c
indicates the patch set. -
d
indicates the patch level within the patch set. -
e
is reserved.
Important considerations:
-
Releases within the same major release (
a
.b
) are binary compatible. If a release is binary compatible, you do not have to recreate the database for the upgrade (or downgrade). -
Releases with a different major release are not binary compatible. In this case, you must recreate the database. See "Migrating a database" for details.
As an example, for the 22.1.1.10.0
release:
-
The first two numbers of the five-place release number (
22.1
) indicate the major release. -
The third number of the five-place release number (
1
) indicates the patch set. For example,22.1.1.10.0
is binary compatible with22.1.1.11.0
because the first two digits in the five-place release number (22
and1
) are the same. -
The fourth number of the five-place release number (
1
) indicates the patch level within the patch set.22.1.1.11.0
is the first patch level within patch set two. -
The fifth number of the five-place release number (
0
) is reserved.
Types of upgrades
TimesTen Classic supports two types of upgrades:
-
An offline upgrade requires that you close all TimesTen databases to prevent future connections to these databases, you disconnect all applications from TimesTen, and you stop all TimesTen databases. This type of upgrade is useful when some amount of downtime is acceptable. During this downtime, the TimesTen databases are unavailable.
An offline upgrade enables you to upgrade (or downgrade) to a new patch release or to upgrade to a major release:
-
Upgrade to a new patch release:
-
Run the
ttInstanceModify
utility with the-install
option to upgrade the instance. See "About moving to a different patch release by modifying the instance" for details. -
Run the
ttBackup
and thettRestore
utilities to upgrade patches and patch sets, although this is not the preferred method. See "Moving to a different patch release using ttBackup and ttRestore" for information.
-
-
Upgrade to a new major release: Run the
ttMigrate
utility to export a database to a flat file and then usettMigrate
again to import the data into the new database. This is the only method to perform an offline upgrade that involves moving between major releases. See "Moving to a different major release using ttMigrate" for details.
-
-
An online upgrade involves using a pair of databases that are replicated and then performing an offline upgrade of each database in turn. This type of upgrade is useful when it is critically important that downtime be at a minimum. See "Online upgrade: Using TimesTen replication" for details.
About moving to a different patch release by modifying the instance
This section contains information about moving to a different patch release of TimesTen by modifying the TimesTen instance. Moving to a different patch release includes upgrades and downgrades. See "Moving to a different patch release using ttBackup and ttRestore" for information on moving to a different patch release using backup and restore operations.
-
Start a database: The subdaemon either creates a new shared memory segment or re-attaches to an existing one. These operations are used to start a database:
-
Load: The subdaemon creates a new shared memory segment, and loads the contents of the most recent checkpoint file into this new shared memory segment.
-
Remap: The subdaemon re-attaches to an existing shared memory segment.
-
-
Stop a database: The subdaemon disconnects from the shared memory segment and either destroys the shared memory segment or preserves it. These operations are used to stop a database:
-
Unload (clean): The shared memory segment is written to the checkpoint file on disk (by performing a static checkpoint operation). The subdaemon disconnects from and destroys the shared memory segment. The load operation starts the database.
-
Detach (clean): The shared memory segment is optionally written to the checkpoint file on disk (by performing a static checkpoint operation). The subdaemon disconnects from the shared memory segment, but does not destroy it. The shared memory segment remains in memory. The remap operation starts the database.
-
Note:
For a complete list of the operations you use to start and stop a database, see "Managing TimesTen Databases" in the Oracle TimesTen In-Memory Database Operations Guide.-
Basic patch upgrade: A type of upgrade where the shared memory segment is destroyed when the database is stopped. A new shared memory segment is created when the database is started. This is the preferred method for performing a patch upgrade. See "About performing a basic patch upgrade" for details.
-
Fast patch upgrade: A type of upgrade where the shared memory segment is preserved in memory when the database is stopped. The same memory segment is used when the database is started. This is the preferred method if your databases are large and you have both critical uptime requirements and short maintenance windows. See "About performing a fast patch upgrade" for details.
About performing a basic patch upgrade
A basic patch upgrade is used when you do not have critical uptime requirements and short maintenance windows. When you stop the database, the contents of the shared memory segment is written to the checkpoint file on disk. The shared memory segment is then destroyed. When you start the database after an upgrade, a new shared memory segment is created and the contents of the checkpoint file are read into this newly created shared memory segment. Depending on the size of your database, the checkpoint operation performed when the database stops and the subsequent ramLoad
operation performed when the database starts could be time consuming.
The process involves downloading the TimesTen full distribution (the upgrade release) and creating a new installation. The instance that requires upgrading is then modified to point to the new installation. The ttInstanceModify
utility is used to perform this instance modification. As previously noted, you must close all TimesTen databases and disconnect all applications from TimesTen.
Download and create the new installation
To upgrade to a new patch release of TimesTen, you must first create the new installation.
About performing a fast patch upgrade
Consider performing a fast patch upgrade when you have large databases and you have both critical uptime requirements and short maintenance windows. During the fast patch upgrade, the static checkpoint operation performed at database stop is optional, and the shared memory segment is preserved after the subdaemon disconnects. When the database is started, the checkpoint operation is not performed and a new subdaemon connects to this preserved shared memory segment. This reduces the time it takes to upgrade an instance, especially if your databases are large, by skipping both the load of the database into memory operation and the checkpoint operation.
To use a fast patch upgrade, the ramPolicy
for the database must be set to enduring
. This keeps the database image in memory after the subdaemon disconnects. See "Specifying a RAM policy" in the Oracle TimesTen In-Memory Database Operations
Guide for information on setting a RAM policy.
The size of the TimesTen shared memory segment must remain the same before and after the fast patch upgrade. The TimesTen ttShmSize
utility is provided to calculate the size of the shared memory segment. Run this utility before you upgrade the instance and then run it again after you upgrade the instance to ensure the size of the shared memory segment has not changed after the upgrade. In addition, ensure you do not modify the PermSize
, the TempSize
, the LogBufMB
, and the Connections
connection attributes after the upgrade. These attributes affect the size of the shared memory segment.
See "ttShmSize" and "Connection Attributes" in the Oracle TimesTen In-Memory Database
Reference for information on the ttShmSize
utility and the TimesTen connection attributes.
Download and create the new installation
To upgrade to a new patch release of TimesTen, you must first create the new installation.
Prepare to detach the subdaemon from the shared memory segment
Perform these operations on the instance created with the current release of TimesTen (22.1.1.10.0
, in this example).
Detach the subdaemon from the shared memory segment
Perform these steps to disconnect the subdaemon from the shared memory segment.
Moving to a different patch release using ttBackup and ttRestore
You can run the ttBackup
and ttRestore
utilities to move to a new patch release, although this is not the preferred method. See "About moving to a different patch release by modifying the instance" for the preferred method.
Perform these steps for each database.
On the old release:
- Use the
ttAdmin
utility to close thedatabase1
database. This prevents further user connections.% ttAdmin -close database1 RAM Residence Policy : manual Manually Loaded In RAM : True Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
- Disconnect all applications from the database. Run the
ttStatus
utility to verify there are no connections to the database (database1
, in this example).% ttStatus TimesTen status report as of Sat Oct 2 04:37:10 2021 Daemon pid 4649 port 6624 instance myinstance TimesTen server pid 4656 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Data store /scratch/ttuser/database1 Daemon pid 4649 port 6624 instance myinstance TimesTen server pid 4656 started on port 6625 There are no connections to the data store Closed to user connections RAM residence policy: manual Data store is manually loaded into RAM Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Accessible by group g900 End of report
-
Run the
ttVersion
utility to verify the current release (22.1.1.10.0
, in this example).% ttVersion TimesTen Release 22.1.1.1.0 (64 bit Linux/x86_64) (myinstance:6624) 2021-09-16T07:41:05Z Instance admin: instanceadmin Instance home directory: /scratch/ttuser/myinstance20/myinstance Group owner: g900 Daemon home directory: /scratch/ttuser/myinstance/myinstance/info PL/SQL enabled.
-
Backup the database. In this example, backup the
database1
database for release22.1.1.10.0
.% ttBackup -dir /tmp/dump/backup -fname database1_2211 database1 Backup started ... Backup complete
-
Unload the database from memory. This example assumes a RAM policy of manual. See "Specifying a RAM policy" in the Oracle TimesTen In-Memory Database Operations Guide for information on the RAM policy.
% ttAdmin -ramUnload database1 RAM Residence Policy : manual Manually Loaded In RAM : False Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
-
Stop the TimesTen main daemon.
% ttDaemonAdmin -stop TimesTen Daemon (PID: 4649, port: 6624) stopped.
For the new release:
Once your databases are correctly configured and fully operational, you can optionally remove the backup file (in this example, /tmp/dump/backup/database1_2211
).
Moving to a different major release using ttMigrate
Moving to a different major release is done through migration. Migration includes upgrading from one major TimesTen release to a new major TimesTen release, or changing the operating system platform that TimesTen runs on.
Migration involves copying out the schema and data from one database, creating a new database with the new release, and then creating the schema and inserting the data into the new database. The ttMigrate
utility is used to automate the migration of databases. See "ttMigrate" in the Oracle TimesTen In-Memory Database
Reference for information on the ttMigrate
utility.
Before migrating a database from one major release to another, ensure you backup the database in the old release. See "ttBackup" and "ttRestore" in Oracle TimesTen In-Memory Database Reference and "Backing up and restoring a database" in this book for details.
Follow these steps to perform the upgrade:
For the old release:
-
Use the
ttAdmin
utility to close thedatabase1
database. This prevents further user connections.% ttAdmin -close database1 RAM Residence Policy : manual Manually Loaded In RAM : True Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
-
Disconnect all applications from the database. Run the
ttStatus
utility to verify there are no connections to the database (database1
, in this example).% ttStatus TimesTen status report as of Sat Oct 2 18:31:59 2021 Daemon pid 28436 port 6624 instance myinstance TimesTen server pid 28443 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Data store /scratch/ttuser/database1 Daemon pid 28436 port 6624 instance myinstance TimesTen server pid 28443 started on port 6625 There are 13 connections to the data store Shared Memory KEY 0x061014ae ID 491521 PL/SQL Memory Key 0x071014ae ID 524290 Address 0x5000000000 Type PID Context Connection Name ConnID Subdaemon 28440 0x0000000001893250 Manager 2047 Subdaemon 28440 0x0000000001914210 Rollback 2046 Subdaemon 28440 0x00007f55d80008c0 Deadlock Detector 2043 Subdaemon 28440 0x00007f55d807f330 Log Marker 2040 Subdaemon 28440 0x00007f55dc0008c0 Monitor 2044 Subdaemon 28440 0x00007f55dc07f330 AsyncMV 2039 Subdaemon 28440 0x00007f55e00008c0 Checkpoint 2042 Subdaemon 28440 0x00007f55e007f330 Aging 2041 Subdaemon 28440 0x00007f55e40008c0 Flusher 2045 Subdaemon 28440 0x00007f55e40a6970 HistGC 2038 Subdaemon 28440 0x00007f56600008c0 XactId Rollback 2036 Subdaemon 28440 0x00007f56641b9cb0 IndexGC 2037 Subdaemon 28440 0x00007f5668048360 Garbage Collector 2035 Closed to user connections RAM residence policy: Manual Data store is manually loaded into RAM Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Accessible by group g900 End of report
-
Run the
ttVersion
utility to verify the current release.% ttVersion TimesTen Release tt22.1.1.10.0 (64 bit Linux/x86_64) (myinstance:6624) 2021-09-12T07:34:06Z Instance admin: instanceadmin Instance home directory: /scratch/ttuser/myinstance Group owner: g900 Daemon home directory: /scratch/ttuser/myinstance/info PL/SQL enabled.
-
Use the
ttMigrate
utility to copy out the schema and data from the database (database1
, in this example).% ttMigrate -c database1 /tmp/database1.data Saving profile DEFAULT Profile successfully saved. Saving profile SYSTEM Profile successfully saved. Saving user PUBLIC User successfully saved. Saving table TTUSER.COUNTRIES Saving foreign key constraint COUNTR_REG_FK Saving rows... 25/25 rows saved. Table successfully saved. Saving table TTUSER.DEPARTMENTS Saving foreign key constraint DEPT_LOC_FK Saving rows... 27/27 rows saved. Table successfully saved. Saving table TTUSER.EMPLOYEES Saving index TTUSER.TTUNIQUE_0 Saving foreign key constraint EMP_DEPT_FK Saving foreign key constraint EMP_JOB_FK Saving rows... 107/107 rows saved. Table successfully saved. Saving table TTUSER.JOBS Saving rows... 19/19 rows saved. Table successfully saved. Saving table TTUSER.JOB_HISTORY Saving foreign key constraint JHIST_DEPT_FK Saving foreign key constraint JHIST_EMP_FK Saving foreign key constraint JHIST_JOB_FK Saving rows... 10/10 rows saved. Table successfully saved. Saving table TTUSER.LOCATIONS Saving foreign key constraint LOC_C_ID_FK Saving rows... 23/23 rows saved. Table successfully saved. Saving table TTUSER.REGIONS Saving rows... 4/4 rows saved. Table successfully saved. Saving view TTUSER.EMP_DETAILS_VIEW View successfully saved. Saving sequence TTUSER.DEPARTMENTS_SEQ Sequence successfully saved. Saving sequence TTUSER.EMPLOYEES_SEQ Sequence successfully saved. Saving sequence TTUSER.LOCATIONS_SEQ Sequence successfully saved.
-
Unload the database from memory. This example assumes a RAM policy of manual. See "Specifying a RAM policy" in the Oracle TimesTen In-Memory Database Operations Guide for information on the RAM policy.
% ttAdmin -ramUnload database1 RAM Residence Policy : manual Manually Loaded In RAM : False Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
-
Stop the TimesTen main daemon.
% ttDaemonAdmin -stop TimesTen Daemon (PID: 28436, port: 6624) stopped.
-
Copy the migrated object files (
/tmp/database1.data
, in this example) to a file system that is accessible by the instance in the new release.
For the new release:
Once the database is operational in the new release, create a backup of this database to have a valid restoration point for your database. Once you have created a backup of your database, you may delete the ttMigrate
copy of your database (in this example, /tmp/database1.data
). Optionally, for the old release, you can remove the instance and delete the installation.
Ensure you recompile and relink existing ODBC and OCI applications after you perform the upgrade and before you use the new release of TimesTen. See "Overview of ODBC API incompatibilities" in the Oracle TimesTen In-Memory Database C Developer's Guide for more information.
Online upgrade: Using TimesTen replication
When upgrading to a new release of TimesTen Classic, you may have a mission-critical database that must remain continuously available to your applications. You can use TimesTen replication to keep two copies of a database synchronized, even when the databases are from different releases of TimesTen, allowing your applications to stay connected to one copy of the database while the instance for the other database is being upgraded. When the upgrade is finished, any updates that have been made on the active database are transmitted immediately to the database in the upgraded instance, and your applications can then be switched with no data loss and no downtime. See "Performing an online upgrade with classic replication" for information.
The online upgrade process supports only updates to user tables during the upgrade. The tables to be replicated must have a PRIMARY KEY
or a unique index on non-nullable columns. Data definition changes such as CREATE TABLE
or CREATE INDEX
are not replicated except in the case for an active standby pair with DDLReplicationLevel
set to 2
. In the latter case, CREATE
TABLE
and CREATE
INDEX
are replicated.
Because two copies of the database (or two copies of each database, if there are more than one) are required during the upgrade, you must have available twice the memory and disk space normally required, if performing the upgrade on a single host.
Note:
-
Online major upgrades for active standby pairs with cache groups are only supported for read-only cache groups.
-
Online major upgrades for active standby pairs that are managed by Oracle Clusterware are not supported.
Performing an online upgrade with classic replication
This section describes how to use the TimesTen replication feature to perform online upgrades for applications that require continuous data availability.
This procedure is for classic replication in a unidirectional, bidirectional, or multidirectional scenario.
Typically, applications that require high availability of their data use TimesTen replication to keep at least one extra copy of their databases up to date. An online upgrade works by keeping one of these two copies available to the application while the other is being upgraded. The procedures described in this section assume that you have a bidirectional replication scheme configured and running for two databases, as described in "Unidirectional or bidirectional replication" in the Oracle TimesTen In-Memory Database Replication Guide.
Note the following:
-
For active standby pairs, see "Online upgrades for an active standby pair with no cache groups" and "Online upgrades for an active standby pair with cache groups" for details. Online major upgrades for active standby pairs with cache groups are only supported for read-only cache groups. Instead see "Offline upgrades for an active standby pair with cache groups" for this information.
-
For the use of Oracle Clusterware, see "Performing an online TimesTen upgrade when using Oracle Clusterware" for information. Online major upgrades are not supported for active standby pairs managed by Oracle Clusterware.
The following sections describe how to perform an online upgrade with replication.
Requirements
To perform online upgrades with replication, replication must be configured to use static ports. See "Port assignments" in Oracle TimesTen In-Memory Database Replication Guide for information.
Additional disk space must be allocated to hold a backup copy of the database made by the ttMigrate
utility. The size of the backup copy is typically about the same as the in-use size of the database. This size may be determined by querying the v$monitor
view, using ttIsql
:
Command> SELECT perm_in_use_size FROM v$monitor;
Upgrade steps
The following steps illustrate how to perform an online upgrade while replication is running. The upgrade host is the host on which the database upgrade is being performed, and the active host is the host containing the database to which the application remains connected.
Step | Upgrade host | Active host |
---|---|---|
1. |
Configure replication to replicate to the active host using static ports. |
Configure replication to replicate to the upgrade host using static ports. |
2. |
n/a |
Connect all applications to the active database, if they are not connected. |
3. |
Disconnect all applications from the database that will be upgraded. |
n/a |
4. |
n/a |
Set replication to the upgrade host to the |
5. |
Wait for updates to propagate to the active host. |
n/a |
6. |
Stop replication. |
n/a |
7. |
Back up the database with |
n/a |
8. |
Stop the TimesTen daemon for the old release. |
n/a |
9. |
Create a new installation and a new instance for the new release. See "Creating an installation on Linux/UNIX" and "Creating an instance on Linux/UNIX: Basics" for information. |
n/a |
10. |
Create a DSN for the post-upgrade database for the new release. Adjust parallelism options for the DSN. |
n/a |
11. |
Restore the database from the backup with |
n/a |
12. |
Clear the replication bookmark and logs using |
n/a |
13. |
Start replication. |
n/a |
14. |
n/a |
Set replication to the upgrade host to the |
15. |
n/a |
Start replication. |
16. |
n/a |
Wait for all of the updates to propagate to the upgrade host. |
17. |
Reconnect all applications to the post-upgrade database. |
n/a |
After the above procedures are completed on the upgrade host, the active host can be upgraded using the same steps.
Online upgrade example
This section describes how to perform an online upgrade in a scenario with two bidirectionally replicated databases.
In the following discussion, the two hosts are referred to as the upgrade host, on which the instance (with its databases) is being upgraded, and the active host, which remains operational and connected to the application for the duration of the upgrade. After the procedure is completed, the same steps can be followed to upgrade the active host. However, you may prefer to delay conversion of the active host to first test the upgraded instance.
The upgrade host in this example consists of the database upgrade
on the server upgradehost
. The active host consists of the database active
on the server activehost
.
Follow these steps in the order they are presented:
Step | Upgrade host | Active host |
---|---|---|
1. |
Use
|
Use
|
2. |
Disconnect all production applications connected to the database. Any workload being run on the upgrade host must start running on the active host instead. |
Use the ttRepAdmin -receiver -name upgrade -state pause active This command temporarily stops the replication of updates from the database See "Set the replication state of subscribers" in Oracle TimesTen In-Memory Database Replication Guide for details. |
3. |
Wait for all replication updates to be sent to the database For example, call the Command> call ttRepSubscriberWait (,,,,60); < 00 > 1 row found. See "ttRepSubscriberWait" in the Oracle TimesTen In-Memory Database Reference for information. |
n/a |
4. |
Stop the replication agent with ttAdmin -repStop upgrade From this point on, no updates are sent to the database |
Stop the replication agent with ttAdmin -repStop active From this point on, no updates are sent to the database See "Starting and stopping the replication agents" in Oracle TimesTen In-Memory Database Replication Guide for details. |
5. |
Use ttMigrate -c upgrade /backup/upgrade.dat |
n/a |
6. |
If the ttDestroy upgrade |
Restart the replication agent on the database ttAdmin -repStart active |
7. |
Create a new installation and a new instance for the new release. See "Creating an installation on Linux/UNIX" and "Creating an instance on Linux/UNIX: Basics" for information. |
Resume replication from ttRepAdmin -receiver -name upgrade -start start active |
8. |
Use ttMigrate -r upgrade /backup/upgrade.dat Change the ramPolicy to manual (The ramPolicy is set to inUse by default).
ttAdmin -ramLoad upgrade Note: In this step, you must use the |
n/a |
9. |
Use ttRepAdmin -receiver -name active -reset upgrade ttRepAdmin -receiver -name active -state stop upgrade sleep 10 ttRepAdmin -receiver -name active -state start upgrade sleep 10 Note: The |
n/a |
10. |
Use ttAdmin -repStart upgrade |
n/a |
11. |
Verify that the database |
If the applications are still running on the database |
12. |
n/a |
Once you are sure that updates are replicated correctly, you can disconnect all of the applications from the database Note: You may choose to delay upgrading the instance with |
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.
Performing an offline TimesTen upgrade when using Oracle Clusterware
This section discusses the steps for an offline upgrade of TimesTen when using TimesTen with Oracle Clusterware. You have the option of also upgrading Oracle Clusterware, independently, while upgrading TimesTen. (See "Performing an online TimesTen upgrade when using Oracle Clusterware" for details on online upgrade.)
Note:
-
These instructions apply for either a TimesTen patch upgrade (for example, from
22.1
.w.x to22.1
.y.z) or a TimesTen major upgrade (for example, from18.1
to22.1
). -
Refer to the Oracle TimesTen In-Memory Database Release Notes for information about versions of Oracle Clusterware that are supported by TimesTen.
For this procedure, except where noted, you can execute the ttCWAdmin
commands from any host in the cluster. Each command affects all hosts.
Performing an online TimesTen upgrade when using Oracle Clusterware
This section discusses how to perform an online rolling upgrade (patch) for TimesTen, from TimesTen 22.1
.w.x to 22.1
.y.z, in a configuration where Oracle Clusterware manages active standby pairs. (See "Performing an offline TimesTen upgrade when using Oracle Clusterware" for an offline upgrade.)
The following topics are covered:
-
Upgrades for multiple active standby pairs on many pairs of hosts
-
Upgrades for multiple active standby pairs on a pair of hosts
Note:
-
Refer to Oracle TimesTen In-Memory Database Release Notes for supported versions of Oracle Clusterware.
Supported configurations
The following basic configurations are supported for online rolling upgrades for TimesTen. In all cases, Oracle Clusterware manages the hosts.
-
One active standby pair on two hosts.
-
Multiple active standby pairs with one database on each host.
-
Multiple active standby pairs with one or more database on each host.
(Other scenarios, such as with additional spare hosts, are effectively equivalent to one of these scenarios.)
Restrictions and assumptions
Note the following assumptions for upgrading TimesTen when using Oracle Clusterware:
-
The existing active standby pairs are configured and operating properly.
-
Oracle Clusterware commands are used correctly to stop and start the standby database.
-
The upgrade does not change the TimesTen environment for the active and standby databases.
-
These instructions are for TimesTen patch upgrades only. Online major upgrades are not supported in configurations where Oracle Clusterware manages active standby pairs.
-
There are at least two hosts managed by Oracle Clusterware.
Multiple active or standby databases managed by Oracle Clusterware can exist on a host only if there are at least two hosts in the cluster.
Note:
Upgrade Oracle Clusterware if desired, but not concurrently with an online TimesTen upgrade. When performing an online TimesTen patch upgrade in configurations where Oracle Clusterware manages active standby pairs, you must perform the Clusterware upgrade independently and separately, either before or after the TimesTen upgrade.
Note:
For information about Oracle Clusterware, see "Oracle Clusterware" in the Oracle Database documentation.
Upgrade tasks for one active standby pair
This section describes the following tasks:
Note:
In examples in the following subsections, the host name is host2
, the DSN is myDSN
, the instance name is upgrade2
, and the instance administrator is terry
.
Verify that the active standby pair is operating properly
Complete these steps to confirm that the active standby pair is operating properly.
Perform an upgrade for the standby database
Complete these steps for an offline upgrade of the instance for the standby database.
- Create a new installation. See "Creating an installation on Linux/UNIX" for information.
- Point the instance to the new installation. See "Associate an instance with a different installation (upgrade or downgrade)" for details.
- Configure the new installation for Oracle Clusterware.
Switch the roles of the active and standby databases
Use the ttCWAdmin -switch
command to switch the roles of the active and standby databases to enable the offline upgrade on the other master database.
ttCWAdmin -switch -dsn myDSN
Use the ttCWAdmin -status
command to verify that the switch operation has completed before starting the next task.
Shut down the new standby database
Use the Oracle Clusterware crsctl status resource
command to obtain the names of the Master, Daemon, and Agent processes on the host of the new standby database. This example assumes the host host1
and filters the output through grep TT
:
crsctl status resource -n host1 | grep TT
Run commands such as those in "Shut down the standby database" and use the appropriate instance name, instance administrator, DSN, and host name. For example:
crsctl stop resource TT_Master_upgrade2_terry_MYDSN_0 crsctl stop resource TT_Daemon_upgrade2_terry_host1 crsctl stop resource TT_Agent_upgrade2_terry_host1 ttDaemonAdmin -stop
Perform an upgrade of the new standby database
See "Perform an upgrade for the standby database" for the steps.
Start the new standby database
See "Start the standby database" and use the Master process name obtained by the crsctl status resource
command from "Shut down the new standby database" as outlined above.
ttCWAdmin -init -hosts localhost crsctl start resource TT_Master_upgrade2_terry_MYDSN_0
Upgrades for multiple active standby pairs on many pairs of hosts
The process to upgrade the instances for multiple active standby pairs on multiple pairs of hosts is essentially the same as the process to upgrade the instances for a single active standby pair on two hosts. See "Upgrade tasks for one active standby pair" for details. The best practice is to perform the upgrades for the active standby pairs one at a time.
Use the ttCWAdmin -status
command to determine the state of the databases managed by Oracle Clusterware.
Upgrades for multiple active standby pairs on a pair of hosts
Multiple active standby pairs can be on multiple pairs of hosts. See "Upgrades for multiple active standby pairs on many pairs of hosts" for details. Alternatively, multiple active standby pairs can be on a single pair of hosts. One scenario is for all the active databases to be on one host and all the standby databases to be on the other. A more typical scenario, to better balance the workload, is for each host to have some active databases and some standby databases.
Figure 7-1 shows two active standby pairs on two hosts managed by Oracle Clusterware. The active database called active1
on host1
replicates to standby1
on host2
. The active database called active2
on host2
replicates to standby2
on host1
. AWT updates from both standby databases are propagated to the Oracle database. Read-only updates from the Oracle database are propagated to the active databases.
Figure 7-1 Multiple active standby pairs on two hosts

Description of "Figure 7-1 Multiple active standby pairs on two hosts"
This configuration can result in greater write throughput for cache groups and more balanced resource usage. See the next section, "Sample configuration files: multiple active standby pairs on one pair of hosts", for sample sys.odbc.ini
entries and a sample cluster.oracle.ini
file for this kind of configuration. (See "Configuring Oracle Clusterware management with the cluster.oracle.ini file" in the Oracle TimesTen In-Memory Database Replication
Guide for information about that file.)
The rolling upgrade process for multiple active standby pairs on a single pair of hosts is similar in nature to the process of upgrading multiple active standby pairs on multiple pairs of hosts. See "Upgrades for multiple active standby pairs on many pairs of hosts" for details.
First, however, if the active and standby databases are mixed between the two hosts, switch all standby databases to one host and all active databases to the other host. Use the ttCWAdmin -switch -dsn
DSN
command to switch active and standby databases between hosts. Once all the active databases are on one host and all the standby databases are on the other host, follow the steps below to perform the upgrade for the entire "standby" host.
Be aware that upgrades affect the entire instance and associated databases on one host.
- Verify that the standby databases run on the desired host. Use the
ttCWAdmin -status -dsn
DSN
command and thettCWAdmin -status
command. - Modify the Oracle Clusterware
stop
commands to stop all Master processes on the host where all the standby databases reside. - Modify the Oracle Clusterware
start
commands to start all Master processes on the host where all the standby databases reside.
The following subsections contain related samples.
Sample configuration files: multiple active standby pairs on one pair of hosts
The following are sample sys.odbc.ini
entries:
[databasea] Driver=timesten_home/install/lib/libtten.so DataStore=/scratch/terry/ds/databasea PermSize=400 TempSize=320 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databaseb] Driver=timesten_home/install/lib/libtten.so DataStore=/scratch/terry/ds/databaseb PermSize=400 TempSize=320 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databasec] Driver=timesten_home/install/lib/libtten.so DataStore=/scratch/terry/ds/databasec PermSize=400 TempSize=320 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databased] Driver=timesten_home/install/lib/libtten.so DataStore=/scratch/terry/ds/databased PermSize=400 TempSize=320 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL
The following is a sample cluster.oracle.ini
file:
[databasea] MasterHosts=host1,host2 CacheConnect=Y [databaseb] MasterHosts=host2,host1 CacheConnect=Y [databasec] MasterHosts=host2,host1 CacheConnect=Y [databased] MasterHosts=host1,host2 CacheConnect=Y
The cluster.oracle.ini
file places one active database and one standby database on each host. This is accomplished by reversing the order of the host names specified for the MasterHost
attribute.
Sample scripts: stopping and starting multiple standby processes on one host
Run an Oracle Clusterware command similar to the following to obtain the names of the Oracle Clusterware Master, Daemon and Agent processes on the host of the standby database. It is suggested to filter the output by using the grep TT
:
crsctl status resource -n standbyHostName | grep TT
The following script is an example of a "stop standby" script for multiple databases on the same host that Oracle Clusterware manages. The instance name is upgrade2
. The instance administrator is terry
. The host is host2
. There are two standby databases: databasea
and databaseb
.
crsctl stop resource TT_Master_upgrade2_terry_DATABASEA_0 crsctl stop resource TT_Master_upgrade2_terry_DATABASEB_1 crsctl stop resource TT_Daemon_upgrade2_terry_HOST2 crsctl stop resource TT_Agent_upgrade2_terry_HOST2 ttDaemonAdmin -stop
The following script is an example of a "start standby" script for the same configuration.
ttCWAdmin -init -hosts localhost crs start resource TT_Master_upgrade2_terry_DATABASEA_0 crs start resource TT_Master_upgrade2_terry_DATABASEB_1
Upgrades when using parallel replication
You can perform an online or offline upgrade from a database that has not enabled parallel replication to a database that has enabled automatic parallel replication (with or without disabled commit dependencies). See "ReplicationApplyOrdering" attribute, in the Oracle TimesTen In-Memory Database Reference for information on setting automatic parallel replication values.
The remainder of this section discusses additional considerations along with scenarios where an offline upgrade is required.
Considerations regarding parallel replication
Be aware of the following considerations when upgrading hosts that use parallel replication:
-
Consider an active standby pair without parallel replication enabled. To upgrade the instances to a
22.1
release and use automatic parallel replication (default value of0
for theReplicationApplyOrdering
attribute), use the appropriate procedure for an active standby pair upgrade. See "Performing an upgrade with active standby pair replication" for details. -
Consider an active standby pair with no cache groups and automatic parallel replication enabled (value of
0
for theReplicationApplyOrdering
attribute). To upgrade the instances to a22.1
release to use automatic parallel replication with disabled commit dependencies (value of2
for theReplicationApplyOrdering
attribute), use the procedure for an active standby pair online major upgrade. See "Online major upgrade for active standby pair" for details. The value for theReplicationApplyOrdering
attribute must be changed from0
to2
before restoring any of the databases. For example:ttMigrate -r "DSN=master2;ReplicationApplyOrdering=2;ReplicationParallelism=2; LogBufParallelism=4" master2.bak
Note:
You may upgrade a database with a replication scheme with
ReplicationApplyOrdering=2
to a database withReplicationApplyOrdering=0
by using the same active standby pair online major upgrade procedure.Automatic parallel replication with disabled commit dependencies supports only asynchronous active standby pairs with no cache groups. For more information, see "Configuring parallel replication" in the Oracle TimesTen In-Memory Database Replication Guide.
-
You cannot replicate between databases that have the
ReplicationParallelism
attribute set to greater than1
but have different values for theReplicationApplyOrdering
attribute.
Scenarios that require an offline upgrade
You must use an offline upgrade for these scenarios:
-
Moving from an automatic parallel replication environment to another automatic parallel replication environment with a different number of tracks, as indicated by the value of the
ReplicationParallelism
attribute. -
Moving between major releases (for example, from
18.1
to22.1
) and using asynchronous writethrough cache groups. -
Moving from regular replication with asynchronous writethrough in
18.1
to automatic parallel replication with asynchronous writethrough in22.1
.
Use the procedure described in "Moving to a different major release using ttMigrate" for offline upgrades. Alternatively, you can upgrade one side and use the ttRepAdmin -duplicate -recreate
command to create the new database.
Performing an upgrade of your client instance
You can upgrade your client instance which is being used to access a database in a full instance. For information on instances, see "Overview of installations and instances" and "TimesTen instances" for details. For information on Client/Server, see "Overview of the TimesTen Client/Server" in the Oracle TimesTen In-Memory Database Operations Guide.
To perform the upgrade, follow these steps: