Modifying an Instance on Linux/UNIX
If you are using systemd as a TimesTen service, and you want to modify the instance, see "Using systemd to Manage a TimesTen Service" and "About Modifying a TimesTen Instance to Enable or Disable Management by systemd" for details.
These sections discuss how to modify instances that do not use systemd as a TimesTen service:
For information on modifying an instance with systemd, see Using systemd to Manage a TimesTen Service
The ttInstanceModify Utility
The ttInstanceModify
utility modifies the attributes of an instance. The instance that is modified is the instance that the $TIMESTEN_HOME
environment variable references. Run the ttInstanceModify
utility from the $TIMESTEN_HOME
/bin
directory.
For a full instance, you can modify all of these attributes. For a client-only instance, you can only modify the installation with which the instance is associated (-install
option):
-
TimesTen daemon port
-
TimesTen Server port for client/server
-
TNS_ADMIN
location fortnsnames.ora
-
Oracle Clusterware configuration
-
TimesTen installation with which the instance is associated
The utility then updates the timesten.conf
file accordingly.
Note:
The instance administrator cannot be modified.
Run the ttInstanceModify
with the -help
option to list the available options. See ttInstanceModify in the Oracle TimesTen In-Memory Database
Reference for detailed descriptions.
Modify an Instance from Information Provided Interactively
You can run ttInstanceModify
interactively if you do not specify any command-line options. In this case, the utility asks one by one if you want to change any of the supported options.
This example sets a new daemon port and server port. The values entered, or defaults chosen, are shown in bold.
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 thettInstanceModify
output.
% $TIMESTEN_HOME
/bin/ttInstanceModify
Instance Info
-------------
Name: myttinstance
Version: 22.1.1.25.0
Location: /swdir/TimesTen/ttinstances/myttinstance
Installation: /swdir/TimesTen/ttinstallations/fullinstall/tt22.1.1.25.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.
The timesten.conf
file is updated accordingly:
# TimesTen Instance Configuration File ... daemon_port=28050 server_port=28060 ...
Note:
In interactive mode, the daemon is restarted automatically if you set the daemon port or server port, and you are prompted to restart the daemon if you set TNS_ADMIN
.
Change the Daemon Port for an Instance
You can change the daemon port for an instance.
This example first runs the Linux/UNIX echo
command to display the instance in which $TIMESTEN_HOME
references. It then reviews the $TIMESTEN_HOME
/conf/timesten.conf
file to display the current port number. It then runs ttInstanceModify
to change the port number to 6524
. As a final step, the example shows the port number has been changed in the $TIMESTEN_HOME
/conf/timesten.conf
file.
% 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
Run ttInstanceModify
to change the port number to 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.
Review the $TIMESTEN_HOME/conf/timesten.conf
file to ensure the port number is changed.
% 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
Restart the daemon
% ttDaemonAdmin -start TimesTen Daemon (PID: 11635, port: 6524) startup OK.
Set or Change the Path to tnsnames.ora for an Instance
You can use the ttInstanceModify
utility with the -tnsadmin
option to set or change the path to the tnsnames.ora
file. Specify the full path to the directory where the file is located. This is relevant for an application using TimesTen Cache, OCI, Pro*C/C++, or ODP.NET. For TimesTen Cache, this is for access to the Oracle Database. For TimesTen OCI, Pro*C/C++, and
To ensure that the TNS_ADMIN
setting is read by TimesTen as well as by user applications, also set the TNS_ADMIN
environment variable.
This example shows how to use the -tnsadmin
option. The current directory is 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
Before you ran ttInstanceModify
, the $TIMESTEN_HOME
/conf/timesten.conf
file had no value for tns_admin
:
# TimesTen Instance Configuration File ... tns_admin= ...
After running ttInstanceModify
with the -tnsadmin
option, the $TIMESTEN_HOME
/conf/timesten.conf
file is updated:
# TimesTen Instance Configuration File ... tns_admin=/swdir/TimesTen/ttinstances/ttuser1instancelatest/instantclient ...
Change the Oracle Clusterware Configuration for an Instance
This example illustrates how to modify an instance to use TimesTen replication with Oracle Clusterware. Since TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems, do not run this example if you are using Oracle Linux for Arm.
After creating an instance, use the ttInstanceModify -crs
option to change the TimesTen configuration to use Oracle Clusterware for TimesTen Replication and specify the full path to the Oracle Clusterware installation. As shown in the example, there is a prompt to confirm whether you want to configure TimesTen Replication with Oracle Clusterware and to enter or confirm the directory path to the installation. There must be a valid Oracle Clusterware installation in the specified directory. In this example, the current directory is timesten_home
. User entries or defaults that are chosen are shown in bold.
This example provides the path to the Oracle Cluster installation as /u01/app/
crs_releasedir
/grid
, where crs_releasedir
is a variable for the CRS release (for example, if the CRS release is 19.1.0
, you could substitute, 19.1.0
, such that the path would be /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.
Note:
The Oracle Clusterware installation was detected by TimesTen. The location merely had to be confirmed, not entered.
Associate an Instance with a Different Installation (Upgrade or Downgrade)
You can use the ttInstanceModify -install
option to associate the instance with a different TimesTen installation. This is typically used to upgrade the instance to a new maintenance or patch release. It cannot be used to upgrade to a new major release (such as going from 18.1 to 22.1).
This example upgrades from the ttinstall
installation to the ttinstalllatest
installation. The current directory is timesten_home
for the ttuser1instance
instance.
Optional: Before running $TIMESTEN_HOME
/bin/
ttInstanceModify
, you can review the timesten_home
/install
directories and files to gain an understanding of the symbolic links that are defined.
Navigate to the timesten_home
/install
directory and run the Linux ls
-l
command to list the directories and the files within this directory. Note that symbolic links to the installation directory are defined for most of the files and the directories within this timesten_home
/install
directory. (In this example, swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0
is the installation directory.)
% cd timesten_home
/install
% ls -l
...
lrwxrwxrwx 1 ttuser1 timesten 56 Jun 28 11:13 3rdparty ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/3rdparty
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 PERL ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 59 Jun 28 11:13 README.html ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 bin ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/bin
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 grid ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/grid
lrwxrwxrwx 1 ttuser1 timestten 55 Jun 28 11:13 include ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/include
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 11:13 info ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.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.25.0/network
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 11:13 nls ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/nls
lrwxrwxrwx 1 ttuser1 timesten 61 Jun 28 11:13 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 53 Jun 28 11:13 plsql ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 startup ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/startup
lrwxrwxrwx 1 ttuser1 timesten 55 Jun 28 11:13 support ->
/swdir/TimesTen/ttinstallations/ttinstall/tt22.1.1.25.0/support
drwxr-x--- 3 ttuser1 timesten 4096 Jun 28 11:13 ttoracle_home
Now run $TIMESTEN_HOME
/bin/
ttInstanceModify
-install
to associate the ttuser1instance
instance with the new installation (/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.26.0
, in this example).
% $TIMESTEN_HOME
/bin/ttInstanceModify
/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.26.0
Instance Info (UPDATED)
-----------------------
Name: ttuser1instance
Version: 22.1.1.26.0
Location: /swdir/TimesTen/ttinstances/ttuser1instance
Installation: /swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.26.0
Daemon Port: 21000
Server Port: 21001
The instance ttuser1instance now points to the installation in
/swdir/TimesTen/ttinstallations/ttinstalllatest/22.1.1.26.0
After running ttInstanceModify
, note the symbolic links within the $TIMESTEN_HOME
/install
directory point to the new installation directory.
% 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.26.0/PERL
lrwxrwxrwx 1 ttuser1 timesten 58 Jun 28 13:07 README.html ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/README.html
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 bin ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/bin
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 grid ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/grid
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 include ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/include
lrwxrwxrwx 1 ttuser1 timesten 51 Jun 28 13:07 info ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/info
lrwxrwxrwx 1 ttuser1 timesten 57 Jun 28 13:07 kubernetes ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.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.26.0/network
lrwxrwxrwx 1 ttuser1 timesten 50 Jun 28 13:07 nls ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/nls
lrwxrwxrwx 1 ttuser1 timesten 60 Jun 28 13:07 oraclescripts ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/oraclescripts
lrwxrwxrwx 1 ttuser1 timesten 52 Jun 28 13:07 plsql ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/plsql
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 startup ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/startup
lrwxrwxrwx 1 ttuser1 timesten 54 Jun 28 13:07 support ->
/swdir/TimesTen/ttinstallations/ttinstalllatest/tt22.1.1.26.0/support
drwxrwxr-x 3 ttuser1 timesten 4096 Jun 28 13:07 ttoracle_home