2 Installation of TimesTen Classic on Linux or UNIX

This chapter is for TimesTen Classic only. It discusses how to create and manage installations and instances for TimesTen Classic on Linux and UNIX hosts.

Before installing TimesTen Classic, ensure you have reviewed the terminology and completed the prerequisites. See Chapter 1, "Overview of the Installation Process in TimesTen Classic" for more information.

For information on TimesTen Scaleout, see "Overview of TimesTen Scaleout" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.

This chapter focuses primarily on full installations and full instances. See "Client-only Installations and Instances" for information on client-only installations and instances.

The examples in this chapter are performed on Linux, but are applicable to the platforms that support full installations and full instances.

Topics include:

There is an example at the end of the chapter that demonstrates the steps for creating an installation, creating an instance, modifying an instance, destroying an instance, and deleting the installation. This example ties all the concepts of the installation process together. See:

"Complete example for installing and uninstalling TimesTen Classic" for details.

There is also information on installing Oracle Clusterware. See "Installing Oracle Clusterware for use with TimesTen" for information.

Creating an installation on Linux/UNIX

The first step in creating the installation is to decide the operating system user who will install TimesTen Classic. This user installs TimesTen Classic by unzipping the distribution. See "Distribution media and the distribution" for information. This user is named the instance administrator. See "Instance administrator" for details.

Note:

The operating system user that unzips the distribution (and thereby installs TimesTen Classic) is named the instance administrator. This instance administrator is the only user that can create instances. See "TimesTen instances" and "Creating an instance on Linux/UNIX: Basics" for details.

There is one distribution file:

  • On Linux 64-bit, there is not a separate client only installation file. For example, for release 18.1.4.1.0, the distribution file name is timesten181410.server.linux8664.zip. Unzip this file to install either the full product or the client. When you create the instance, there is a qualifier that you specify to create a client-only instance. See "Creating an instance on Linux/UNIX: Basics" for details.

  • On Linux 32-bit, there is only a client installation file.

The instance administrator can create an installation that is accessible by the instance administrator's primary group, by the instance administrator's secondary group, or by only the instance administrator. In addition, the instance administrator can and should verify the installation is successful. These sections cover these topics:

Create an installation accessible by the instance administrator's primary group

To create the installation that is accessible by the instance administrator's primary group:

  1. Place the appropriate distribution file in some desired, accessible location.

  2. Create the desired directory for the installation.

  3. Change directories to the desired directory for the installation.

  4. Extract the distribution into that directory.

In the following example on Linux, ttuser1, with primary group timesten, creates a full installation into the directory fullinstall (a subdirectory of the current directory) from a distribution file in /swdir/TimesTen/ttinstallers. This installation is accessible to members of timesten.

% mkdir fullinstall
% cd fullinstall
% unzip /swdir/TimesTen/ttinstallers/timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]

The top level directory of the installed files is of the form tt18.1.4.1.0.

For example, this directory is created under fullinstall:

dr-xr-x--- 19 ttuser1 timesten 4096 Mar  2 22:07 tt18.1.4.1.0

The tt18.1.4.1.0 directory includes such files as:

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

A timesten member can access the instance. A user who is not a member of timesten does not have access to this instance or any instance created from the installation.

Create an installation accessible by the instance administrator's secondary group

To create an installation that is accessible by a secondary group of the instance administrator:

  1. Place the appropriate distribution file in some desired, accessible location.

  2. Create the desired directory for the installation.

  3. Change directories to the desired directory for the installation.

  4. Extract the distribution into that directory.

  5. Use the chgrp Linux command to change ownership of the installation to the desired group.

In the following example, ttuser2, with primary group users and secondary group timesten, creates a full installation into the directory fullinstall_secgrp from a distribution file in /swdir/TimesTen/ttinstallers. After ttuser2 executes the chgrp command, this installation is accessible to members of timesten.

% mkdir fullinstall_secgrp
% cd fullinstall_secgrp
% unzip /swdir/TimesTen/ttinstallers/timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]

The top level directory of the installed files is of the form tt18.1.4.1.0.

For example, under the installation directory, before the chgrp command:

dr-xr-x--- 19 ttuser2 users    4096 Mar  2 22:07 tt18.1.4.1.0

The tt18.1.4.1.0 directory, shown before the chgrp command, includes such files as:

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

User ttuser2 executes chgrp from the fullinstall_secgrp installation directory:

