ttBackupおよびttRestoreを使用した別のパッチ・リリースへの移動

ttBackupおよびttRestoreユーティリティを使用して新しいパッチ・リリースに移動できますが、これはお薦めの方法ではありません。お薦めの方法については、インスタンスの変更による別のパッチ・リリースへの移動についてを参照してください。

ノート:

Oracle Clusterwareを使用したTimesTenのレプリケーションは、Oracle Linux for Armシステムではサポートされていません。Oracle Linux for Armを使用している場合、この例の出力にOracle Clusterwareのメッセージは表示されません。

各データベースについて、次のステップを実行します。

旧リリースの場合:

  1. ttAdminユーティリティを使用して、database1データベースをクローズします。これにより、追加のユーザー接続が防止されます。
    % 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. すべてのアプリケーションをデータベースから切断します。ttStatusユーティリティを実行して、データベースへの接続がないことを確認します(この例ではdatabase1)。
    % 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. ttVersionユーティリティを実行して、現在のリリースを確認します(この例では22.1.1.29.0)。

    % 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. データベースをバックアップします。この例では、リリース22.1.1.29.0database1データベースをバックアップします。

    % ttBackup -dir /tmp/dump/backup -fname database1_2211 database1
    Backup started ...
    Backup complete
    
  5. データベースをメモリーからアンロードします。この例では、RAMポリシーがmanualであることを前提としています。RAMポリシーの詳細は、Oracle TimesTen In-Memory Databaseオペレーション・ガイドRAMポリシーの指定を参照してください。
    % 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. TimesTenメイン・デーモンを停止します。
    % ttDaemonAdmin -stop
    TimesTen Daemon (PID: 4649, port: 6624) stopped.

新しいリリースの場合:

  1. TimesTenの新しい完全ディストリビューションをダウンロードして解凍するサブディレクトリを作成します。このディレクトリに移動し、新しい完全ディストリビューションをこのディレクトリにダウンロードします。次に、ZIPユーティリティを使用してこのディストリビューションを解凍します。この例では、new_installation_dirサブディレクトリを作成し、timesten2211300.server.linux8664.zipファイルを解凍します。timesten2211300.server.linux8664.zipファイルを解凍すると、このパッチ・アップグレードに使用される新しいインストール環境が作成されます。
    % mkdir -p new_installation_dir
    % cd new_installation_dir

    完全ディストリビューションをnew_installation_dirサブディレクトリにダウンロードします。次に、ZIPユーティリティを使用してディストリビューションを解凍します。

    % unzip /timesten/installations/timesten2211300.server.linux8664.zip
    Archive:  /timesten/installation/timesten2211300.server.linux8664.zip
       creating: tt22.1.1.30.0/
    ...
  2. ttInstanceCreateユーティリティを実行してインスタンスを作成します。この例では、ttInstanceCreateユーティリティを対話形式で実行します。詳細は、Oracle TimesTen In-Memory DatabaseリファレンスttInstanceCreateおよびこのドキュメントのLinux/UNIXでのインスタンスの作成: 基本を参照してください。

    インストール・ディレクトリのnew_installation_dir/tt22.1.1.30.0/bin領域に移動してから、そのディレクトリにあるttInstanceCreateユーティリティを実行します。ttInstanceCreateユーティリティは、インストール・ディレクトリから実行する必要があります。ユーザーの入力は太字で示されています。

    % 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.30.0/README.html'
    
    Starting the daemon ...
    TimesTen Daemon (PID: 11121, port: 6624) startup OK.
    Instance created successfully.
    
  3. データベースをリストアします。環境変数を設定し、sys.odbc.iniファイル(またはodbc.iniファイル)内の接続属性に対して必要なすべての変更を加え、データベースをリストアする前にデーモンを起動します(まだ起動していない場合)。
    % ttRestore -dir /tmp/dump/backup -fname database1_2211 database1
    Restore started ...
    Restore complete

データベースが正しく構成され完全に機能するようになったら、バックアップ・ファイル(この例では/tmp/dump/backup/database1_2211)を必要に応じて削除できます。