Oracle TimesTen In-Memory Database is a memory resident relational database management system that allows applications to access, capture or modify information faster than traditional database products.
This document will detail the installation steps for Oracle TimesTen In-Memory Database on Linux.
The following kernel parameter values are recommended minimums. Add the following to the
/etc/sysctl.conf and issue the
/sbin/sysctl –p command. Note if you already have one more of these parameters configured at a higher value, keep the higher value.
kernel.sem = 250 32000 100 128 kernel.shmmax=2147483648 net.ipv4.tcp_rmem=4096 4194304 4194304 net.ipv4.tcp_wmem=98304 4194304 4194304 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_max=4194304 net.ipv4.tcp_window_scaling=1 net.ipv4.ip_local_port_range="1024 65000"
TimesTen user and groups
By default access is restricted to the default group of the user installing the TimesTen instance. In order for other users to connect databases and memory structures they must be members of that group. During installation you can choose to make the instance world-accessible but that is not recommended.
[root@ora1 ~]# groupadd timesten [root@ora1 ~]#
TimesTen instance administrators group
[root@ora1 ~]# groupadd ttadmin [root@ora1 ~]#
TimesTen install user
[root@ora1 ~]# useradd -G ttadmin -g timesten orattadmin [root@ora1 ~]# id orattadmin uid=911(orattadmin) gid=903(timesten) groups=903(timesten),904(ttadmin) [root@ora1 ~]#
Create the instance registry
The instance registry contains information on the TimesTen instances on the server much like the
/etc/oraInst.loc and /etc/oratab files do for an Oracle database install. Below are the contents of the file instance_info file created after the install of TimesTen.
#SUM 21645 1 [ tt1121 ] Product=TimesTen188.8.131.52 InstallDir=/opt/TimesTen/tt1121 InstanceAdministrator=orattadmin DaemonHome=/opt/TimesTen/tt1121/info BitLevel=32 Component=Client/Server and DataManager TT_PORT=53384 [root@ora1 ~]# mkdir /etc/TimesTen [root@ora1 ~]# chgrp -R ttadmin /etc/TimesTen [root@ora1 ~]# chmod 770 /etc/TimesTen/ [root@ora1 ~]#
The installer will verify the existence and permissions of /etc/TimesTen and will fail if not present or the permissions are incorrect.
Create the install directory /opt/TimesTen
The default location to install TimesTen is $HOME/TimesTen. Since we are going to be installing the client along with the server components it does not make sense to install TimesTen is users HOME directory.
[root@ora1 ~]# mkdir –p /opt/TimesTen [root@ora1 ~]# chown -R orattadmin:timesten /opt/TimesTen/ [root@ora1 ~]#
As the user orattadmin user extract the TimeTen files and run the setup script setup.sh.
[orattadmin@ora1 ~]$ tar -xzvf timesten112150.linux86.tar.tar linux86/ linux86/uninst.sh linux86/3rdparty/ linux86/3rdparty/jms-1_1-fr-apidocs.tar.bz2 linux86/3rdparty/ant-1.6.2-bin.tar.bz2 linux86/behaviorchanges.txt linux86/install.pl linux86/README.html linux86/doc/ linux86/doc/doc.zip linux86/LINUX86/ linux86/LINUX86/ttserver.tar.bz2 linux86/LINUX86/perl linux86/LINUX86/unzip linux86/LINUX86/ttclient.tar.bz2 linux86/LINUX86/bzip2 linux86/LINUX86/timesten.tar.bz2 linux86/LINUX86/manifest linux86/LINUX86/common.tar.bz2 linux86/LINUX86/ttpatchinst linux86/setup.sh [orattadmin@ora1 linux86]$ ./setup.sh
The first option presented is the instance name.
NOTE: Each TimesTen installation is identified by a unique instance name. The instance name must be a non-null alphanumeric string, not longer than 255 characters. Please choose an instance name for this installation? [ tt1121 ] Instance name will be 'tt1121'. Is this correct? [ yes ] yes
You can install the TimesTen Client, Server and Data Manger. The TimesTen Client Only install is used when you want to be able to access a TimesTen server on another installation. Use the Data Manager only install to install the TimesTen Data Manager Locally. The Client/Server and Data Manager install option installs all components of TimesTen.
Of the three components:  Client/Server and Data Manager  Data Manager Only  Client Only Which would you like to install? [ 1 ] 1
By default TimesTen is installed in $HOME/TimesTen. The installer gives the option to install into another directory. For this installation we have chosen /opt/TimesTen
Of the following options :  /home/orattadmin  /home/orattadmin/linux86  Specify a location [q] Quit the installation Where would you like to install the tt1121 instance of TimesTen? [ 1 ] 3 Please specify a directory to install TimesTen? [ /home/orattadmin ] /opt/TimesTen Where would you like to create the daemon home directory? [ /opt/TimesTen/tt1121/info ]
You can choose the location in which logs will be written. The default location is
The daemon logs will be located in /opt/TimesTen/tt1121/info Would you like to specify a different location for the daemon logs? [ no ] Installing into /opt/TimesTen/tt1121 ... Uncompressing ...
The default port number for the TimesTen daemon ins 53384 for 32bit systems and 53389 for 64bit systems. Note the notices concerning Clusterware and replication below.
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 53384. Do you want to use the default port number for the TimesTen daemon? [ yes ] The daemon will run on the default port number (53384).
We created the group timesten earlier so we could restrict access to TimesTen databases files and shared memory to this group.
NOTE: For security, we recommend that you restrict access to the TimesTen installation to members of a single OS group. Only members of that OS group will be allowed to perform direct mode connections to TimesTen, and only members of that OS group will be allowed to perform operations that access TimesTen data stores, TimesTen files and shared memory. The OS group defaults to the primary group of the instance administrator. You can default to this group, choose another OS group or you can make this instance world-accessible. If you choose to make this instance world-accessible, all database files and shared memory are readable and writable by all users. Restrict access to the the TimesTen installation to the group 'timesten'? [ yes ]
Next we are given the option of enabling PL/SQL in TimesTen. PL/SQL can be enabled after install using the
NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries. Would you like to enable PL/SQL for this instance? [ yes ]
The path used for the TNS_ADMIN can be set during the install or later with ttmodinstall.
In order to use the 'In-Memory 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/ttModInstall. Please enter a value for TNS_ADMIN (s=skip)? [ ] /u01/app/oracle/product/11.2.0/dbhome_1/network/admin TNS_ADMIN will be set to /u01/app/oracle/product/11.2.0/dbhome_1/network/admin You can change TNS_ADMIN later by running <install_dir>/bin/ttmodinstall. NOTE: It appears that you are running version 4.1 of the g++ compiler. TimesTen ships with multiple sets of client libraries and server binaries : one built for compatibility with g++ 3.4.6 and one with g++ 4.1.0. The installer has created links to the 4.1.0 library in the <install_dir>/lib directory and to the 4.1.0 server binary in the <install_dir>/bin directory. If you want to use a different compiler, please modify the links to point to the desired library and server binary. Installing server components ... What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53385 ]
You have the option of installing the QuickStart guide and the TimesTen documentation. The default answer is No. The QuickStart includes a sample database and demonstration programs.
Do you want to install QuickStart and the TimesTen Documentation? [ no ] yes Where would you like to install the quickstart and doc directories (s=skip)? [ /opt/TimesTen/tt1121 ] The TimesTen Quickstart applications can take up to 64 Mbytes of disk space. Depending on how your system is configured, you may not want to create the QuickStart DemoDataStore directory in the default location, /opt/TimesTen/tt1121/info/DemoDataStore Where would you like to create the DemoDataStore directory? [ /opt/TimesTen/tt1121/info ] Creating /opt/TimesTen/tt1121/info/DemoDataStore ... Installing client components ... Would you like to use TimesTen Replication with Oracle Clusterware? [ no ]
Below are notes on how configure startup/shutdown scripts to start and stop the TimesTen instance on server start/stop.
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed. Run the 'setuproot' script : cd /opt/TimesTen/tt1121/bin ./setuproot -install This will move the TimesTen startup script into its appropriate location. The startup script is currently located here : '/opt/TimesTen/tt1121/startup/tt_tt1121'.
This is a reminder of where the Quick Start and release notes can be found.
The Quickstart home page can be accessed here : '/opt/TimesTen/tt1121/quickstart/index.html' The 184.108.40.206 Release Notes are located here : '/opt/TimesTen/tt1121/README.html' Starting the daemon ... TimesTen Daemon startup OK. End of TimesTen installation. [orattadmin@ora1 linux86]$
Now that we have installed TimesTen and have a running instance we can now connect to the sample database created during the installation using ttisql.
[orattadmin@ora1 info]$ ttisql Copyright (c) 1996-2009, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. Command> connect "dsn=sampledb_1121"; Connection successful: DSN=sampledb_1121;UID=orattadmin;DataStore=/opt/TimesTen/tt1121/info/DemoDataStore/sampledb_1121;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/opt/TimesTen/tt1121/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0; (Default setting AutoCommit=1) Command>