% chgrp -R timesten .

Under the installation directory, after the chgrp command:

dr-xr-x--- 19 ttuser2 timesten 4096 Mar  2 22:07 tt18.1.4.1.0

The tt18.1.4.1.0 directory, shown after the chgrp command, includes such files as:

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

After the chgrp command, a timesten member can access the instance. A user who is not a member of timesten does not have access to this instance or any instance created from the installation.

Create an installation accessible by only the instance administrator

An installation can be created that is accessible by only the instance administrator, although this is not typical. To accomplish this:

  1. Place the appropriate distribution file in the desired directory.

  2. Create the desired directory for the installation.

  3. Change directories to the desired directory for the installation.

  4. Extract the distribution into that directory.

  5. Change the permissions on the installation directory tree.

In the following example, ttuser1 creates a full installation into the directory fullinstall_installeronly from a distribution file in /swdir/TimesTen/ttinstallers. This installation is accessible to ttuser1 only.

% 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

The top level directory of the installed files is of the form tt18.1.4.1.0.

For example, under the installation directory:

dr-x------ 19 ttuser1 timesten 4096 Jun  2 22:07 tt18.1.4.1.0

Contents of tt18.1.4.1.0 includes such files as:

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

Only ttuser1 has access to this instance.

Verify an installation on Linux/UNIX

To verify the installation, run the ttInstallationCheck utility. In addition, you can review the installation directory and subdirectories.

The ttInstallationCheck utility

The ttInstallationCheck utility, located in the installation_dir/tt18.1.4.1.0/bin directory, verifies the success or failure of the installation. This utility generates an error if the checksum value for the installation differs from the original checksum value. Checksum values are different if there are any of these changes to the installation directory or files:

  • Contents of a file

  • Name of a file

  • Addition of a file to a directory

  • Removal of a file from a directory

  • Changes to the permissions of a file or directory

In this example, the installation is verified:

% installation_dir/tt18.1.4.1.0/bin/ttInstallationCheck
This installation has been verified.

In this example, permissions on a file were changed, and ttInstallationCheck generates an error:

% installation_dir/tt18.1.4.1.0/bin/ttInstallationCheck
Cannot validate the installation in /installation_dir/tt18.1.4.1.0.

See "ttInstallationCheck" in the Oracle TimesTen In-Memory Database Reference for detailed information on the ttInstallationCheck utility.

The installation directory and subdirectories

A TimesTen full installation includes these subdirectories located under the top-level installation_dir/tt18.1.4.1.0 directory (Not all of the subdirectories are included in this list).

  • 3rdparty: Includes resources for:

    • Apache ZooKeeper for TimesTen Scaleout (Unused by TimesTen Classic)

    • Java Message Service (JMS)

  • bin: TimesTen utilities and executables

  • grid: Files and resources for TimesTen Scaleout (Unused by TimesTen Classic)

  • include: TimesTen include files, among them timesten.h (for TimesTen ODBC features) and tt_errCode.h (for information about TimesTen error codes)

  • kubernetes: The directory containing the operator.zip file needed for the TimesTen Kubernetes Operator. See the Oracle TimesTen In-Memory Database Kubernetes Operator User's Guide for information on the TimesTen Kubernetes Operator.

  • lib: TimesTen libraries

  • plsql: Files and resources for TimesTen PL/SQL

  • ttoracle_home: Oracle Database Instant Client files and resources, for OCI, Pro*C/C++, and ODP.NET

Creating an instance on Linux/UNIX: Basics

This section covers the scenarios for creating instances. You run the ttInstanceCreate utility, located in the installation_dir/tt18.1.4.1.0/bin directory, to create either full instances (client and server) or client-only instances.

Note:

  • Only the user who unpacked the distribution (the creator of the installation) can create an instance from the installation.

  • This user must be a member of the TimesTen users group.

  • This user creates the instance by running the ttInstanceCreate utility.

  • After creating the instance, this user becomes the instance administrator of the instance.

  • This user is the only user that can be the instance administrator of this instance and all other instances associated with the installation.

The ttInstanceCreate utility

Run the ttInstanceCreate utility, located in the installation_dir/tt18.1.4.1.0/bin directory, to create full and client-only instances. You can specify options for the utility:

  • On the command line

  • In a file

  • Interactively as the utility runs

These subsections provide details for creating a TimesTen instance:

Create a TimesTen full instance

