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. For the preferred method, see About Moving to a Different Patch Release by Modifying the Instance.

Note:

TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems. If you are using Oracle Linux for Arm, Oracle Clusterware messages do not appear in any output in this example.

Perform these steps for each database.

On the old release:

  1. Use the ttAdmin utility to close the database1 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
    
  2. 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
    
  3. Run the ttVersion utility to verify the current release (22.1.1.25.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.
  4. Backup the database. In this example, backup the database1 database for release 22.1.1.25.0.

    % ttBackup -dir /tmp/dump/backup -fname database1_2211 database1
    Backup started ...
    Backup complete
    
  5. 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
    
  6. Stop the TimesTen main daemon.
    % ttDaemonAdmin -stop
    TimesTen Daemon (PID: 4649, port: 6624) stopped.

For the new release:

  1. Create the subdirectory into which you will download and unzip the new full distribution of TimesTen. Navigate to this directory and download the new full distribution into this directory. Then, use the ZIP utility to unpack this distribution. This example creates the new_installation_dir subdirectory and unpacks the timesten2211260.server.linux8664.zip file. Unzipping the timesten2211260.server.linux8664.zip file creates the new installation that will be used for this patch upgrade.
    % mkdir -p new_installation_dir
    % cd new_installation_dir

    Download the full distribution into the new_installation_dir subdirectory. Then use the ZIP utility to unpack the distribution.

    % unzip /timesten/installations/timesten2211260.server.linux8664.zip
    Archive:  /timesten/installation/timesten2211260.server.linux8664.zip
       creating: tt22.1.1.26.0/
    ...
  2. Run the ttInstanceCreate utility to create the instance. This example runs the ttInstanceCreate utility interactively. See ttInstanceCreate in the Oracle TimesTen In-Memory Database Reference and Creating an Instance on Linux/UNIX: Basics in this book for details.

    Navigate to the new_installation_dir/tt22.1.1.26.0/bin area of the installation directory and then run the ttInstanceCreate utility located in that directory. The ttInstanceCreate utility must be run from the installation directory. User input is shown in bold.

    % new_installation_dir/bin/ttInstanceCreate
    
    NOTE: Each TimesTen instance is identified by a unique name.
          The instance name must be a non-null alphanumeric string, not longer
          than 255 characters.
    
    Please choose an instance name for this installation? [ tt221 ] myinstance
    Instance name will be 'myinstance30'.
    Is this correct? [ yes ]
    Where would you like to install the myinstance instance of TimesTen? [ /home/ttuser ] /scratch/ttuser
    The directory /scratch/ttuser/ does not exist.
    Do you want to create it? [ yes ]
    Creating instance in /scratch/ttuser/myinstance ...
    
    NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
          daemon port number must be the same across all TimesTen installations
          managed within the same Oracle Clusterware cluster.
    
    NOTE: All installations that replicate to each other must use the same daemon
          port number that is set at installation time. The daemon port number can
          be verified by running 'ttVersion'.
    
    The default port number is 6624.
    
    Do you want to use the default port number for the TimesTen daemon? [ yes ]
    The daemon will run on the default port number (6624).
    
    In order to use the cache features in any TimesTen databases
    created within this instance, you must set a value for the TNS_ADMIN
    environment variable. It can be left blank, and a value can be supplied later
    using <install_dir>/bin/ttInstanceModify.
    
    Please enter a value for TNS_ADMIN (s=skip)? [  ] s
    What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 6625 ]
    
    Would you like to use TimesTen Replication with Oracle Clusterware? [ no ]
    
    Would you like to use systemd to manage TimesTen? [ no ]
    
    NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
    
    The startup script is located here :
            '/scratch/ttuser/myinstance/startup/tt_myinstance'
    
    Run the 'setuproot' script :
            /scratch/ttuser/myinstance/bin/setuproot -install
    This will move the TimesTen startup script into its appropriate location.
    
    The 22.1 Release Notes are located here :
      'new_installation_dir/tt22.1.1.26.0/README.html'
    
    Starting the daemon ...
    TimesTen Daemon (PID: 11121, port: 6624) startup OK.
    Instance created successfully.
    
  3. Restore the database. Source the environment variables, make all necessary changes to your connection attributes in the sys.odbc.ini (or the odbc.ini) file, and start the daemon (if not already started) prior to restoring the database.
    % ttRestore -dir /tmp/dump/backup -fname database1_2211 database1
    Restore started ...
    Restore complete

Once your databases are correctly configured and fully operational, you can optionally remove the backup file (in this example, /tmp/dump/backup/database1_2211).