Skip Headers
Oracle® TimesTen In-Memory Database TimesTen to TimesTen Replication Guide
Release 11.2.1

Part Number E13072-14
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

9 Upgrading TimesTen When Using Oracle Clusterware

This chapter shows how to perform an online rolling in-place upgrade for TimesTen when using Oracle Clusterware.

This chapter includes these sections:

Supported configurations

These configurations are supported for online rolling in-place upgrades for TimesTen:

Restrictions and assumptions

Upgrade tasks for one active standby pair

This section describes the following tasks:

Verify that the active standby pair is operating properly

  1. Verify that:

    • The active and the standby databases are running TimesTen release 11.2.1.6.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.

  2. Enter the 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 'AVAILABLE'.

    • The state of the standby database is 'STANDBY' and the status is 'AVAILABLE'.

  3. Enter the ttStatus command on the active database to verify that:

    • The ttCRSactiveservice and ttCRSmaster processes are running.

    • The subdaemon, the replication agent and the cache agent are running.

  4. Enter the ttStatus command on the standby database to verify that:

    • The ttCRSsubservice and ttCRSmaster processes are running.

    • The subdaemon, the replication agent and the cache agent are running.

Shut down the standby database

  1. 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
    
  2. 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 terry.

    crs_stop TT_Master_upgrade2_terry_myDSN_1
    crs_stop TT_Daemon_upgrade2_terry_host2
    crs_stop TT_Agent_upgrade2_terry_host2
    
  3. Set the TimesTen RAM policy to manual and stop the TimesTen main daemon.

    ttAdmin -rampolicy manual -dsn myDSN
    ttDaemonAdmin -stop
    

    If the ttDaemonAdmin -stop command gives error 10028, retry the command.

Perform an in-place upgrade of the standby database

  1. Use the setup.sh script from the 11.2.1.7.1 install media to do the in-place upgrade. The in-place upgrade uninstalls the 11.2.1.6.6 installation for the standby database. The 11.2.1.7.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

    • The sys.odbc.ini file

    • The ttendaemon.options file

    • The cluster.oracle.ini file

    • The ttcrsagent.options file

    • The tnsnames.ora file

    See "Sample in-place upgrade".

  2. Configure the new 11.2.1.7.1 installation for Oracle Clusterware.

Start the standby database

  1. 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
    
  2. Set the RAM policy for the standby database to inUse.

    ttAdmin -ramPolicy inUse -dsn myDSN
    
  3. Start the CRS Master process for the standby database.

    crs_start TT_Master_upgrade2_terry_MYDSN_1
    

Switch the roles of the active and standby databases

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

Use the ttCWAmin -status command to verify that the switch operation has completed before starting the next task.

Shut down the new standby database

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

Perform an in-place upgrade of the new standby database

Enter commands similar to the ones in "Perform an in-place upgrade of the standby database".

Start the new 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

Upgrade multiple active standby pairs on many pairs of hosts

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.

Use the ttCWAdmin -status command to determine the state of the databases managed by Oracle Clusterware.

Upgrade multiple active standby pairs on a pair of hosts

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 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 9-1 Multiple active standby pairs on two hosts

Description of Figure 9-1 follows
Description of "Figure 9-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 "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:

See "Sample scripts for stopping and starting multiple standby processes on one host".

Sample configuration files for multiple active standby pairs on the pair of same hosts

The following are sample sys.odbc.ini entries for databasea and databaseb:

[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 cluster.oracle.ini file:

[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 MasterHost attribute.

The ScriptInstallDir attribute is deprecated in TimesTen release 11.2.1.7.1.

Sample scripts for stopping and starting multiple standby processes on one host

Use the crs_stat -c 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: databasea and databaseb.

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

Sample in-place upgrade

$ ./setup.sh
 
There are 1 TimesTen instances installed locally :
1) upgrade2 (TimesTen11.2.1.6.6)
 
Of the following options :
 
  [1] Install a new instance
  [2] Upgrade an existing instance
  [3] 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      : TimesTen11.2.1.6.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:
 
  [1] Client/Server and Data Manager
  [2] Data Manager Only
  [3] 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 11.2.1.7 Release Notes are located here :
  '/scratch/terry/TimesTen/upgrade2/README.html'
 
Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.