This example uses the ttInstanceCreate utility to create a full instance. No options are specified on the command line.

Example 2-1 ttInstanceCreate: Create the full instance interactively

This example illustrates how to run the ttInstanceCreate utility interactively to create a full instance. First navigate to the installation_dir/tt18.1.4.1.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.

% 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.

Create a TimesTen client instance

A TimesTen client instance can be used to connect to a database in either TimesTen Scaleout or in TimesTen Classic.

This section provides an example of creating a client instance. See Chapter 4, "Client-only Installations and Instances" for detailed information about client-only installations and instance, including multiple examples.

Example 2-2 ttInstanceCreate -clientonly: Create a client instance

Navigate to the installation_dir/tt18.1.4.1.0/bin area and run the ttInstanceCreate utility, specifying the -clientonly option. User input is shown in bold.

% 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'

Review the instance home directory and subdirectories

You can review the instance home directory and subdirectories for informational purposes. When you create an instance, each instance includes these subdirectories under $TIMESTEN_HOME (Not all of the subdirectories are included in this list):

  • bin: TimesTen utilities and executables tailored and specific to the instance

    This includes ttenv.sh (or ttenv.csh), which sets environment variables appropriately for the TimesTen environment for your session, and setuproot.sh, which can be run as root to cause data instances to be automatically started whenever the operating system reboots.

    Note that ttenv also puts the bin directory in your path.

  • conf: Contains the timesten.conf file, which is the TimesTen instance configuration file

  • diag: Diagnostic output, including the daemon log and error log

  • info: Working directory of the TimesTen daemon, containing persistent state about the TimesTen instance

  • install: Symbolic link referencing the installation associated with this instance.

  • plsql: Contains this subdirectory:

    • utl_file_dir: The only directory that can be read from or written to by PL/SQL blocks using the UTL_FILE package

  • startup: Contains a script that can be added to /etc/init.d to cause the instance to be automatically started at system startup and stopped at system shutdown.

Note:

A client-only instance does not have a startup directory.

Creating an instance on Linux/UNIX: Additional features

The previous section covered the basics of creating a TimesTen full or client instance using the ttInstanceCreate command line. This section discusses additional features and modes of operation. In these cases, you run the ttInstanceCreate utility from the installation_dir/tt18.1.4.1.0/bin directory. (The exception is Start an instance automatically at system startup, in which you do not run ttInstanceCreate.)

Create an instance by specifying options on the command line

This example runs the ttInstanceCreate utility and specifies the name, the location, and the daemon port number on the command line. (The name of the directory specified in the -location option must exist prior to running the ttInstanceCreate utility.) See "ttInstanceCreate" in the Oracle TimesTen In-Memory Database Reference for the supported options.

Example 2-3 ttInstanceCreate: Specify options on command line

% 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'

Create an instance interactively with the -record option

When creating an instance interactively, you can use the -record option to record the interactive prompts and responses into a batch file, which you can then use as a template for creating additional instances in batch mode. See "Create an instance from information provided in a batch file" for details.

Example 2-4 ttInstanceCreate: Record option

% installation_dir/tt18.1.4.1.0/bin/ttInstanceCreate -record 
/swdir/TimesTen/ttinstances/instancecreatebatch

The batch file that is created, instancecreatebatch, contains this input for 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

Create an instance from information provided in a batch file

You can use the ttInstanceCreate -batch option to use a batch file with instructions for creation of an instance.

Here is a sample batch file. You created such a file by running ttInstanceCreate with the -record option. See "Create an instance interactively with the -record option" for information.

Example 2-5 ttInstanceCreate: Batch file

The example first uses a sample batch file that was created with the -record option. It then uses this sample batch file (instancecreatebatch) to create the instance.

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

Then to create the instance:

% installation_dir/tt18.1.4.1.0/bin/ttInstanceCreate -batch /swdir/TimesTen/ttinstances/instancecreatebatch

This results in the following output from 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.

Create an instance interactively for Oracle Clusterware

You can run the ttInstanceCreate utility interactively to create an instance and enable TimesTen Replication with Oracle Clusterware.

When prompted for the path to the Oracle Clusterware installation, you can either provide it or skip it. If you skip it, you can specify the path later using the ttInstanceModify -crs option. See "Change the Oracle Clusterware configuration for an instance" for information.

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 18.3.0, you could substitute, 18.3.0, such that the path would be /u01/app/18.3.0/grid).

