この章はTimesTen Classicのみを対象としています。LinuxおよびUNIXホストでTimesTen Classicのインストール環境およびインスタンスを作成および管理する方法について説明します。
TimesTen Classicをインストールする前に、用語を確認し、前提条件を満たしていることを確認してください。詳細は、第1章「TimesTen Classicでのインストール・プロセスの概要」を参照してください。
TimesTen Scaleoutの詳細は、Oracle TimesTen In-Memory Database Scaleoutユーザーズ・ガイドのTimesTen Scaleoutの概要を参照してください。
この章では、主に、完全インストールと完全インスタンスを重点的に取り上げます。クライアントのみのインストール環境とインスタンスの詳細は、「クライアントのみのインストール環境およびインスタンス」を参照してください。
この章の例は、Linuxホストで実行しますが、完全インストールおよび完全インスタンスをサポートするプラットフォームにも該当します。
内容は次のとおりです。
この章の最後には、インストール環境の作成ステップ、インスタンスの作成、インスタンスの変更、インスタンスの破棄、およびインストール環境の削除のステップを示す例があります。この例は、インストール手順のすべての概念を1つにまとめています。参照:
詳細は、TimesTen Classicのインストールおよび削除の完全な例を参照してください。
Oracle Clusterwareのインストールに関する情報もあります。詳細は、TimesTenで使用するOracle Clusterwareのインストールを参照してください。
インストール環境の作成の最初のステップは、TimesTen Classicをインストールするオペレーティング・システム・ユーザーを決定することです。このユーザーは、ディストリビューションを解凍してTimesTen Classicをインストールします。詳細は、ディストリビューション・メディアおよびディストリビューションを参照してください。このユーザーはインスタンス管理者と呼ばれます。詳細は、「インスタンス管理者」を参照してください。
ノート: ディストリビューションを解凍する(およびTimesTen Classicをインストールする)オペレーティング・システム・ユーザーの名前は、インスタンス管理者です。インスタンス管理者は、インスタンスを作成できる唯一のユーザーです。詳細は、TimesTenインスタンスおよびLinux/UNIXでのインスタンスの作成: 基本を参照してください。1つのディストリビューション・ファイルがあります。
|
インスタンス管理者は、インスタンス管理者のプライマリ・グループ、インスタンス管理者のセカンダリ・グループ、またはインスタンス管理者のみからアクセス可能なインストール環境を作成できます。また、インスタンス管理者はインストールが成功したことを検証する必要があります。各項の内容は次のとおりです。
インスタンス管理者のプライマリ・グループからアクセス可能なインストール環境を作成するには、次のようにします。
適切なディストリビューション・ファイルを、適切なアクセス可能な場所に配置します。
インストールのための目的のディレクトリを作成します。
インストールのための目的のディレクトリにディレクトリを変更します。
そのディレクトリにディストリビューションを解凍します。
Linuxでの次の例では、プライマリ・グループがtimesten
であるttuser1
が、/swdir/TimesTen/ttinstallers
にあるディストリビューション・ファイルから完全インストールをfullinstall
ディレクトリ(現在のディレクトリのサブディレクトリ)に作成します。このインストール環境には、timesten
のメンバーがアクセスできます。
% mkdir fullinstall
% cd fullinstall
% unzip /swdir/TimesTen/ttinstallers/timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]
インストールされているファイルの最上位レベルのディレクトリは、tt18.1.4.1.0
という形式です。
たとえば、このディレクトリはfullinstall
の下に作成されます。
dr-xr-x--- 19 ttuser1 timesten 4096 Mar 2 22:07 tt18.1.4.1.0
tt18.1.4.1.0
ディレクトリには、次のようなファイルが含まれています。
dr-xr-x--- 3 ttuser1 timesten 4096 Jun 15 22:07 3rdparty dr-xr-x--- 2 ttuser1 timesten 4096 Jun 15 22:07 bin dr-xr-x--- 3 ttuser1 timesten 4096 Jun 15 22:07 include dr-xr-x--- 2 ttuser1 timesten 4096 Jun 15 22:07 info dr-xr-x--- 2 ttuser1 timesten 4096 Jun 15 23:33 kubernetes dr-xr-x--- 3 ttuser1 timesten 4096 Jun 15 22:07 lib dr-xr-x--- 7 ttuser1 timesten 4096 Jun 15 22:07 plsql dr-xr-x--- 3 ttuser1 timesten 4096 Jun 15 22:07 ttoracle_home
timesten
のメンバーはインスタンスにアクセスできます。timesten
のメンバーではないユーザーは、このインスタンスまたはインストール環境から作成されたインスタンスにアクセスできません。
インスタンス管理者のセカンダリ・グループからアクセス可能なインストール環境を作成するには、次のようにします。
適切なディストリビューション・ファイルを、適切なアクセス可能な場所に配置します。
インストールのための目的のディレクトリを作成します。
インストールのための目的のディレクトリにディレクトリを変更します。
そのディレクトリにディストリビューションを解凍します。
Linuxコマンドのchgrp
を使用して、インストール環境の所有権を目的のグループに変更します。
次の例では、プライマリ・グループusers
とセカンダリ・グループtimesten
を持つttuser2
が、/swdir/TimesTen/ttinstallers
にあるディストリビューション・ファイルからfullinstall_secgrp
ディレクトリに完全インストール環境を作成します。ttuser2
がchgrp
コマンドを実行すると、このインストール環境にtimesten
のメンバーがアクセスできるようになります。
% mkdir fullinstall_secgrp
% cd fullinstall_secgrp
% unzip /swdir/TimesTen/ttinstallers/timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]
インストールされているファイルの最上位レベルのディレクトリは、tt18.1.4.1.0
という形式です。
たとえば、chgrp
コマンドの実行前、インストール・ディレクトリは次のようになっています。
dr-xr-x--- 19 ttuser2 users 4096 Mar 2 22:07 tt18.1.4.1.0
chgrp
コマンドの実行前、tt18.1.4.1.0
ディレクトリには次のようなファイルが含まれています。
dr-xr-x--- 3 ttuser2 users 4096 Jun 15 22:07 3rdparty dr-xr-x--- 2 ttuser2 users 4096 Jun 15 22:07 bin dr-xr-x--- 3 ttuser2 users 4096 Jun 15 22:07 include dr-xr-x--- 2 ttuser2 users 4096 Jun 15 22:07 info dr-xr-x--- 2 ttuser2 users 4096 Jun 15 23:33 kubernetes dr-xr-x--- 3 ttuser2 users 4096 Jun 15 22:07 lib dr-xr-x--- 7 ttuser2 users 4096 Jun 15 22:07 plsql dr-xr-x--- 3 ttuser2 users 4096 Jun 15 22:07 ttoracle_home
ユーザーttuser2
は、fullinstall_secgrp
インストール・ディレクトリからchgrp
を実行します。
% chgrp -R timesten .
chgrp
コマンドの実行後、インストール・ディレクトリの下は次のようになります。
dr-xr-x--- 19 ttuser2 timesten 4096 Mar 2 22:07 tt18.1.4.1.0
chgrp
コマンドの実行後、tt18.1.4.1.0
ディレクトリには次のようなファイルが含まれています。
dr-xr-x--- 3 ttuser2 timesten 4096 Jun 15 22:07 3rdparty dr-xr-x--- 2 ttuser2 timesten 4096 Jun 15 22:07 bin dr-xr-x--- 3 ttuser2 timesten 4096 Jun 15 22:07 include dr-xr-x--- 2 ttuser2 timesten 4096 Jun 15 22:07 info dr-xr-x--- 2 ttuser2 timesten 4096 Jun 15 23:33 kubernetes dr-xr-x--- 3 ttuser2 timesten 4096 Jun 15 22:07 lib dr-xr-x--- 7 ttuser2 timesten 4096 Jun 15 22:07 plsql dr-xr-x--- 3 ttuser2 timesten 4096 Jun 15 22:07 ttoracle_home
chgrp
コマンドの実行後、timesten
のメンバーはインスタンスにアクセスできます。timesten
のメンバーではないユーザーは、このインスタンスまたはこのインストール環境で作成されたインスタンスにアクセスできません。
インスタンス管理者のみがアクセスできるインストール環境を作成できますが、これは一般的ではありません。これを行うには、次の手順を実行します。
適切なディストリビューション・ファイルを目的のディレクトリに配置します。
インストールのための目的のディレクトリを作成します。
インストールのための目的のディレクトリにディレクトリを変更します。
そのディレクトリにディストリビューションを解凍します。
インストール・ディレクトリ・ツリーの権限を変更します。
次の例では、ttuser1
は/swdir/TimesTen/ttinstallers
にあるディストリビューション・ファイルからfullinstall_installeronly
ディレクトリに完全インストール環境を作成します。このインストール環境にはttuser1
のみがアクセスできます。
% mkdir fullinstall_installeronly
% cd fullinstall_installeronly
% unzip /swdir/TimesTen/ttinstallers/timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]
% chmod -R go-rwx tt18.1.4.1.0
インストールされているファイルの最上位レベルのディレクトリは、tt18.1.4.1.0
という形式です。
たとえば、インストール・ディレクトリの下は次のようになります。
dr-x------ 19 ttuser1 timesten 4096 Jun 2 22:07 tt18.1.4.1.0
tt18.1.4.1.0
には、次のようなファイルが含まれています。
dr-x------ 5 ttuser1 timesten 4096 Jun 2 22:07 3rdparty dr-x------ 2 ttuser1 timesten 4096 Jun 2 22:07 bin dr-x------ 3 ttuser1 timesten 4096 Jun 2 22:07 include dr-x------ 2 ttuser1 timesten 4096 Jun 2 22:07 info dr-x------ 2 ttuser1 timesten 4096 Jun 2 23:33 kubernetes dr-x------ 2 ttuser1 timesten 4096 Mar 2 22:07 lib dr-x------ 8 ttuser1 timesten 4096 Mar 2 22:07 plsql dr-x------ 3 ttuser1 timesten 4096 Mar 2 22:07 ttoracle_home
ttuser1
のみがこのインスタンスにアクセスできます。
インストールを検証するには、ttInstallationCheck
ユーティリティを実行します。また、インストール・ディレクトリおよびサブディレクトリを確認できます。
ttInstallationCheck
ユーティリティはinstallation_dir
/tt18.1.4.1.0/bin
ディレクトリにあり、インストールが成功したか失敗したかを検証します。このユーティリティでは、インストールのチェックサム値が元のチェックサム値と異なっている場合にエラーを生成します。インストール・ディレクトリまたはファイルに次のいずれかの変更があった場合に、チェックサム値が異なります。
ファイルの内容
ファイルの名前
ディレクトリへのファイルの追加
ディレクトリからのファイルの削除
ファイルまたはディレクトリの権限の変更
この例では、インストールが検証されます。
%installation_dir
/tt18.1.4.1.0/bin
/ttInstallationCheck This installation has been verified.
この例では、ファイルの権限が変更されているため、ttInstallationCheck
によってエラーが生成されます。
%installation_dir
/tt18.1.4.1.0/bin
/ttInstallationCheck Cannot validate the installation in /installation_dir
/tt18.1.4.1.0.
ttInstallationCheck
ユーティリティの詳細は、Oracle TimesTen In-Memory DatabaseリファレンスのttInstallationCheckを参照してください。
TimesTenの完全インストール環境では、最上位レベルのinstallation_dir
/tt18.1.4.1.0
ディレクトリの下に次のサブディレクトリが含まれています(このリストに含まれていないサブディレクトリもあります)。
3rdparty
: 次のリソースが含まれています。
TimesTen Scaleout用のApache ZooKeeper (TimesTen Classicでは使用されません)
Java Message Service (JMS)
bin
: TimesTenユーティリティおよび実行可能ファイル
grid
: TimesTen Scaleoutのファイルおよびリソース(TimesTen Classicでは使用されません)
include
: TimesTen includeファイル。timesten.h
(TimesTen ODBC機能用)およびtt_errCode.h
(TimesTenエラー・コードの詳細)
kubernetes
: TimesTen Kubernetesオペレータに必要なoperator.zip
ファイルを含むディレクトリ。TimesTen Kubernetesオペレータの詳細は、Oracle TimesTen In-Memory Database Kubernetesオペレータ・ユーザーズ・ガイドを参照してください。
lib
: TimesTenライブラリ
plsql
: TimesTen PL/SQLのファイルおよびリソース
ttoracle_home
: Oracle Database Instant Clientのファイルおよびリソース(OCI、Pro*C/C++およびODP.NET用)
この項では、インスタンスの作成のシナリオについて説明します。installation_dir
/tt18.1.4.1.0/bin
ディレクトリにあるttInstanceCreate
ユーティリティを実行して、完全インスタンス(クライアントおよびサーバー)またはクライアントのみのインスタンスを作成します。
ノート:
ディストリビューションを解凍したユーザー(インストール環境の作成者)のみが、インストール環境からインスタンスを作成できます。
このユーザーは、TimesTenユーザー・グループのメンバーである必要があります。
このユーザーは、ttInstanceCreate
ユーティリティを実行してインスタンスを作成します。
インスタンスの作成後、このユーザーはインスタンスのインスタンス管理者になります。
このユーザーは、このインスタンス、およびインストール環境に関連付けられている他のすべてのインスタンスのインスタンス管理者になることができる唯一のユーザーです。
installation_dir
/tt18.1.4.1.0/bin
ディレクトリにあるttInstanceCreate
ユーティリティを実行して、完全インスタンスおよびクライアントのみのインスタンスを作成します。ユーティリティのオプションを指定できます。
コマンドラインで
ファイル内に
ユーティリティが実行されるとき、対話的に
次の項では、TimesTenインスタンスの作成について詳しく説明します。
この例では、ttInstanceCreate
ユーティリティを使用して完全インスタンスを作成します。コマンドラインにはオプションが指定されていません。
例2-1 ttInstanceCreate: 対話形式での完全インスタンスの作成
この例では、ttInstanceCreate
ユーティリティを対話形式で実行して、完全インスタンスを作成する方法を示します。最初にインストール・ディレクトリのinstallation_dir
/tt18.1.4.1.0/bin
領域に移動し、そのディレクトリにあるttInstanceCreate
ユーティリティを実行します。ttInstanceCreate
ユーティリティは、インストール・ディレクトリから実行する必要があります。ユーザーの入力は太字で示されています。
%installation_dir
/tt18.1.4.1.0/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? [ tt181 ] fullinstance1 Instance name will be 'fullinstance1'. Is this correct? [ yes ] Where would you like to install the fullinstance1 instance of TimesTen? [ /home/ttuser ] /scratch/ttuser Creating instance in /scratch/ttuser/fullinstance1 ... INFO: Mapping files from the installation to /scratch/ttuser/fullinstance1/install 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 'TimesTen Application-Tier Database Cache' feature in any databases created within this installation, 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 ] NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/scratch/ttuser/fullinstance1/startup/tt_fullinstance1' Run the 'setuproot' script : /scratch/ttuser/fullinstance1/bin/setuproot -install This will move the TimesTen startup script into its appropriate location. The 18.1 Release Notes are located here : '/installation_dir
/tt18.1.4.1.0/README.html' Starting the daemon ... TimesTen Daemon (PID: 20396, port: 6624) startup OK.
TimesTenのクライアント・インスタンスは、TimesTen ScaleoutまたはTimesTen Classicのいずれかのデータベースに接続するために使用できます。
この項では、クライアント・インスタンスの作成例を示します。クライアントのみのインストール環境とインスタンスの詳細(複数の例を含む)は、第4章「クライアントのみのインストール環境およびインスタンス」を参照してください。
例2-2 ttInstanceCreate -clientonly: クライアント・インスタンスの作成
installation_dir
/tt18.1.4.1.0/bin
領域に移動し、-clientonly
オプションを指定してttInstanceCreate
ユーティリティを実行します。ユーザーの入力は太字で示されています。
%installation_dir
/tt18.1.4.1.0/bin
/ttInstanceCreate -clientonly 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? [ tt181 ] clientinstance1 Instance name will be 'clientinstance1'. Is this correct? [ yes ] Where would you like to install the clientinstance1 instance of TimesTen? [ /home/ttuser ] /scratch/ttuser Creating instance in /scratch/ttuser/clientinstance1 ... INFO: Mapping files from the installation to /scratch/ttuser/clientinstance1/install In order to use the 'TimesTen Application-Tier Database Cache' feature in any databases created within this installation, 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 The 18.1 Release Notes are located here : '/installation_dir
/tt18.1.4.1.0/README.html'
インスタンス・ホーム・ディレクトリおよびサブディレクトリは、情報を得るために確認できます。インスタンスを作成すると、各インスタンスの$TIMESTEN_HOME
の下に次のサブディレクトリが含まれています(このリストには含まれていないサブディレクトリもあります)。
bin
: そのインスタンスに適応するように調整された、インスタンス固有のTimesTenユーティリティおよび実行可能ファイル
これに含まれるttenv.sh
(またはttenv.csh
)によって、TimesTen環境の環境変数がセッションに適するように設定され、setuproot.sh
をrootとして実行することで、オペレーティング・システムが再起動されるたびにデータ・インスタンスを自動的に起動させることができます。
ttenv
を実行すると、bin
ディレクトリもパスに追加されます。
conf
: TimesTenインスタンスの構成ファイルであるtimesten.conf
ファイルが含まれます
diag
: デーモン・ログとエラー・ログを含む診断出力
info
: TimesTenインスタンスの永続状態が格納されているTimesTenデーモンの作業ディレクトリ
install
: このインスタンスに関連付けられているインストール内容を参照するシンボリック・リンク。
plsql
: 次のサブディレクトリが含まれます。
utl_file_dir
: UTL_FILE
パッケージを使用してPL/SQLブロックによる読取りや書込みが可能な唯一のディレクトリ
startup
: このサブディレクトリに格納されているスクリプトを/etc/init.d
に追加することで、そのインスタンスが、システムの起動時に自動的に起動され、システムのシャットダウン時に自動的に停止するようにできます。
ノート: クライアントのみのインスタンスには、startup ディレクトリがありません。 |
前の項では、ttInstanceCreate
コマンドラインを使用してTimesTenの完全インスタンスまたはクライアント・インスタンスを作成するための基本について説明しました。この項では、追加機能および操作のモードについて説明します。このような場合は、installation_dir
/tt18.1.4.1.0/bin
ディレクトリからttInstanceCreate
ユーティリティを実行します。(例外はシステム起動時のインスタンスの自動起動で、ttInstanceCreate
を実行しません。)
この例では、ttInstanceCreate
ユーティリティを実行し、コマンドラインで名前、場所およびデーモンのポート番号を指定します。(-location
オプションで指定したディレクトリの名前は、ttInstanceCreate
ユーティリティを実行する前に存在している必要があります。)サポートされているオプションについては、Oracle TimesTen In-Memory DatabaseリファレンスのttInstanceCreateを参照してください。
例2-3 ttInstanceCreate: コマンドラインのオプションの指定
%installation_dir
/tt18.1.4.1.0
/bin/ttInstanceCreate -name fullinstance1 -location /scratch/ttuser/fullinstance1 -daemonport 6824 Creating instance in /scratch/ttuser/fullinstance1 ... INFO: Mapping files from the installation to /scratch/ttuser/fullinstance1/install NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/scratch/ttuser/fullinstance1/startup/tt_fullinstance1 Run the 'setuproot' script : /scratch/ttuser/fullinstance1/bin/setuproot -install This will move the TimesTen startup script into its appropriate location. The 18.1 Release Notes are located here : '/installation_dir
/tt18.1.4.1.0/README.html'
対話形式でインスタンスを作成する場合は、-record
オプションを使用して、バッチ・ファイルに対話形式のプロンプトと応答を記録できます。これは、バッチ・モードで追加のインスタンスを作成するためのテンプレートとして使用できます。詳細は、バッチ・ファイルで提供される情報からのインスタンスの作成を参照してください。
例2-4 ttInstanceCreate: recordオプション
%installation_dir
/tt18.1.4.1.0/bin
/ttInstanceCreate -record /swdir/TimesTen/ttinstances/instancecreatebatch
作成されたバッチ・ファイルinstancecreatebatch
には、ttInstanceCreate
に対する次の入力が含まれています。
Please choose an instance name for this installation:ttuser1instanceint Is this correct:y Where would you like to install the ttuser1instanceint instance of TimesTen:/swdir/TimesTen/ttinstances Please enter a unique port number for the TimesTen daemon (<CR>=list):27100 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:27101 Would you like to use TimesTen Replication with Oracle Clusterware:n
ttInstanceCreate
の-batch
オプションを使用すると、指示を含むバッチ・ファイルを使用してインスタンスを作成できます。
バッチ・ファイルの例を次に示します。-record
オプションを指定してttInstanceCreate
を実行することで、このようなファイルを作成しました。詳細は、-recordオプションを使用した対話形式でのインスタンスの作成を参照してください。
例2-5 ttInstanceCreate: バッチ・ファイル
この例では、最初に-record
オプションを使用して作成されたサンプル・バッチ・ファイルを使用します。次に、このサンプル・バッチ・ファイル(instancecreatebatch
)を使用してインスタンスを作成します。
Please choose an instance name for this installation:ttuser1instancebat Is this correct:y Where would you like to install the ttuser1instancebat instance of TimesTen:/swdir/TimesTen/ttinstances Please enter a unique port number for the TimesTen daemon (<CR>=list):29100 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:29101 Would you like to use TimesTen Replication with Oracle Clusterware:n
次に、インスタンスを作成します。
%installation_dir
/tt18.1.4.1.0/
bin/ttInstanceCreate -batch /swdir/TimesTen/ttinstances/instancecreatebatch
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. Instance name will be 'ttuser1instancebat'. Creating instance in /swdir/TimesTen/ttinstances/ttuser1instancebat ... TCP port 6624 is in use! 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. ** The default daemon port (6624) is already in use or within a range of 8 ports of an existing TimesTen instance. You must assign a unique daemon port number for this instance. This installer will not allow you to assign another instance a port number within a range of 8 ports of the port you assign below. 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'. INFO: installation group ownership (ttVersion) is 'timesten' In order to use the 'TimesTen Application-Tier Database Cache' feature in any databases created within this installation, 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. NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/swdir/TimesTen/ttinstances/ttuser1instancebat/startup/tt_ttuser1instancebat' Run the 'setuproot' script : /swdir/TimesTen/ttinstances/ttuser1instancebat/bin/setuproot -install This will move the TimesTen startup script into its appropriate location. The 18.1.4.1 Release Notes are located here : '/swdir/TimesTen/ttinstallations/fullinstall/tt18.1.4.1.0/README.html' Starting the daemon ... TimesTen Daemon (PID: 7725, port: 29100) startup OK.
ttInstanceCreate
ユーティリティを対話形式で実行してインスタンスを作成し、Oracle ClusterwareでTimesTenレプリケーションを有効にできます。
Oracle Clusterwareインストール環境へのパスの入力を求められたら、そのパスを指定するか、スキップできます。スキップする場合は、後でttInstanceModify -crs
オプションを使用してパスを指定できます。詳細は、インスタンスのOracle Clusterware構成の変更を参照してください。
この例では、Oracle Clusterインストールへのパスを/u01/app/
crs_releasedir
/grid
として示しています。ここで、crs_releasedir
はCRSリリースの変数です(たとえば、CRSリリースが18.3.0
である場合、18.3.0
に置き換えて、パスを/u01/app/18.3.0/grid
のようにできます)。
指定したディレクトリに有効なOracle Clusterwareインストール環境が存在する必要があります。
この例では、入力された値または選択されたデフォルトが太字で表示されています。
例2-6 ttInstanceCreate: CRSの例
%installation_dir
/tt18.1.4.1.0/
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? [ tt181 ] crsinstance Instance name will be 'crsinstance'. Is this correct? [ yes ] yes Where would you like to install the crsinstance instance of TimesTen? [ /home/oracle ] /u02/ttinstances Creating instance in /u02/ttinstances/crsinstance ... 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). INFO: installation group ownership (ttVersion) is 'oinstall' In order to use the 'TimesTen Application-Tier Database Cache' feature in any databases created within this installation, 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 ] yes A Clusterware installation was detected in /u01/app/crs_releasedir
/grid Please provide the path to the Oracle Clusterware installation on this machine (s=skip)? [ /u01/app/crs_releasedir/grid ] 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? [ 3754 ] Executing '/u01/app/crs_releasedir/grid/bin/olsnodes' ... Oracle Clusterware is currently configured on the following nodes : 1. tthost1 2. tthost2 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 ] NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/u02/ttinstances/crsinstance/startup/tt_crsinstance' Run the 'setuproot' script : /u02/ttinstances/crsinstance/bin/setuproot -install This will move the TimesTen startup script into its appropriate location. The 18.1.4.1 Release Notes are located here : '/u02/tt18.1.4.1.0/README.html' Starting the daemon ... TimesTen Daemon (PID: 11839, port: 6624) startup OK.
ノート: Oracle Clusterwareのインストール環境がTimesTenによって検出されました。場所は確認する必要があるだけで、入力する必要はありません。 |
ttInstanceCreate
ユーティリティは、システムが起動されるたびにインスタンスのTimesTenデーモンが自動的に起動し、システムが停止するたびに自動的に停止されるようにするために、/etc/init.d
ディレクトリに追加できる一連のスクリプトを作成します。
これを行うには、root
ユーザーが、timesten_home
/bin
ディレクトリにあるTimesTenのsetuproot
スクリプトを-install
オプションを指定して実行する必要があります。
インスタンスの作成時のttInstanceCreate
の出力には、これに関する情報があります。たとえば、myinstance
という名前のインスタンスの場合は、次のようになります。
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/swdir/TimesTen/ttinstances/myinstance/startup/tt_myinstance' Run the 'setuproot' script : /swdir/TimesTen/ttinstances/myinstance/bin/setuproot -install This will move the TimesTen startup script into its appropriate location.
setuproot
コマンドは、インスタンス・ホーム・ディレクトリを示すTIMESTEN_HOME
環境変数の現在の設定に従って動作します。
例2-7 ttInstanceCreate: システム起動時のインスタンスの自動起動
この例では、timesten_home
/bin
はroot
ユーザーの現在のディレクトリです。
# echo$TIMESTEN_HOME
/swdir/TimesTen/ttinstances/myinstance #$TIMESTEN_HOME
/bin/setuproot -install Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ] Copying /swdir/TimesTen/ttinstances/myinstance/startup/tt_myinstance to /etc/init.d Successfully installed the following scripts : /etc/init.d/tt_myinstance /etc/rc.d/rc0.d/K45tt_myinstance /etc/rc.d/rc1.d/K45tt_myinstance /etc/rc.d/rc2.d/S90tt_myinstance /etc/rc.d/rc3.d/S90tt_myinstance /etc/rc.d/rc5.d/S90tt_myinstance /etc/rc.d/rc6.d/K45tt_myinstance
インスタンスを破棄する前に、root
でsetuproot -uninstall
を実行する必要があります。
# $TIMESTEN_HOME
/bin/setuproot -uninstall
Would you like to uninstall the TimesTen daemon startup scripts in /etc/init.d?
[ yes ]
Successfully deleted the following scripts :
/etc/rc.d/rc0.d/K45tt_myinstance
/etc/rc.d/rc1.d/K45tt_myinstance
/etc/rc.d/rc2.d/S90tt_myinstance
/etc/rc.d/rc3.d/S90tt_myinstance
/etc/rc.d/rc5.d/S90tt_myinstance
/etc/rc.d/rc6.d/K45tt_myinstance
/etc/init.d/tt_myinstance
ノート: インスタンスを破棄する前にsetuproot -uninstall を実行しない場合は、setuproot -install によって配置されたファイルを手動で削除する必要があります。 |
次の項では、インスタンスの変更方法について説明します。
ttInstanceModify
ユーティリティはインスタンスの属性を変更します。変更されるインスタンスは、$TIMESTEN_HOME
環境変数によって参照されるインスタンスです。$TIMESTEN_HOME
/bin
ディレクトリからttInstanceModify
ユーティリティを実行します。
完全インスタンスの場合は、次の属性をすべて変更できます。クライアントのみのインスタンスの場合は、インスタンスが関連付けられているインストール環境のみを変更できます(-install
オプション)。
TimesTenのデーモン・ポート
クライアント/サーバー用のTimesTenサーバー・ポート
tnsnames.ora
のTNS_ADMIN
の場所
Oracle Clusterwareの構成
インスタンスが関連付けられているTimesTenインストール環境
このユーティリティは、それに応じてtimesten.conf
ファイルを更新します。
ノート: インスタンス管理者は変更できません。 |
-help
オプションを指定してttInstanceModify
を実行し、使用可能なオプションをリストします。詳細は、Oracle TimesTen In-Memory DatabaseリファレンスのttInstanceModifyを参照してください。
コマンドライン・オプションを指定しない場合は、ttInstanceModify
を対話形式で実行できます。この場合、サポートされているオプションのいずれかを変更するかどうかをユーティリティによって1つずつ尋ねられます。
例2-8 ttInstanceModify: 対話形式での実行
この例では、新しいデーモン・ポートおよびサーバー・ポートを設定します。入力した値または選択されたデフォルトは太字で示されています。
% $TIMESTEN_HOME
/bin/ttInstanceModify
Instance Info
-------------
Name: myttinstance
Version: 18.1.4.1.0
Location: /swdir/TimesTen/ttinstances/myttinstance
Installation: /swdir/TimesTen/ttinstallations/fullinstall/tt18.1.4.1.0
Daemon Port: 28000
Server Port: 28001
Would you like to change the installation that this instance points to? [ no ]
The daemon for instance 'myttinstance' is currently configured to use port 28000.
Would you like to change this port? [ no ] yes
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.
Please enter a unique port number for the TimesTen daemon (<CR>=list)? [ ] 28050
Are you sure you want to change the daemon port number from 28000 to 28050?
[ yes ]
The server for instance 'myttinstance' is currently configured to use port 28001.
Would you like to change this port? [ no ] yes
Please enter a unique port number for the TimesTen server (<CR>=list)? [ ] 28060
Are you sure you want to change the server port number from 28001 to 28060?
[ yes ]
TNS_ADMIN for the instance 'myttinstance' is currently not set.
Would you like to change TNS_ADMIN for this instance? [ no ]
Would you like to configure TimesTen Replication with Oracle Clusterware? [ no ]
NOTE: The daemon will be stopped before changing port numbers.
Would you like to proceed with modifying the instance? [ yes ]
ttDaemonAdmin: daemon is not running
Changing the daemon port number ...
The daemon will now run on port 28050 ...
Changing the server port number ...
The server will now run on port 28060 ...
NOTE: You may need to modify your sys.ttconnect.ini file to
reflect the new server port. The sys.ttconnect.ini file is usually
located in your instance's conf directory, $TIMESTEN_HOME/conf.
Restarting the daemon ...
ttDaemonAdmin: daemon is not running
TimesTen Daemon (PID: 3072, port: 28050) startup OK.
timesten.conf
ファイルがそれに応じて更新されます。
# TimesTen Instance Configuration File ... daemon_port=28050 server_port=28060 ...
ノート: 対話形式モードでは、デーモン・ポートまたはサーバー・ポートを設定した場合はデーモンが自動的に再起動され、TNS_ADMIN を設定した場合はデーモンの再起動を求められます。 |
この例は、インスタンスのデーモン・ポートを変更する方法を示しています。
例2-9 ttInstanceModify: 完全インスタンスのポート番号の変更
この例では、最初にLinux/UNIXのecho
コマンドを実行して、$TIMESTEN_HOME
が参照するインスタンスを表示します。次に、$TIMESTEN_HOME
/conf/timesten.conf
ファイルを確認して、現在のポート番号を表示します。次に、ttInstanceModify
を実行してポート番号を6524
に変更します。最後のステップとして、$TIMESTEN_HOME
/conf/timesten.conf
ファイルでポート番号が変更されたことを示します。
% cat $TIMESTEN_HOME
/conf/timesten.conf
# TimesTen Instance Configuration File
# Created by ttInstanceCreate
# Commented values are default values
hostname=host1
timesten_release=18.1
instance_name=fullinstance1
daemon_port=6624
server_port=6625
admin_user=myadminuser
admin_uid=4738
group_name=timesten
instance_guid=9EEF0277-21C0-45F1-AB63-F0C5F48B6FE0
verbose=1
ttInstanceModify
を実行して、ポート番号を6524
に変更します。
% $TIMESTEN_HOME
/bin/ttInstanceModify -port 6524
The daemon will now run on port 6524 ...
You must restart the daemon for these changes to take effect.
$TIMESTEN_HOME/conf/timesten.conf
ファイルを確認して、ポート番号が変更されたことを確認します。
% cat $TIMESTEN_HOME
/conf/timesten.conf
# TimesTen Instance Configuration File
# Created by ttInstanceCreate
# Commented values are default values
hostname=host1
timesten_release=18.1
instance_name=fullinstance1
daemon_port=6524
server_port=6625
admin_user=myadminuser
admin_uid=4738
group_name=timesten
instance_guid=9D37C711-DF86-4007-A959-2AB52DA46035
verbose=1
デーモンを再起動します
% ttDaemonAdmin -start TimesTen Daemon (PID: 11635, port: 6524) startup OK.
-tnsadmin
オプションを指定してttInstanceModify
ユーティリティを使用すると、tnsnames.ora
ファイルへのパスを設定または変更できます。ファイルが配置されているディレクトリへのフルパスを指定します。これは、TimesTen Cache、OCI、Pro*C/C++またはODP.NETを使用するアプリケーションに関連しています。TimesTen Cacheの場合、これはOracle Databaseにアクセスするための設定です。TimesTen OCI、Pro*C/C++の場合
TNS_ADMIN
設定がTimesTenおよびユーザー・アプリケーションによって読み取られるようにするには、TNS_ADMIN
環境変数も設定します。
例2-10 ttInstanceModify: tnsnames.oraへのパスの設定または変更
この例では、現在のディレクトリがtimesten_home
である場合のオプションの使用方法を示しています。
% $TIMESTEN_HOME
/bin/ttInstanceModify -tnsadmin
/swdir/TimesTen/ttinstances/ttuser1instancelatest/instantclient
The value for TNS_ADMIN in
/swdir/TimesTen/ttinstances/ttuser1instancelatest/conf/timesten.conf
was changed to /swdir/TimesTen/ttinstances/ttuser1instancelatest/instantclient
ttInstanceModify
を実行する前は、$TIMESTEN_HOME
/conf/timesten.conf
ファイルにtns_admin
の値がありませんでした。
# TimesTen Instance Configuration File ... tns_admin= ...
-tnsadmin
オプションを指定してttInstanceModify
を実行すると、$TIMESTEN_HOME
/conf/timesten.conf
ファイルが更新されます。
# TimesTen Instance Configuration File ... tns_admin=/swdir/TimesTen/ttinstances/ttuser1instancelatest/instantclient ...
インスタンスの作成後、ttInstanceModify -crs
オプションを使用して、TimesTenのレプリケーションにOracle Clusterwareを使用するようにTimesTenの構成を変更し、Oracle Clusterwareのインストール環境へのフルパスを指定できます。例に示されているように、TimesTenのレプリケーションにOracle Clusterwareを構成するかどうかのプロンプト、およびインストール環境へのディレクトリ・パスの入力または確認のプロンプトが表示されます。指定したディレクトリに有効なOracle Clusterwareインストール環境が存在する必要があります。
例2-11 ttInstanceModify: Oracle Clusterwareの構成の変更
この例では、現在のディレクトリはtimesten_home
です。ユーザーの入力または選択されたデフォルトは太字で表示されています。
この例では、Oracle Clusterインストールへのパスを/u01/app/
crs_releasedir
/grid
として示しています。ここで、crs_releasedir
はCRSリリースの変数です(たとえば、CRSリリースが18.3.0
である場合、18.3.0
に置き換えて、パスを/u01/app/18.3.0/grid
のようにできます)。
% $TIMESTEN_HOME
/bin/ttInstanceModify -crs
Would you like to configure TimesTen Replication with Oracle Clusterware? [ no ]
yes
A Clusterware installation was detected in /u01/app/crs_releasedir/grid
Please provide the path to the Oracle Clusterware installation on this machine
(a=abort)?
[ /u01/app/crs_releasedir/grid ]
NOTE: The daemon port number must be the same across all TimesTen installations
part of the this Clusterware configuration.
Please enter a port number for the TimesTen Clusterware agent? [ 31006 ]
Executing '/u01/app/crs_releasedir/grid/bin/olsnodes' ...
Oracle Clusterware is currently configured on the following nodes :
1. tthost1
2. tthost2
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 ]
INFO: Modifying /u02/ttinstances/myinstance/conf/cluster.oracle.ini ...
Do you want to restart the daemon using the new configuration? [ yes ]
Restarting the daemon ...
ttDaemonAdmin: daemon is not running
TimesTen Daemon (PID: 30345, port: 31000) startup OK.
TimesTen Replication with Oracle Clusterware has been configured.
NOTE: Please run ttInstanceModify for all other TimesTen instances which are
part of the this Clusterware configuration.
ノート: Oracle Clusterwareのインストール環境がTimesTenによって検出されました。場所は確認する必要があるだけで、入力する必要はありません。 |
ttInstanceModify -install
オプションを使用すると、インスタンスを別のTimesTenインストール環境に関連付けることができます。通常、これを使用して、インスタンスを新しいメンテナンス・リリースまたはパッチ・リリースにアップグレードします。新しいメジャー・リリースへのアップグレード(11.2.2から18.1など)には使用できません。
例2-12 ttInstanceModify: 別のインストール環境とのインスタンスの関連付け
この例では、ttinstall
インストール環境からttinstalllatest
インストール環境にアップグレードします。現在のディレクトリは、ttuser1instance
インスタンスのtimesten_home
です。
オプション: $TIMESTEN_HOME
/bin/
ttInstanceModify
を実行する前に、timesten_home
/install
ディレクトリおよびファイルを確認して、定義されているシンボリック・リンクを理解できます。
timesten_home
/install
ディレクトリに移動し、Linux ls
-l
コマンドを実行して、このディレクトリ内のディレクトリおよびファイルを表示します。インストール・ディレクトリへのシンボリック・リンクは、このtimesten_home
/install
ディレクトリ内のほとんどのファイルとディレクトリに対して定義されていることに注意してください。(この例では、swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0
がインストール・ディレクトリです。)
% cd timesten_home
/install
% ls -l
...
lrwxrwxrwx 1 ttuser1 timesten 56 Jun 28 11:13 3rdparty ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/3rdparty
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 PERL ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 59 Jun 28 11:13 README.html ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 bin ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/bin
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 grid ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/grid
lrwxrwxrwx 1 ttuser1 timestten 55 Jun 28 11:13 include ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/include
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 info ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/info
drwxr-x--- 2 ttuser1 timesten 4096 Jun 28 11:13 lib
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 network ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/network
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 nls ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/nls
lrwxrwxrwx 1 ttuser1 timesten 61 Jun 28 11:13 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 53 Jun 28 11:13 plsql ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 startup ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/startup
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 support ->
/swdir/TimesTen/ttinstallations/ttinstall/tt18.1.3.5.0/support
drwxr-x--- 3 ttuser1 timesten 4096 Jun 28 11:13 ttoracle_home
ここで、$TIMESTEN_HOME
/bin/
ttInstanceModify
-install
を実行して、ttuser1instance
インスタンスを新規インストール(この例では/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0
)に関連付けます。
% $TIMESTEN_HOME
/bin/ttInstanceModify
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0
Instance Info (UPDATED)
-----------------------
Name: ttuser1instance
Version: 18.1.4.1.0
Location: /swdir/TimesTen/ttinstances/ttuser1instance
Installation: /swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0
Daemon Port: 21000
Server Port: 21001
The instance ttuser1instance now points to the installation in
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0
ttInstanceModify
の実行後、$TIMESTEN_HOME
/install
ディレクトリ内のシンボリック・リンクが新しいインストール・ディレクトリを指していることに注意してください。
% cd $TIMESTEN_HOME
/install
% ls -l
...
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 13:07 3rdparty ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/3rdparty
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 PERL ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 58 Jun 28 13:07 README.html ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 bin ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/bin
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 grid ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/grid
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 include ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/include
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 info ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/info
lrwxrwxrwx 1 ttuser1 timesten 57 Jun 28 13:07 kubernetes ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/kubernetes
drwxrwxr-x 2 ttuser1 timesten 4096 Jun 28 13:07 lib
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 network ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/network
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 nls ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/nls
lrwxrwxrwx 1 ttuser1 timesten 60 Jun 28 13:07 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 13:07 plsql ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 startup ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/startup
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 support ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0/support
drwxrwxr-x 3 ttuser1 timesten 4096 Jun 28 13:07 ttoracle_home
次の項では、ttInstanceDestroy
ユーティリティを使用してインスタンスを破棄する方法について説明します。
ttInstanceDestroy
ユーティリティは、既存のインスタンスを破棄します。破棄されるインスタンスは、インスタンス・ホーム・ディレクトリを示すTIMESTEN_HOME
環境変数の現在の設定に基づきます。関連付けられているインストール環境のbin
ディレクトリにあるttInstanceDestroy
ユーティリティを実行します。(たとえば、installation_dir
/tt18.1.4.1.0/bin
。)
インスタンス管理者(インスタンスを作成したユーザー)のみがインスタンスを破棄できます。
ノート: 破棄するインスタンスに関連付けられたデータベースに対する既存の接続がない必要があります。 |
-help
オプションを指定してttInstanceDestroy
ユーティリティを実行し、使用可能なオプションをリストします。詳細は、Oracle TimesTen In-Memory DatabaseリファレンスのttInstanceDestroyを参照してください。
ノート: -force オプションを指定すると、確認を求めずに操作が完了します。 |
ttInstanceDestroy
ユーティリティでは、次のステップが実行されます。
インスタンスのTimesTen起動スクリプトが(root
によって)インストールされている場合は、インスタンスを破棄する前に(root
が)それを削除する必要があることを示すリマインダが送られます。
これは、setuproot -install
およびsetuproot -uninstall
コマンドを意味します。詳細は、システム起動時のインスタンスの自動起動を参照してください。
インスタンスを破棄することの確認を求めます(-force
を指定した場合を除く)。
インスタンスに割り当てられていたポートを解放します。
インスタンスを対話形式で破棄するには、ttInstanceDestroy
ユーティリティを使用します。installation_dir
/tt18.1.4.1.0/bin
ディレクトリ(インスタンスのインストール・ディレクトリ)からユーティリティを実行します。インスタンス・ホーム・ディレクトリ(timesten_home
)には、インスタンスに関連付けられたインストール環境の最上位レベルのディレクトリへのシンボリック・リンクであるサブディレクトリ(/install
)が含まれています。詳細は、インスタンス・ホームを参照してください。
例2-13 ttInstanceDestroy: インスタンスの破棄
%installation_dir
/tt18.1.4.1.0/bin/t
tInstanceDestroy ** WARNING ** The uninstallation has been executed by a non-root user. If the TimesTen daemon startup scripts were installed, you must run $TIMESTEN_HOME/bin/setuproot -uninstall to remove them. If you proceed with this uninstallation, you will have to remove the startup scripts manually. ** WARNING ** All files in the directory: /scratch/ttuser/fullinstance1 will be removed, including any file that you or other users may have created. Are you sure you want to completely remove this instance? [ yes ] yes Installation will remove all the files from /scratch/ttuser/fullinstance1. Do you want to continue? [ yes ] NOTE: /scratch/ttuser/fullinstance1/info contains information related to the data store that have been created with this release. If you remove /scratch/ttuser/fullinstance1/info you will no longer be able to access your data stores, nor would you be able to restore nor migrate your data. NOTE: /scratch/ttuser/fullinstance1/conf contains information related to the instance configuration. /scratch/ttuser/fullinstance1 Removed The TimesTen instance fullinstance1 has been destroyed.
インストール環境のZIPファイルをソース・ホストからターゲット・ホストにコピーしてそのホストで解凍することで、インストール環境を別のホストにコピーできます。ZIPユーティリティなどの適切なメカニズムを使用して、ソース・ホストのインストール環境をバンドルしてから別の場所または別のホストにそれを解凍することもできます。これは、元のTimesTenディストリビューションが都合よく使用できない場合などに便利です。コピーされたインストール環境は、ファイル権限が適切に保持されているかぎり有効です。
この例では、ZIPユーティリティを使用してホスト間でインストール環境をコピーします。
元のホストで、インストール・ディレクトリ(インストールが解凍されたディレクトリ)から、インストール環境(最上位レベルのtt18.1.4.1.0
ディレクトリおよびそのコンテンツ)を含むZIPファイルを作成します。
% zip my181410install.zip tt18.1.4.1.0
ZIPファイルをターゲット・ホストに転送します。
ターゲット・ホストで、目的のインストールの場所の上のディレクトリでZIPファイルを解凍します。
% unzip my181410install.zip
これにより、tt18.1.4.1.0
ディレクトリが作成され、そこにインストール環境が解凍されます。
ターゲット・ホストで、必要に応じてttInstallationCheck
を実行して、新しいコピーのインストール環境を検証します。
インストール環境をコピーしたディレクトリから、次のコマンドを実行します。
% installation_dir
/tt18.1.4.1.0/bin/ttInstallationCheck
This installation has been verified.
この項では、インストール環境の削除方法について説明します。
削除するには、TimesTenをインストールした(ディストリビューションを解凍した)ユーザーが次のステップを実行します。
TimesTenインストール環境の下に、Timestenインスタンス、データベースまたは重要なファイルがないことを確認します。
このインストール環境を使用しているTimesTenインスタンスがないことを確認します。(TimesTenはTimesTenのインストール環境またはインスタンスのインベントリを保持しないため、これを自動的に行う方法はありません。)
インストール環境を使用するインスタンスがある場合は、インストール環境を削除する前に、別のインストール環境を指すようにインスタンスを変更するか、削除する必要があります。詳細は、別のインストール環境とのインスタンスの関連付け(アップグレードまたはダウングレード)を参照してください。
chmod -R
コマンドなどを使用して、インストール環境への書込み権限を付与します。たとえば、TimesTen 18.1.4.1.0
インストール環境が解凍されたインストール・ディレクトリから、次のコマンドを実行します。
% chmod -R 750 installation_dir
/tt18.1.4.1.0
rm -rf
コマンドなどを使用して、tt18.1.4.1.0
ディレクトリおよびそこに含まれているすべてのファイルとサブディレクトリを削除します。インストール・ディレクトリから、次のコマンドを実行します。
% rm -rf installation_dir
/tt18.1.4.1.0
インストール・ディレクトリが空の場合は、必要に応じて削除します。
最初の3つのステップは、完全インストールおよび完全インスタンスのためのインストール・ステップを示しています。残りのステップはオプションであり、情報を提供するために説明しています。
この例では、timesten181410.server.linux8664.zip
ディストリビューションから完全インストールを作成します。
インスタンス管理者として指定したオペレーティング・システム・ユーザーが、インスタンスを持つことになるホストにTimesTenディストリビューションをダウンロードして最初にインストールを作成します。たとえば、timesten18.1.4.1.0.server.linux8664.zip
をダウンロードします。
この例では、インスタンス管理者がディストリビューションをダウンロードした後に実行するステップを示します。詳細は、Linux/UNIXでのインストール環境の作成を参照してください。
ttInstanceCreate
ユーティリティを対話形式で実行して、インストール環境から完全インスタンスを/installation1
に作成します。/installation1
ディレクトリは/installation_dir
として参照されています。詳細は、Linux/UNIXでのインスタンスの作成: 基本を参照してください。
例2-15 ttInstanceCreate: 対話形式での完全インスタンスの作成
インストール・ディレクトリの/bin
領域に移動し、そのディレクトリにあるttInstanceCreate
ユーティリティを実行します。ttInstanceCreate
ユーティリティは、インストール・ディレクトリから実行する必要があります。ユーザーの入力は太字で示されています。
% installation_dir
/tt18.1.4.1.0/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? [ tt181 ] fullinstance1 Instance name will be 'fullinstance1'. Is this correct? [ yes ] Where would you like to install the fullinstance1 instance of TimesTen? [ /home/ttuser ] /scratch/ttuser Creating instance in /scratch/ttuser/fullinstance1 ... INFO: Mapping files from the installation to /scratch/ttuser/fullinstance1/install 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 'TimesTen Application-Tier Database Cache' feature in any databases created within this installation, 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 ] NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. The startup script is located here : '/scratch/ttuser/fullinstance1/startup/tt_fullinstance1' Run the 'setuproot' script : /scratch/ttuser/fullinstance1/bin/setuproot -install This will move the TimesTen startup script into its appropriate location. The 18.1 Release Notes are located here : '/installation_dir
/tt18.1.4.1.0/README.html' Starting the daemon ... TimesTen Daemon (PID: 20396, port: 6624) startup OK.
TimesTenを使用できるようにするには、環境変数を設定する必要があります。特に、TIMESTEN_HOME
が設定されていることを確認します。詳細は、TimesTenの環境変数の設定を参照してください。
必要に応じて、ttStatus
ユーティリティを実行し、デーモンが実行されていることを確認できます。このユーティリティの詳細は、『Oracle TimesTen In-Memory Databaseリファレンス』のttStatusを参照してください。
例2-17 ttStatusユーティリティを実行して、インスタンスのデーモンが実行されていることを確認する
% ttStatus TimesTen status report... Daemon pid 20396 port 6624 instance fullinstance1 TimesTen server pid 20403 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Accessible by group g900 End of report
この例では、まず$TIMESTEN_HOME
/conf/sys.odbc.ini
ファイルにdatabase1
のDSNを定義します。次に、ttIsql
ユーティリティを使用し、database1
を作成して接続します。DSNの詳細は、『Oracle TimesTen In-Memory Databaseオペレーション・ガイド』のTimesTenデータベースを識別するためのデータソース名の指定を参照してください。
例2-18 完全インスタンスでのデータベースの作成および接続
この例では、まずLinuxのvi
エディタを使用して$TIMESTEN_HOME
/conf/sys.odbc.ini
ファイルを変更し、database1
のDSNを追加します。database1
のDSNの接続属性を指定します。必須の接続属性およびオプションの接続属性の詳細は、Oracle TimesTen In-Memory Databaseリファレンスの接続属性を参照してください。次に、ttIsql
ユーティリティを実行し、database1
のDSNを作成して接続します。最後のステップとして、簡単な問合せを実行します。
% vi $TIMESTEN_HOME
/conf/sys.odbc.ini
[database1]
DataStore=/disk1/databases/database1
LogDir=/disk2/logs
DatabaseCharacterSet=AL32UTF8
PermSize=1280
TempSize=640
LogBufMB=1024
sys.odbc.ini
ファイルを保存してvi
エディタを終了した後に、ttIsql
ユーティリティを実行してデータベースを作成し、database1
のDSNに接続します。(インスタンス管理者が新しく作成されたdatabase1
のDSNに最初に接続したときに、データベースが作成されます)。
% ttIsql database1 Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=database1"; Connection successful: DSN=database1;UID=ttuser;DataStore=/databases/database1; DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII; DRIVER=fullinstancedir/fullinstance1/install/lib/libtten.so; (Default setting AutoCommit=1)
簡単な問合せを実行します。
Command> SELECT * FROM dual; < X > 1 row found.
ttStatus
を再度実行して、database1
データベースへの接続を表示します。このユーティリティの詳細は、『Oracle TimesTen In-Memory Databaseリファレンス』のttStatusを参照してください。
例2-19 ttStatusの実行による接続の表示
% ttStatus TimesTen status report... Daemon pid 20396 port 6624 instance fullinstance1 TimesTen server pid 20403 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Data store /databases/database1 Installation will expire after... Daemon pid 20396 port 6624 instance fullinstance1 TimesTen server pid 20403 started on port 6625 There are 14 connections to the data store Shared Memory KEY 0x02100497 ID 4292609 PL/SQL Memory KEY 0x03100497 ID 4325378 Address 0x5000000000 Type PID Context Connection Name ConnID Process 20766 0x00007f06f4ccf010 fullinstance1 1 Subdaemon 20401 0x00007f92b40008c0 Checkpoint 2041 Subdaemon 20401 0x00007f92bc0008c0 Monitor 2042 Subdaemon 20401 0x00007f92c40008c0 Deadlock Detector 2044 Subdaemon 20401 0x00007f92dc0008c0 Flusher 2045 Subdaemon 20401 0x00007f92e485d010 Garbage Collector 2036 Subdaemon 20401 0x00007f92e4c78010 XactId Rollback 2037 Subdaemon 20401 0x00007f92e5194010 IndexGC 2035 Subdaemon 20401 0x00007f92e56b0010 HistGC 2040 Subdaemon 20401 0x00007f92e5bcc010 AsyncMV 2038 Subdaemon 20401 0x00007f92e60e8010 Log Marker 2039 Subdaemon 20401 0x00007f92e6503010 Aging 2043 Subdaemon 20401 0x00007f92e77ca010 Rollback 2046 Subdaemon 20401 0x00007f92e7be5010 Manager 2047 Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Accessible by group g900 End of report
この例では、ttInstanceModify
ユーティリティを実行してデーモンのポート番号を変更します。変更されるインスタンスは、$TIMESTEN_HOME
で参照されるインスタンスです。このコマンドを実行します。
確認を求められます
インスタンスのTimesTenデーモンを停止します
更新された情報で$TIMESTEN_HOME/conf/timesten.conf
ファイルを編集します
インスタンスのTimesTenデーモンを起動します
詳細は、Linux/UNIXでのインスタンスの変更を参照してください。
例2-20 完全インスタンスのポート番号の変更
この例では、最初にLinux/ UNIX echo
コマンドを実行して、$TIMESTEN_HOME
が参照するインスタンスを表示し、$TIMESTEN_HOME/conf/timesten.conf
ファイルを確認して現在のポート番号の設定を確認します。次に、ttInstanceModify
を実行してポート番号を6524
に変更します。この例では、$TIMESTEN_HOME/conf/timesten.conf
ファイルを確認し、ポート番号が変更されていることを確認します。最後のステップとして、デーモンが起動します。
% echo $TIMESTEN_HOME
/scratch/ttuser/fullinstance1
% cat $TIMESTEN_HOME
/conf/timesten.conf
# TimesTen Instance Configuration File
# Created by ttInstanceCreate
# Commented values are default values
hostname=host1
timesten_release=18.1
instance_name=fullinstance1
daemon_port=6624
server_port=6625
admin_user=myadminuser
admin_uid=4738
group_name=timesten
instance_guid=9EEF0277-21C0-45F1-AB63-F0C5F48B6FE0
verbose=1
ttInstanceModify
を実行して、ポート番号を6524
に変更します。
% $TIMESTEN_HOME
/bin/ttInstanceModify -port 6524
The daemon will now run on port 6524 ...
You must restart the daemon for these changes to take effect.
$TIMESTEN_HOME/conf/timesten.conf
ファイルを確認して、ポート番号が変更されたことを確認します。このファイルの詳細は、インスタンスの構成ファイル(timesten.conf)を参照してください。
% cat $TIMESTEN_HOME/conf/timesten.conf # TimesTen Instance Configuration File # Created by ttInstanceCreate # Commented values are default values hostname=host1 timesten_release=18.1 instance_name=fullinstance1 daemon_port=6524 server_port=6625 admin_user=myadminuser admin_uid=4738 group_name=timesten instance_guid=9D37C711-DF86-4007-A959-2AB52DA46035 verbose=1
デーモンを再起動します
% ttDaemonAdmin -start -force TimesTen Daemon (PID: 11635, port: 6524) startup OK.
インスタンスを破棄するには、ttInstanceDestroy
ユーティリティを対話形式で使用します。この例では、オプションなしでユーティリティを実行します。このユーティリティは、インストール・ディレクトリのbin
領域から実行する必要があります。詳細は、Linux/UNIXでのインスタンスの破棄を参照してください。
例2-21 完全インスタンスの破棄
% installation_dir/tt18.1.4.1.0/bin/ttInstanceDestroy ** WARNING ** The uninstallation has been executed by a non-root user. If the TimesTen daemon startup scripts were installed, you must run $TIMESTEN_HOME/bin/setuproot -uninstall to remove them. If you proceed with this uninstallation, you will have to remove the startup scripts manually. ** WARNING ** All files in the directory: /scratch/ttuser/fullinstance1 will be removed, including any file that you or other users may have created. Are you sure you want to completely remove this instance? [ yes ] yes Installation will remove all the files from /scratch/ttuser/fullinstance1. Do you want to continue? [ yes ] NOTE: /scratch/ttuser/fullinstance1/info contains information related to the data store that have been created with this release. If you remove /scratch/ttuser/fullinstance1/info you will no longer be able to access your data stores, nor would you be able to restore nor migrate your data. NOTE: /scratch/ttuser/fullinstance1/conf contains information related to the instance configuration. /scratch/ttuser/fullinstance1 Removed The TimesTen instance fullinstance1 has been destroyed.
詳細は、「Linux/UNIXでのインストール環境の削除」を参照してください。
Oracle Clusterwareをインストールするには、Oracle Databaseのドキュメントの『Oracle Clusterware管理およびデプロイメント・ガイド』を参照してください。また、『Oracle TimesTen In-Memory Databaseレプリケーション・ガイド』のOracle Clusterwareを使用したアクティブ・スタンバイ・ペアの管理に関する項も参照してください。
次の推奨事項に従います。
OCRおよび投票ディスクの両方に使用するNFS共有を作成します。NFS共有を投票ディスクとして使用するには、特定のNFSパラメータが必要です。
Oracle Clusterwareのローリング・アップグレードが許可されないため、共有Oracleホームにインストールしないでください。かわりに、各計算ノードにClusterwareを個別にインストールする必要があります。
各計算ノードにClusterwareをインストールします。Clusterwareインストールへのパスは、各計算ノードにおいて同一である必要があります。したがって、個別のClusterwareインストールにアクセスするために、各計算ノードが同じパスを使用できるディレクトリ構造を設定する必要があります。
共有記憶域では、各計算ノードに対して個別のディレクトリが存在します。
計算ノード1の場合、ディレクトリは次となります。
/export/compute_node_1/general
計算ノード2の場合、ディレクトリは次となります。
/export/compute_node_2/general
計算ノードn
の場合、ディレクトリは次となります。
/export/compute_node_n/general
NFSマウントを使用して、ノード固有のディレクトリを、各計算ノードにおいて同一のパスへとマップします。
ホスト1では、次のようにします。
mkdir -p /swdir/oracle
mount storage-server:/export/compute_node_1/general /swdir/oracle
ホスト2では、次のようにします。
mkdir -p /swdir/oracle
mount storage-server:/export/compute_node_2/general /swdir/oracle
ホストn
では、次のようにします。
mkdir -p /swdir/oracle
mount storage-server:/export/compute_node_n/general /swdir/oracle
各ホストでは、/swdir/oracle/crs
にOracle Clusterwareをインストールします。