Linux/UNIXでのインスタンスの変更
systemdをTimesTenサービスとして使用していて、インスタンスを変更する場合は、systemdを使用したTimesTenサービスの管理およびsystemdによる管理を有効または無効にするためのTimesTenインスタンスの変更についてを参照してください。
次の項では、systemdをTimesTenサービスとして使用しないインスタンスを変更する方法について説明します。
systemdを使用したインスタンスの変更の詳細は、systemdを使用したTimesTenサービスの管理を参照してください
ttInstanceModifyユーティリティ
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つずつ尋ねられます。
この例では、新しいデーモン・ポートおよびサーバー・ポートを設定します。入力した値または選択されたデフォルトは太字で示されています。
ノート:
Oracle Clusterwareを使用したTimesTenのレプリケーションは、Oracle Linux for Armシステムではサポートされていません。Oracle Linux for Armを使用している場合、Oracle ClusterwareのメッセージがttInstanceModify
出力に表示されません。
% $TIMESTEN_HOME
/bin/ttInstanceModify
Instance Info
-------------
Name: myttinstance
Version: 22.1.1.29.0
Location: /swdir/TimesTen/ttinstances/myttinstance
Installation: /swdir/TimesTen/ttinstallations/fullinstall/tt22.1.1.29.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
を設定した場合はデーモンの再起動を求められます。
インスタンスのデーモン・ポートの変更
インスタンスのデーモン・ポートを変更できます。
この例では、最初に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=22.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=22.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.
インスタンスのtnsnames.oraへのパスの設定または変更
-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
環境変数も設定します。
この例は、-tnsadmin
オプションの使用方法を示しています。現在のディレクトリは 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 ...
インスタンスのOracle Clusterware構成の変更
この例では、インスタンスを変更して、Oracle ClusterwareでTimesTenレプリケーションを使用する方法を示します。Oracle Clusterwareを使用したTimesTenレプリケーションは、Oracle Linux for Armシステムではサポートされないため、Oracle Linux for Armを使用している場合はこの例を実行しないでください。
インスタンスの作成後、ttInstanceModify -crs
オプションを使用して、TimesTenのレプリケーションにOracle Clusterwareを使用するようにTimesTenの構成を変更し、Oracle Clusterwareのインストール環境へのフルパスを指定します。例に示されているように、TimesTenのレプリケーションにOracle Clusterwareを構成するかどうかのプロンプト、およびインストール環境へのディレクトリ・パスの入力または確認のプロンプトが表示されます。指定したディレクトリに有効なOracle Clusterwareインストール環境が存在する必要があります。この例では、現在のディレクトリはtimesten_home
です。ユーザーの入力または選択されたデフォルトは太字で表示されています。
この例では、Oracle Clusterインストール環境へのパスを/u01/app/
crs_releasedir
/grid
として示しています。ここで、crs_releasedir
はCRSリリースの変数です(たとえば、CRSリリースが19.1.0
の場合、19.1.0
に置き換えて、パスを/u01/app/19.1.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インストール環境に関連付けることができます。通常、これを使用して、インスタンスを新しいメンテナンス・リリースまたはパッチ・リリースにアップグレードします。新しいメジャー・リリースへのアップグレード(18.1から22.1など)には使用できません。
この例では、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/tt22.1.1.29.0
がインストール・ディレクトリです。)
% cd timesten_home
/install
% ls -l
...
lrwxrwxrwx 1 ttuser1 timesten 56 Jun 28 11:13 3rdparty ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/3rdparty
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 PERL ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 59 Jun 28 11:13 README.html ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 bin ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/bin
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 grid ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/grid
lrwxrwxrwx 1 ttuser1 timestten 55 Jun 28 11:13 include ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/include
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 info ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.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/tt22.1.1.29.0/network
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 nls ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/nls
lrwxrwxrwx 1 ttuser1 timesten 61 Jun 28 11:13 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 53 Jun 28 11:13 plsql ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 startup ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/startup
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 support ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.29.0/support
drwxr-x--- 3 ttuser1 timesten 4096 Jun 28 11:13 ttoracle_home
ここで、$TIMESTEN_HOME
/bin/
ttInstanceModify
-install
を実行して、ttuser1instance
インスタンスを新規インストール環境(この例では/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.30.0
)に関連付けます。
% $TIMESTEN_HOME
/bin/ttInstanceModify
/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.30.0
Instance Info (UPDATED)
-----------------------
Name: ttuser1instance
Version: 22.1.1.30.0
Location: /swdir/TimesTen/ttinstances/ttuser1instance
Installation: /swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.30.0
Daemon Port: 21000
Server Port: 21001
The instance ttuser1instance now points to the installation in
/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.30.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/tt/3rdparty
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 PERL ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 58 Jun 28 13:07 README.html ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 bin ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/bin
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 grid ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/grid
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 include ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/include
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 info ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/info
lrwxrwxrwx 1 ttuser1 timesten 57 Jun 28 13:07 kubernetes ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.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/tt22.1.1.30.0/network
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 nls ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/nls
lrwxrwxrwx 1 ttuser1 timesten 60 Jun 28 13:07 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 13:07 plsql ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 startup ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/startup
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 support ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.30.0/support
drwxrwxr-x 3 ttuser1 timesten 4096 Jun 28 13:07 ttoracle_home