There must be a valid Oracle Clusterware installation in the specified directory.

In this example, either the values entered or the defaults chosen are shown in bold.

Example 2-6 ttInstanceCreate: Illustrate 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.

Note:

The Oracle Clusterware installation was detected by TimesTen. The location merely had to be confirmed, not entered.

Start an instance automatically at system startup

The ttInstanceCreate utility creates a set of scripts that can be added to the /etc/init.d directory so that the TimesTen daemon for the instance starts automatically each time the system boots and shuts down automatically each time the system shuts down.

To accomplish this, the root user must run the TimesTen setuproot script, located in the timesten_home/bin directory, with the -install option.

Recall that there is information about this in the ttInstanceCreate output when it creates an instance. For example, for an instance named 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.

The setuproot command operates according to the current setting of the TIMESTEN_HOME environment variable, which indicates the instance home directory.

Example 2-7 ttInstanceCreate: Start an instance automatically at system startup

In this example, timesten_home/bin is the current directory of the root user:

# 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

Before you destroy the instance, root should run 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

Notes:

If you do not run setuproot -uninstall before you destroy the instance, you must manually delete the files that were placed by setuproot -install.

Modifying an instance on Linux/UNIX

These sections discuss how to modify instances:

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 for tnsnames.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.

Example 2-8 ttInstanceModify: Run interactively

This example sets a new daemon port and server port. The values entered, or defaults chosen, are shown in bold:

% $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.

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

This example illustrates how to change the daemon port for an instance.

Example 2-9 ttInstanceModify: Modify the port number for the full 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=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

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=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

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.

Example 2-10 ttInstanceModify: Set or change the tnsnames.ora path

This example shows use of the option, where 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

After creating an instance, you can 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.

Example 2-11 ttInstanceModify: Change the Oracle clusterware configuration

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 18.3.0, you could substitute, 18.3.0, such that the path would be /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.

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 11.2.2 to 18.1).

Example 2-12 ttInstanceModify: Associate an instance with a different installation

The 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/tt18.1.3.5.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/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

Now run $TIMESTEN_HOME/bin/ttInstanceModify -install to associate the ttuser1instance instance with the new installation (/swdir/TimesTen/ttinstallations/ttinstalllatest/tt18.1.4.1.0, in this example).

% $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

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/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

Destroying an instance on Linux/UNIX

These sections discuss how to destroy an instance using the ttInstanceDestroy utility:

The ttInstanceDestroy utility

The ttInstanceDestroy utility destroys an existing instance. The instance that will be destroyed is based on the current setting of the TIMESTEN_HOME environment variable, which indicates the instance home directory. Run the ttInstanceDestroy utility that is located in the bin directory of the associated installation. (For example, installation_dir/tt18.1.4.1.0/bin.)

Only the instance administrator (the user who created the instance) can destroy the instance.

Note:

There can be no existing connections to databases associated with the instance you are destroying.

Run the ttInstanceDestroy utility with the -help option to list the available options. See "ttInstanceDestroy" in Oracle TimesTen In-Memory Database Reference for detailed descriptions.

Note:

The -force option completes the operation without prompting for confirmation.

The ttInstanceDestroy utility completes these steps:

  • Provides a reminder that if the TimesTen startup scripts for the instance were installed (by root), then they should be uninstalled (also by root) before the instance is destroyed.

    This refers to the setuproot -install and setuproot -uninstall commands. See "Start an instance automatically at system startup" for information.

  • Asks for confirmation to destroy the instance (unless -force is specified).

  • Frees up the ports assigned to the instance.

Destroy an instance from information provided interactively

Use the ttInstanceDestroy utility to destroy the instance interactively. Run the utility from the installation_dir/tt18.1.4.1.0/bin directory (the installation directory for the instance). Recall that the instance home directory (timesten_home) contains a subdirectory (/install) that is a symbolic link to the top-level directory of the instance's associated installation. See "Instance home" for information.

Example 2-13 ttInstanceDestroy: Destroy an instance

% 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.

Copying an installation on Linux/UNIX

You can copy an installation to another host by copying the installation ZIP file from the source host to the target host and unzip it on that host. You can also use any suitable mechanism, such as the ZIP utility, to bundle an installation on the source host and then extract it into another location or onto another host. This might be useful, for example, if the original TimesTen distribution is not conveniently available. The copied installation is valid as long as the file permissions are maintained appropriately.

