|Oracle® TimesTen In-Memory Database TimesTen to TimesTen Replication Guide
Part Number E13072-14
This chapter includes these sections:
These configurations are supported for online rolling in-place upgrades for TimesTen:
One active standby pair on two hosts. The hosts are managed by Oracle Clusterware.
Multiple active standby pairs with one TimesTen database on each host. The hosts are managed by Oracle Clusterware.
Multiple active standby pairs with one or more TimesTen database on each host. The hosts are managed by Oracle Clusterware.
The existing active standby pairs are configured and operating properly.
Clusterware Ready Services (CRS) commands are used correctly to stop and start the standby database.
The in-place upgrade does not change the TimesTen environment for the active and standby databases.
The in-place upgrade must be from a TimesTen release 184.108.40.206.6 or later to a later TimesTen 11.2.1 release.
The Oracle Clusterware release must be 220.127.116.11.
The in-place upgrade applies to one TimesTen installation on each host.
There must be at least two hosts managed by Oracle Clusterware.
Multiple active or standby databases managed by Oracle Clusterware can exist on a host as long as there are at least two hosts in the cluster.
Online rolling in-place upgrades are not supported when global cache groups are replicated by the active standby pairs.
Online rolling in-place grades are not supported on Windows for any TimesTen 11.2.1 release.
This section describes the following tasks:
The active and the standby databases are running TimesTen release 18.104.22.168.6.
The active standby pair is on two hosts managed by Oracle Clusterware.
Replication is working.
If the active standby pair replication scheme includes cache groups:
AWT and SWT writes from the standby database to the Oracle database are working.
Refreshes from the oracle database to the active database are working.
ttCWAdmin -status -dsn
yourDSN command to verify that:
The active database is on a different host than the standby database.
The state of the active database is
'ACTIVE' and the status is
The state of the standby database is
'STANDBY' and the status is
ttStatus command on the active database to verify that:
ttCRSmaster processes are running.
The subdaemon, the replication agent and the cache agent are running.
ttStatus command on the standby database to verify that:
ttCRSmaster processes are running.
The subdaemon, the replication agent and the cache agent are running.
Enter a CRS command similar to the following to obtain the names of the Master, Daemon and Agent processes on the host of the standby database:
crs_stat -c standbyHostName
Use CRS commands to shut down the standby database. The CRS commands stop the CRS Master processes for the standby database, the CRS Daemon process for the TimesTen installation, and the CRS Agent process for the TimesTen installation.
In these examples, the host name is
host2, the DSN is
myDSN, the TimesTen instance name is
upgrade2 and the instance administrator is
crs_stop TT_Master_upgrade2_terry_myDSN_1 crs_stop TT_Daemon_upgrade2_terry_host2 crs_stop TT_Agent_upgrade2_terry_host2
Set the TimesTen RAM policy to
manual and stop the TimesTen main daemon.
ttAdmin -rampolicy manual -dsn myDSN ttDaemonAdmin -stop
ttDaemonAdmin -stop command gives error 10028, retry the command.
setup.sh script from the 22.214.171.124.1 install media to do the in-place upgrade. The in-place upgrade uninstalls the 126.96.36.199.6 installation for the standby database. The 188.8.131.52.1 installation must be installed into the same directory structure.
The in-place upgrade needs to keep the following files on the standby database:
The standby database files
Configure the new 184.108.40.206.1 installation for Oracle Clusterware.
Enter the following
ttCWAdmin command to start the TimesTen main daemon, the TimesTen CRS agent process and the TimesTen CRS Daemon process:
ttCWAdmin -init -hosts localhost
Set the RAM policy for the standby database to
ttAdmin -ramPolicy inUse -dsn myDSN
Start the CRS Master process for the standby database.
Switch the roles of the active and standby databases to enable the in-place upgrade on the other master database.
Enter a command similar to the following:
ttCWAdmin -switch -dsn myDSN
ttCWAmin -status command to verify that the switch operation has completed before starting the next task.
Enter a CRS command similar to the following to obtain the names of the Master, Daemon and Agent processes on the host of the new standby database:
crs_stat -c host1
Enter commands similar to the ones in "Shut down the standby database". Use the appropriate instance name, instance administrator, DSN and host name.
crs_stop TT_Master_upgrade2_terry_MYDSN_0 crs_stop TT_Daemon_upgrade2_terry_host1 crs_stop TT_Agent_upgrade2_terry_host1 ttAdmin -ramPolicy manual -dsn myDSN ttDaemonAdmin -stop
Enter commands similar to the ones in "Perform an in-place upgrade of the standby database".
See "Start the standby database". Use the Master process name obtained by the
crs_stat -c command.
ttCWAdmin -init -hosts localhost ttAdmin -ramPolicy inUse -dsn host1 crs_start TT_Master_upgrade2_terry_HOST1_0
The process to upgrade a single active standby pair on two hosts is the same as the process to upgrade multiple active standby pairs on multiple pairs of hosts. The best practice is to upgrade the active standby pairs one at a time.
ttCWAdmin -status command to determine the state of the databases managed by Oracle Clusterware.
An active standby pair managed by Oracle Clusterware must use at least two hosts (one for the active database and one for the standby database), but more than one active standby pair can be configured on a pair of hosts. Figure 9-1 shows two active standby pairs on two hosts managed by Oracle Clusterware. The active database called
host1 replicates to
host2. The active database called
host2 replicates to
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.
This configuration can result in greater write throughput for cache groups and more balanced resource usage. See "Sample configuration files for multiple active standby pairs on the pair of same hosts" for sample
sys.odbc.ini entries and a sample
cluster.oracle.ini file for this kind of configuration.
The in-place rolling upgrade process is similar, with these additional modifications:
Switch all standby databases to one host and do the upgrade for the entire "standby" host. In-place upgrades affect the entire TimesTen installation and associated databases on one host. Use the
ttCWAdmin -switch -dsn
DSN command to move the standby databases to one host.
Verify that the standby databases are running on the desired host. Use the
ttCWAdmin -status -dsn
DSN command and the
ttCWAdmin -status command.
Modify the CRS stop commands to stop all Master processes on the host where the standby databases reside.
Modify the CRS start commands to start all Master processes on the host where the standby databases reside.
ttAdmin ramPolicy command to change the policy for all databases on the host where the standby databases reside.
The following are sample
sys.odbc.ini entries for
[databasea] Driver=/scratch/terry/TimesTen/upgrade2/lib/libtten.so DataStore=/scratch/terry/ds/databasea PermSize=40 TempSize=32 PLSQL=1 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databaseb] Driver=/scratch/terry/TimesTen/upgrade2/lib/libtten.so DataStore=/scratch/terry/ds/databaseb PermSize=40 TempSize=32 PLSQL=1 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databasec] Driver=/scratch/terry/TimesTen/upgrade2/lib/libtten.so DataStore=/scratch/terry/ds/databasec PermSize=40 TempSize=32 PLSQL=1 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL [databased] Driver=/scratch/terry/TimesTen/upgrade2/lib/libtten.so DataStore=/scratch/terry/ds/databased PermSize=40 TempSize=32 PLSQL=1 DatabaseCharacterSet=WE8MSWIN1252 OracleNetServiceName=ORCL
The following is a sample
[databasea] MasterHosts=host1,host2 ScriptInstallDir=/scratch/terry/TimesTen/upgrade2/info/crs_scripts CacheConnect=Y [databaseb] MasterHosts=host2,host1 ScriptInstallDir=/scratch/terry/TimesTen/upgrade2/info/crs_scripts CacheConnect=Y [databasec] MasterHosts=host2,host1 ScriptInstallDir=/scratch/terry/TimesTen/upgrade2/info/crs_scripts CacheConnect=Y [databased] MasterHosts=host1,host2 ScriptInstallDir=/scratch/terry/TimesTen/upgrade2/info/crs_scripts CacheConnect=Y
Note that 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 hosts names specified for the
ScriptInstallDir attribute is deprecated in TimesTen release 220.127.116.11.1.
hostName command to obtain the names of the Master, Daemon and Agent processes for the standby host.
The following script is an example of a "stop standby" script for multiple databases on the same host that is managed by Oracle Clusterware. The TimesTen instance name is
upgrade2. The instance administrator is
terry. The host is
host2. There are two standby databases:
crs_stop TT_Master_upgrade2_terry_DATABASEA_0 crs_stop TT_Master_upgrade2_terry_DATABASEB_1 crs_stop TT_Daemon_upgrade2_terry_HOST2 crs_stop TT_Agent_upgrade2_terry_HOST2 ttAdmin -ramPolicy manual -dsn databasea ttAdmin -ramPolicy manual -dsn databaseb ttDaemonAdmin -stop
The following script is an example of a "start standby" script for the same configuration.
ttCWAdmin -init -hosts localhost ttAdmin -ramPolicy inUse -dsn databasea ttAdmin -ramPolicy inUse -dsn databaseb crs_start TT_Master_upgrade2_terry_DATABASEA_0 crs_start TT_Master_upgrade2_terry_DATABASEB_1
$ ./setup.sh There are 1 TimesTen instances installed locally : 1) upgrade2 (TimesTen18.104.22.168.6) Of the following options :  Install a new instance  Upgrade an existing instance  Display information about an existing instance [q] Quit the installation Which would you like to perform? [ 1 ] 2 NOTE: There is only one instance which can be upgraded. Instance Name : upgrade2 Product Installed : TimesTen22.214.171.124.6 Installation Directory : /scratch/terry/TimesTen/upgrade2 BitLevel : 64 Component Installed : Client/Server and DataManager Daemon Port : 12345 NOTE: Upgrading will remove the selected instance and re-install into the same directory. You will have the option to retain configuration files in : /scratch/terry/TimesTen/upgrade2/info Would you like to upgrade this instance? [ yes ] ** WARNING ** The uninstallation has been executed by a non-root user. If the TimesTen daemon startup scripts were installed, you must run <install_dir>/bin/setuproot -uninstall to remove them. If you proceed with this uninstallation, you will have to remove the startup scripts manually. Would you like to proceed with the uninstallation? [ yes ] The TimesTen daemon (timestend) is running Terminating subprocesses. NOTE: /scratch/terry/TimesTen/upgrade2/info contains information related to the data stores that have been created with this release. If you remove /scratch/terry/TimesTen/upgrade2/info you will no longer be able to access your data stores, nor would you be able to restore nor migrate your data. Would you also like to remove all files in /scratch/terry/TimesTen/upgrade2/info? [ no ] Would you also like to remove all files in /scratch/terry/TimesTen/upgrade2/network/admin/samples? [ no ] /scratch/terry/TimesTen/upgrade2 Removed (retained /scratch/terry/TimesTen/upgrade2/info) TimesTen uninstall completed. Of the three components:  Client/Server and Data Manager  Data Manager Only  Client Only Which would you like to install? [ 1 ] Upgrading installation in /scratch/terry/TimesTen/upgrade2 Where would you like to create the daemon home directory? [ /scratch/terry/TimesTen/upgrade2/info ] The daemon logs will be located in /scratch/terry/TimesTen/upgrade2/info Would you like to specify a different location for the daemon logs? [ no ] Installing into /scratch/terry/TimesTen/upgrade2 ... Uncompressing … NOTE: For security, we recommend that you restrict access to the TimesTen installation to members of a single OS group. Only members of that OS group will be allowed to perform direct mode connections to TimesTen, and only members of that OS group will be allowed to perform operations that access TimesTen data stores, TimesTen files and shared memory. The OS group defaults to the primary group of the instance administrator. You can default to this group, choose another OS group or you can make this instance world-accessible. If you choose to make this instance world-accessible, all database files and shared memory are readable and writable by all users. Restrict access to the the TimesTen installation to the group 's999'? [ yes ] NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries. Would you like to enable PL/SQL for this instance? [ yes ] Do you want to replace the ttendaemon.options file in /scratch/terry/TimesTen/upgrade2/info? [ yes ] no NOTE: The existing daemon options file has been retained. The default options file was written as /scratch/terry/TimesTen/upgrade2/info/ttendaemon.options.upgrade2. TNS_ADMIN exists in your environment and is set to : /scratch/terry/TimesTen/upgrade2/network/admin/samples Would you like to use this TNS_ADMIN setting for the In-Memory Database Cache? [ yes ] TNS_ADMIN will be set to /scratch/terry/TimesTen/upgrade2/network/admin/samples You can change TNS_ADMIN later by running <install_dir>/bin/ttmodinstall. Installing server components ... What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 12346 ] Do you want to install QuickStart and the TimesTen Documentation? [ no ] Would you like to install the documentation (without QuickStart)? [ yes ] no An existing cluster.oracle.ini file has been detected in /scratch/terry/TimesTen/upgrade2/info. Would you like to replace the existing cluster.oracle.ini file? [ no ] The existing cluster.oracle.ini file will be used. The sample cluster.oracle.ini file will be saved as '/scratch/terry/TimesTen/upgrade2/info/cluster.oracle.ini.tt1121'. An existing sys.odbc.ini file has been detected in /scratch/terry/TimesTen/upgrade2/info. NOTE: You may not be able to successfully run the demos if you keep your existing sys.odbc.ini file. If you choose to replace the existing file, a backup will be made automatically. Would you like to replace the existing /scratch/terry/TimesTen/upgrade2/info/sys.odbc.ini file ? [ no ] The existing sys.odbc.ini file will be used. The sample sys.odbc.ini file will be saved as '/scratch/terry/TimesTen/upgrade2/info/sys.odbc.ini.upgrade2'. Installing client components ... Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] yes A Clusterware installation was detected in /opt/oracle/product/11.1.0/crs Please provide the path to the Oracle Clusterware installation on this machine (s=skip)? [ /opt/oracle/product/11.1.0/crs ] NOTE: The TimesTen Clusterware agent port must be the same on all nodes of the cluster. Please refer to the TimesTen documentation for additional information. Please enter a port number for the TimesTen Clusterware agent? [ 12351 ] Executing '/opt/oracle/product/11.1.0/crs/bin/olsnodes' ... Oracle Clusterware is currently configured on the following nodes : 1. host1 2. host2 3. host3 4. host4 5. host5 NOTE: By default, all of the nodes listed above will be added to the TimesTen Replication with Oracle Clusterware configuration. You can also specify your own list of nodes based on the list above. Would you like to specify a node list for TimesTen Replication with Oracle Clusterware? [ no ] y From the nodes above, please provide a list of nodes that you would like to add (ex: 1,2 or skip)? [ ] 1,2,3,4 TimesTen Replication with Oracle Clusterware will be configured for the following nodes : host1 host2 host3 host4 Are you sure? [ yes ] y Overwrite the existing TimesTen Clusterware options file? [ no ] The new TimesTen Clusterware options file will be located here : /scratch/terry/TimesTen/upgrade2/info/ttcrsagent.options.tt1121. NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. Run the 'setuproot' script : cd /scratch/terry/TimesTen/upgrade2/bin ./setuproot -install This will move the TimesTen startup script into its appropriate location. The startup script is currently located here : '/scratch/terry/TimesTen/upgrade2/startup/tt_upgrade2'. The documentation was not installed. To manually install the documentation, run the command 'setup.sh -installDoc' The 126.96.36.199 Release Notes are located here : '/scratch/terry/TimesTen/upgrade2/README.html' Starting the daemon ... TimesTen Daemon startup OK. End of TimesTen installation.