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 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.
Complete Example for Installing and Uninstalling TimesTen Classic
This example provides the procedure for creating an installation and for working with instances. This example assumes you have chosen the System V init mechanism. See About Creating an Instance on Linux/UNIX for details on the System V init mechanism.
Create the Full Installation
This example creates a full installation from the timesten2211250.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 timesten2211250.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.
The example creates the installation1
installation directory and unzips the distribution into that directory.
% mkdir installation1 % cd installation1 % unzip /timesten2211250.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.
This example illustrates how to create a 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.
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 thettInstanceCreate
output.
% installation_dir
/tt22.1.1.25.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? [ tt221 ] 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 cache features in any TimesTen databases created within this instance, you must set a value for the TNS_ADMIN environment variable. It can be left blank, and a value can be supplied later using <install_dir>/bin/ttInstanceModify. Please enter a value for TNS_ADMIN (s=skip)? [ ] s What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 6625 ] Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] 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 2211250 Release Notes are located here : '/installation_dir
/tt22.1.1.25.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.
This example illustrates how to source the environment variables. 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
Configure Linux Kernel Parameters
After you create the full instance and source the environment variables, you must configure Linux kernel parameters. See "Configure Linux Kernel Parameters" for details.
Run the ttStatus Utility
You can optionally run the ttStatus
utility to verify that the TimesTen daemon is running. See ttStatus in the Oracle TimesTen In-Memory Database
Reference for information on this utility.
This example illustrates how to use the ttStatus
utility to verify that the daemon is running.
% ttStatus TimesTen status report... Daemon pid 20396 port 6624 instance database1 TimesTen server pid 20403 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Accessible by group g900 End of report
Create and Connect to the Database
This example illustrates how to create and connect to the database. It uses the Linux vi
editor to modify the $TIMESTEN_HOME
/conf/sys.odbc.ini
file to add the database1
DSN and specify connection attributes for the DSN. 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.
For information on DSNs, see Specifying Data Source Names to Identify TimesTen Databases in the Oracle TimesTen In-Memory Database Operations Guide. For information on connection attributes, see Connection Attributes in the Oracle TimesTen In-Memory Database Reference.
% 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, 2024, 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
You can run ttStatus
to show connections to the database1
database. See ttStatus in the Oracle TimesTen In-Memory Database
Reference for information on this utility.
This example runs the ttStatus
utility to show the connections to the database.
% ttStatus TimesTen status report... Daemon pid 20396 port 6624 instance database1 TimesTen server pid 20403 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Data store /databases/database1 Installation will expire after... Daemon pid 20396 port 6624 instance database1 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 database1 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:
- Prompts you for confirmation
- Stops the TimesTen daemon for the instance
- Edits the
$TIMESTEN_HOME/conf/timesten.conf
file with the updated information - Starts the TimesTen daemon for the instance
See "Modifying an Instance on Linux/UNIX" for details.
This example 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=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. 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=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 -force TimesTen Daemon (PID: 11635, port: 6524) startup OK.
Destroy the Full Instance
You 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.
% installation_dir/tt22.1.1.25.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
You can delete the installation. See "Deleting an Installation on Linux/UNIX" for details.