This example uses the ZIP utility to copy an installation between hosts:

  1. On the originating host, from the installation directory (the directory that the installation was extracted into), create a ZIP file containing the installation (the top-level tt18.1.4.1.0 directory and its contents).

    % zip my181410install.zip tt18.1.4.1.0
    
  2. Transport the ZIP file to the target host.

  3. On the target host, from the directory above the desired location of the installation, extract the ZIP file:

    % unzip my181410install.zip
    

    This will create the tt18.1.4.1.0 directory and extract the installation there.

On the target host, optionally run ttInstallationCheck to verify the new copy of the installation.

From the directory you copied the installation into:

% installation_dir/tt18.1.4.1.0/bin/ttInstallationCheck
This installation has been verified.

Deleting an installation on Linux/UNIX

This section describes how to delete an installation.

Uninstall TimesTen

To uninstall, the user who installed TimesTen (unzipped the distribution) performs these steps:

  1. Ensures that there are no Timesten instances, databases or important files located under the TimesTen installation.

  2. Ensures that no TimesTen instances use the installation. (There is no automated way to do this, as TimesTen does not maintain any inventory of TimesTen installations or instances.)

    If there are instances that use the installation, then before the installation is deleted, the instances must be either modified to point to a different installation or deleted. See "Associate an instance with a different installation (upgrade or downgrade)" for details.

  3. Grants write permission to the installation, such as through the chmod -R command. For example, from the installation directory where a TimesTen 18.1.4.1.0 installation was extracted:

    % chmod -R 750 installation_dir/tt18.1.4.1.0
    
  4. Deletes the tt18.1.4.1.0 directory and all files and subdirectories that it contains, such as through the rm -rf command. From the installation directory:

    % rm -rf installation_dir/tt18.1.4.1.0
    
  5. If the installation directory is empty, optionally deletes it.

Complete example for installing and uninstalling TimesTen Classic

The first three steps illustrate the installation process for a full installation and full instance. The remaining steps are optional and are provided for information.

  1. Create the full installation

  2. Create the full instance

  3. Source the environment variables

  4. Run the ttStatus utility

  5. Create and connect to the database

  6. Run ttStatus to show connections

  7. Modify the full instance

  8. Destroy the full instance

  9. Delete the installation

Create the full installation

This example creates a full installation from the timesten181410.server.linux8664.zip distribution.

The operating system user that you designated as the instance administrator first creates the installation by downloading the TimesTen distribution on the host that will contain the instance. For example, download timesten18.1.4.1.0.server.linux8664.zip.

This example then shows the steps to perform once the instance administrator downloads the distribution. See "Creating an installation on Linux/UNIX" for more information.

Example 2-14 Create a full installation

This example creates the installation1 installation directory and unzips the distribution into that directory.

% mkdir installation1
% cd installation1
% unzip /timesten181410.server.linux8664.zip
[...UNZIP OUTPUT...]

Create the full instance

Run the ttInstanceCreate utility interactively to create a full instance from the installation in /installation1. The /installation1 directory is referred to as /installation_dir. See "Creating an instance on Linux/UNIX: Basics" for information.

Example 2-15 ttInstanceCreate: Create the full instance interactively

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

% 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.

Source the environment variables

You must set the environment variables to make use of TimesTen. In particular, ensure TIMESTEN_HOME is set. See "Setting environment variables for TimesTen" for information.

Example 2-16 Source the environment variables for full instance

Navigate to the /bin area of the instance directory (instance home) and source the ttenv script. This example uses ttenv.csh.

% source /scratch/ttuser/fullinstance1/bin/ttenv.csh
[...ttenv.csh output...]

Run the Linux/UNIX printenv command to verify the TIMESTEN_HOME variable is set.

% printenv TIMESTEN_HOME
/scratch/ttuser/fullinstance1

Run the ttStatus utility

You can optionally run the ttStatus utility to verify the daemon is running. See "ttStatus" in the Oracle TimesTen In-Memory Database Reference for information on this utility.

Example 2-17 Run the ttStatus utility to verify the daemon is running for the instance

% 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

Create and connect to the database

This example first defines the database1 DSN in the $TIMESTEN_HOME/conf/sys.odbc.ini file. The example then uses the ttIsql utility to create and connect to database1. For information on DSNs, see "Specifying Data Source Names to identify TimesTen databases" in the Oracle TimesTen In-Memory Database Operations Guide.

Example 2-18 Create and connect to the database in the full instance

This example first uses the Linux vi editor to modify the $TIMESTEN_HOME/conf/sys.odbc.ini file to add the database1 DSN. Connection attributes are specified for the database1 DSN. See "Connection Attributes" in the Oracle TimesTen In-Memory Database Reference for information on the required and the optional connection attributes. The example then runs the ttIsql utility to create and connect to the database1 DSN. As a final step, the example runs a simple query.

% vi $TIMESTEN_HOME/conf/sys.odbc.ini

[database1]
DataStore=/disk1/databases/database1
LogDir=/disk2/logs
DatabaseCharacterSet=AL32UTF8
PermSize=1280
TempSize=640
LogBufMB=1024

After saving the sys.odbc.ini file and exiting from the vi editor, run the ttIsql utility to create the database and connect to the database1 DSN. (A database is created when the instance administrator first connects to the newly created 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)

Run a simple query.

Command> SELECT * FROM dual;
< X >
1 row found.

Run ttStatus to show connections

Run ttStatus again to show connections to the database1 database. See "ttStatus" in the Oracle TimesTen In-Memory Database Reference for information on this utility.

Example 2-19 Run ttStatus to show connections

% 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

Modify the full instance

This example runs the ttInstanceModify utility to modify the daemon port number. The instance that is modified is the one that $TIMESTEN_HOME references. Running this command:

  1. Prompts you for confirmation

  2. Stops the TimesTen daemon for the instance

  3. Edits the $TIMESTEN_HOME/conf/timesten.conf file with the updated information

  4. Starts the TimesTen daemon for the instance

See "Modifying an instance on Linux/UNIX" for details.

Example 2-20 Modify the port number for the full instance

This example first runs the Linux/UNIX echo command to display the instance that $TIMESTEN_HOME references and reviews the $TIMESTEN_HOME/conf/timesten.conf file to check the setting of the current port number. It then runs ttInstanceModify to change the port number to 6524. The example then reviews the $TIMESTEN_HOME/conf/timesten.conf file to ensure the port number has been changed. As a final step, the daemon is started.

% 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

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. See "Instance configuration file (timesten.conf)" for information on this file.

% 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

Restart the daemon

% ttDaemonAdmin -start -force
TimesTen Daemon (PID: 11635, port: 6524) startup OK.

Destroy the full instance

Use the ttInstanceDestroy utility interactively to destroy the instance. This example runs the utility without options. You must run this utility from the bin area of the installation directory. See "Destroying an instance on Linux/UNIX" for information.

Example 2-21 Destroy the full instance

% 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.

Delete the installation

See"Deleting an installation on Linux/UNIX" for details.

Installing Oracle Clusterware for use with TimesTen

To install Oracle Clusterware, see the Oracle Clusterware Administration and Deployment Guide in the Oracle Database documentation. Also see "Using Oracle Clusterware to Manage Active Standby Pairs" in the Oracle TimesTen In-Memory Database Replication Guide.

Follow these recommendations:

  • Create an NFS share to be used for both OCR and the voting disk. Specific NFS parameters are required so that the NFS share can be used as a voting disk.

  • Do not install in a shared Oracle home, as this does not allow rolling upgrades of Oracle Clusterware. Instead, each compute node should have its own installation of Clusterware.

  • Install Clusterware on each compute node. The path to the Clusterware installation must be the same on each compute node. Therefore, it is required to set up a directory structure that allows each compute node to use the same path to access its own Clusterware installation.

    • On the shared storage, a separate directory exists for each compute node:

      • For compute node 1, the directory is:

        /export/compute_node_1/general
        
      • For compute node 2, the directory is:

        /export/compute_node_2/general
        
      • For compute node n, the directory is:

        /export/compute_node_n/general
        
    • Use NFS mount to map the node specific directory to the same path on each compute node:

      • On host 1, do as follows.

        mkdir -p /swdir/oracle
        mount storage-server:/export/compute_node_1/general /swdir/oracle
        
      • On host 2, do as follows.

        mkdir -p /swdir/oracle
        mount storage-server:/export/compute_node_2/general /swdir/oracle
        
      • On host n, do as follows.

        mkdir -p /swdir/oracle
        mount storage-server:/export/compute_node_n/general /swdir/oracle
        
      • On each host, install Oracle Clusterware in /swdir/oracle/crs.