1 TimesTen Installation

This chapter contains configuration information that you need to review before installing TimesTen on your system, in the sections:

You can find a description of the procedures to install, configure and uninstall TimesTen:

This chapter also contains information to help you further configure TimesTen after installation, work with the demo applications, migrate databases to this release and view the TimesTen documentation:

Finally, this chapter contains information that helps you troubleshoot problems that may arise during the installation process:

Installation instances

On UNIX, you can install multiple instances of TimesTen. On Windows, you can install only one instance of any major TimesTen release, where a major release is indicated by the first three parts of the release number, such as 11.2.1. For example, you can install both 11.2.1.9.0 and 11.2.2.2.0 on the same Windows computer, but you cannot install both 11.2.1.0.0 and 11.2.1.9.0.

You can retrieve information about the TimesTen instance name, release number and port settings using the ttVersion utility.

The TimesTen product can be installed onto local, private disk storage, such that each computer has a private copy of the entire TimesTen installation. Installing a single copy of the TimesTen software onto a shared storage location and then sharing this copy amongst several computers is not a supported configuration.

The following sections provide more information about the TimesTen installation instance:

Instance naming

The instance name is the key used to access all necessary information about that particular installation of TimesTen.

On Windows, the TimesTen installation scripts do not prompt you to supply an instance name. The instance name on Windows is tt1121_32 on 32-bit systems and tt1121_64 on 64-bit systems.

On UNIX systems, by default, the instance name for this release is tt1121_32 on 32-bit systems and tt1121_64 on 64-bit systems. The default location is the TimesTen directory in the home directory of the user installing TimesTen. The instance name is case-insensitive, must be at least one alphanumeric character and up to 255 characters. The name can include underscores ( _ ) or periods (.), but no other special characters.

If you would like to install a second instance of the same TimesTen release, you must supply a unique instance name and port number. The TimesTen installation script can detect if an instance of the particular release of TimesTen exists on the computer and prompts you for a new instance name and port number for the main TimesTen daemon.

Instance port numbers

Any time that you install multiple instances of TimesTen on the same computer, specify a unique TCP/IP port number for each TimesTen daemon during the install.

However, all TimesTen databases that replicate to each other must use the same daemon port number, except when the -remoteDaemonPort option is specified in duplicate operations. This port number is set at install time. You can use the ttVersion utility to verify the port number of your installation of TimesTen.

On UNIX systems, the default port on which the TimesTen main daemon listens is 53384 for 32-bit installations and 53388 for 64-bit applications.

On UNIX systems, the default port on which the TimesTen Server daemon listens is 53385 for 32-bit installations and 53389 for 64-bit applications.

The port on which the TimesTen cache agent listens is determined by the operating system and cannot be configured separately.

Choosing the appropriate TimesTen components

TimesTen allows you to select the components of TimesTen that you want to install.

Components available on UNIX

On UNIX, you can install the following components. In addition, the installation script prompts you to install the TimesTen Quick Start and documentation.

Type Description
TimesTen Client Installs the TimesTen Client only. No other TimesTen components are installed on the computer. Use this installation to allow the TimesTen Client to access the TimesTen Server from another installation.
TimesTen Data Manager Installs the TimesTen Data Manager only. Use this installation to run the TimesTen Data Manager locally.
TimesTen Client, Server and Data Manager Installs the TimesTen Data Manager, Client and Server. Use this installation to perform the following:
  • Allow a Client from another installation to access the TimesTen Server.

  • Allow the TimesTen Client to access the either this TimesTen Server installation or another TimesTen Server installation.

  • Allow applications to access the TimesTen Data Manager locally.


If you have installed TimesTen and you would like to add or remove components, you must run the installer and select the option "Upgrade an existing instance," and then select the instance which you would like to change.

Components available on Windows

On Windows you can install one or more of the following components by checking the appropriate boxes during installation.

Type Description
TimesTen Data Manager Installs the TimesTen Data Manager. Use this installation to run the TimesTen Data Manager locally.
TimesTen Data Manager Debug Libraries Installs the TimesTen Data Manager debug libraries. Used particularly during the development phase to allow you to debug problems that may occur. By default, the debug libraries are not installed.
TimesTen Server Installs the TimesTen Data Server. Use this installation to:
  • Allow a Client on another computer to access the TimesTen Server on this computer.

  • Allow the TimesTen Clients on other computers to access the TimesTen Server on this computer.

TimesTen Client Installs the TimesTen Client. Use this installation to allow the TimesTen Client to access the TimesTen Server on a remote computer.
TimesTen Quick Start Installs the TimesTen Quick Start, which includes demos.
TimesTen Documentation Installs the TimesTen Documentation Library.

Installation prerequisites

Before installing TimesTen, make sure the appropriate requirements are met for your operating system.

On both UNIX and Windows platforms where JDBC is supported you must have the appropriate version of the JDK installed on your computer to use JDBC.

For improved JDBC performance on TimesTen, when using a XenNet virtual device, configure the LargeSendOffload parameter to FALSE. By default, the LargeSendOffload parameter is set to TRUE for the XenNet virtual device. This parameter can be modified either in the Windows registry or in the Advanced tab of the XenNet properties dialog.

This section also discusses the platform-specific prerequisites:

General UNIX requirements

In general, on UNIX systems, you must configure the following:

  • The number of semaphores

  • Allowable shared memory

In addition, you may need to perform the following:

  • Ensure you have the latest operating system patches

  • Configure your file system to allow large files

  • Configure your Java environment

  • Configure your Client/Server environment

  • Configure network settings for replication

The following sections outline some of the changes that you may need to make on any UNIX system. In addition, some of these sections describe changes required for each specific UNIX platform on which TimesTen is supported.

File system options

On the Veritas file system, if you plan to have TimesTen applications that use DurableCommits=1, use the mincache=direct and convosync=direct options to ensure durability.

Options that convert dsync into sync or fdatasync into sync or those that treat all writes such that the file is opened with O_SYNC should be avoided.

On the Veritas file system you should also set the options discovered_direct_iosz and max_direct_iosz to 3 MB.

The absence of these direct I/O settings could result in poor file system performance for TimesTen operations.

To set these options, log in as root and use:

# /usr/sbin/vxtunefs -o discovered_direct_iosz=3145728
# /usr/sbin/vxtunefs -o max_direct_iosz=3145728

Using vxtunefs online option requires Advanced VxFS.

Semaphores

TimesTen consumes one SEMMNI per active database, plus one additional SEMMNI per TimesTen instance where Client/Server communication is done through shared memory. For each active database, TimesTen consumes 36 SEMMSL, plus one SEMMSL for each connection. Therefore, TimesTen uses 100 SEMMSL if the Connections attribute is set to the default value, and one additional SEMMSL for each connection above the default.

Note:

You can use the following formula as a guide, although in practice, SEMMNS and SEMMNU can be much less than SEMMNI * SEMMSL because not every program in the system needs semaphores.

SEMMNS=SEMMNU = (SEMMNI * SEMMSL)

Java

If you are running JDBC, install the latest JDK and any vendor required patches. Refer to the website of the JDK provider for the patches you may need.

To run 64-bit Java applications on all systems except AIX systems, if you are using the Sun 64-bit JVM, you may need to pass the -d64 option on the java command line.

Other Client/Server settings

The maximum number of concurrent IPC connections to a TimesTen Server allowed by TimesTen is 9,999. However, system limits can take precedence on the number of connections to a single DSN. Client/Server users can increase the file descriptor limit to support a large number of connections and processes.

For example, on Solaris, you may change the file descriptor limit to have a maximum of 1024 simultaneous server connections by adding the following line to /etc/system:

set rlim_fd_max = 1080

In this case, 1080 is greater than the number of anticipated client/server connections and allows for a few extra connections.

AIX prerequisites

On AIX, before installation, set the kernel parameter sb_max to a minimum of 512 KB if you plan to use replication. The replication agent requests TCP send and receive buffers of a minimum size of 512 KB. The value may be changed using the following command:

# /usr/sbin/no -p -o sb_max=524288

To query the value, use the following command.

# /usr/sbin/no -o sb_max

Large pages

On AIX 5.3 systems with the required patch levels, TimesTen can use large pages. Using large pages locks the shared segment into memory so it cannot be paged. Users must have the CAP_BYPASS_RAC_VMM and CAP_PROPAGATE capabilities. The capabilities are granted by a root user by editing the /etc/security/user file or for locally authenticated users with:

# chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE user_id

The system default is to not have any memory allocated to the large page physical memory pool. You can use the vmo command to configure the size of the large page physical memory pool. The following example allocates 4 GB to the large page physical memory pool:

# vmo -r -o lgpg_regions=256 -o lgpg_size=16777216

To use large pages for shared memory, you must enable the SHM_PIN shmget() system call with the following command, which persists across system reboots:

# vmo -p -o v_pinshm=1 

Asynchronous I/O

If you plan to use PL/SQL, AIX requires the AIO (Asynchronous Input Output) device drivers be enabled on the computer where the TimesTen software is installed. To manually enable asynchronous I/O:

  1. Start smitty aio.

  2. Run Change/Show Characteristics of Asynchronous I/O.

  3. Set the STATE to be configured at system restart as available.

Note:

This procedure does not require a system restart.

HP-UX prerequisites

On HP-UX, before installation, the following sections describe steps you can perform to improve the performance of TimesTen on your system:

Semaphores

On HP-UX systems, to connect to more than two databases simultaneously, you must increase the value of the kernel parameter semmns.

To view existing kernel parameter settings, log in as user root.

For HP-UX 11iv2, use the command:

# /usr/sbin/kctune

Shared memory

On HP-UX systems, you also must increase the value of the parameter shmmax. To make these changes, log in as user root and use the kmtune command, kctune commands or run the HP System Administration Manager to see existing kernel parameter settings.

To use the HP System Administration Manager, perform the following:

  1. Execute the HP System Administration Manager, as follows:

    # /usr/sbin/sam
    
  2. Double-click Kernel Configuration, then double-click Configurable Parameters.

  3. Scroll down the list of parameters to semmns and change its value to a minimum of 4096 or greater.

  4. For HP-UX 11i systems, also scroll down the list of parameters to shmmax and change its value to a maximum of 0x40000000.

    Note:

    For 32-bit systems, the value 0x40000000 (a 4 followed by seven zeroes) indicates that the largest shared memory segment that can be created is 1024 MB. The size of the shared memory segment required for a shared database is larger than the requested database size. Set this value high enough to support the largest shared memory segment needed.
  5. Recompile the kernel. Choose Create a New Kernel from the Actions menu.

  6. Reboot the system.

Large databases

On 64-bit HP-UX systems, if you expect to have databases that are larger than 2 GB, you must enable large files. By default, HP-UX supports files that are no greater than 2 GB.

To enable large files, create the file systems using the newfs command with the -o largefiles option or alter the file systems using the fsadm command with the -o largefiles option. The following fsadm command alters the file system to enable large files:

% /usr/sbin/fsadm -F fstype -o largefiles device_name

For example:

% /usr/sbin/fsadm -F hfs -o largefiles /dev/vg02/rlvol1

Replication

For replication, TCP send and receive buffers should be increased to a minimum of 512 KB. You may need to embed the following commands into a script that can be run at system boot time:

For HP-UX 11.23 (11iv2)

# /usr/bin/ndd -set /dev/tcp tcp_xmit_hiwater_lfp 524288
# /usr/bin/ndd -set /dev/tcp tcp_recv_hiwater_lfp 524288
# /usr/bin/ndd -set /dev/tcp tcp_xmit_hiwater_lnp 524288
# /usr/bin/ndd -set /dev/tcp tcp_recv_hiwater_lnp 524288
# /usr/bin/ndd -set /dev/tcp tcp_xmit_hiwater_max 524288
# /usr/bin/ndd -set /dev/tcp tcp_recv_hiwater_max 524288

Linux prerequisites

For Linux, TimesTen has been tested with Asianux 3.0, Red Hat Enterprise Linux 4 and 5, the MontaVista Linux Carrier Grade Edition Release 5.0 and 6.0 and SuSE LINUX Enterprise Server 10 minimal configurations. The C development tools are required if you intend to do native development on the computer.

Note:

TimesTen does not support SELinux. When installing Linux for use with TimesTen, make sure that the SELinux option is disabled.

On Linux, before installation, the following sections describe steps you can perform to improve the performance of TimesTen on your system:

Large pages

Large pages can be enabled only if the running Linux kernel supports large pages (also called "huge pages" in the Linux community).

If large pages are supported by the kernel, there should be special files in the /proc directory that indicate the number and size of the large pages.

On Linux 2.4.x systems, the /proc/sys/vm/hugetlb_pool indicates the total size of the large pages.

On 2.6.x systems, the /proc/sys/vm/nr_hugepages file indicates the total number of large pages.

You can change the total number and size of the large pages by changing the contents of those files. For example, you can use:

echo 32 > /proc/sys/vm/nr_hugepages

To see the number and size of the allocated large pages:

cat /proc/meminfo

The following output from this command would indicate that you have 16 large pages, each of the size 256 MB for a total of 4 GB:

HugePages_Total: 16
HugePages_Free: 16
Hugepagesize: 262144 kB

Note:

Since large pages must be allocated on a contiguous memory space, the actual large page size allocated may be smaller than requested. Also, the large page size itself is not configurable. The value of Hugepagesize in /proc/meminfo indicates the system's fixed large page size.

If PAM (Pluggable Authentication Modules) is enabled, you may need to modify the /etc/security/limits.conf file to increase the memlock limit. By default, the limit is 32 KB.

You must also set /proc/sys/vm/hugetlb_shm_group to the group ID of the user that is running the main TimesTen daemon.

The operating system now is ready for the large page support. To enable this feature on TimesTen, simply set -linuxLargePageAlignment Size_in_MB in the daemon options file (ttendaemon.options).

You should specify the large page alignment size in MB, which is the Hugepagesize value in /proc/meminfo.

Once you set up large pages, TimesTen uses as many large pages as possible. If there are not enough pages, TimesTen uses the normal pages after consuming all available large pages.

When TimesTen uses large pages, the HugePages_Free file in /proc/meminfo changes.

Semaphores

To view existing kernel parameter settings, log in as root and use:

# /sbin/sysctl -a

On Linux systems, the first parameter of kernel.sem must be a minimum of 128. TimesTen uses 36 SEMMSL, plus one for each active connection. You must increase the kernel parameter settings if you plan to use a large number of connections.

For example, if you plan to use 200 connections, we recommend that you add the following line to the /etc/sysctl.conf file:

kernel.sem = 250 32000 100 128

The first parameter is the maximum number of semaphores per array (SEMMSL), the second parameter is maximum semaphores systemwide (SEMMNS), the third parameter is maximum operations per semop call (SEMOPM), and the fourth parameter is maximum arrays (SEMNI).

Then reboot or run the following command:

# /sbin/sysctl -p

Shared memory

To increase the shared memory size to 2048 MB, log in as root and edit the /etc/sysctl.conf file by adding the line:

kernel.shmmax=2147483648

If your configuration is greater than 8 GB, you should also increase the value of the shmall parameter. The value is in KB and should be equal to ceil(SHMMAX/PAGE_SIZE). Page size is generally 4K on x86 systems and 16K on Itanium. For example, for a 64 GB database on Itanium, you should specify the following parameters values:

kernel.shmmax=68719476736
kernel.shmall=4194304

To increase the shared memory size without rebooting:

% /sbin/sysctl -w kernel.shmmax=2147483648

If you have your kernel configured with the /proc file system and it is mounted, then the current maximum shared memory segment size (in bytes) can be viewed by the following command:

% cat /proc/sys/kernel/shmmax

You can also change this value by the following command:

% echo 2147483648 > /proc/sys/kernel/shmmax

This command has the same effect as the sysctl command.

IPC Client/Server

On Red Hat Linux systems, to enable more than six ShmIpc Client/Server connections, add the following line to the /etc/sysctl.conf file:

kernel.sem = 250 32000 100 128

Then reboot or run this command:

# /sbin/sysctl -p

Replication

For replication, TCP send and receive buffers should be increased to a minimum of 512 KB. To increase the buffers to 4 MB, add the following lines to the /etc/sysctl.conf file:

net.ipv4.tcp_rmem=4096 4194304 4194304
net.ipv4.tcp_wmem=98304 4194304 4194304
net.core.rmem_default=65535
net.core.wmem_default=65535
net.core.rmem_max=4194304
net.core.wmem_max=4194304
net.ipv4.tcp_window_scaling=1

Then reboot or run this command:

# /sbin/sysctl -p

IMDB Cache

For IMDB Cache, TCP send and receive buffers should be increased to even greater values. To make these changes, add the following lines to the /etc/sysctl.conf file:

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"

Then reboot or run this command:

# /sbin/sysctl -p

Solaris prerequisites

On Solaris, before installation, the following sections enable you to improve the performance of TimesTen on your system:

File system options

In addition to the file system options listed in the section "General UNIX requirements", on Solaris UFS file systems, if you plan to have TimesTen applications that use DurableCommits=1, mount the file system with the -forcedirectio option.

IPC semaphores

On Solaris 9, TimesTen checks the IPC configuration at install time. If either the IPC Semaphores module or the IPC Shared Memory module is not installed, you can install them by hand. Use the commands:

ryps3# modload /kernel/sys/semsys
ryps3# modload /kernel/sys/shmsys

Increase number of semaphores

For Solaris 10 systems, the default semaphore settings should be sufficient without entries in /etc/system.

On other Solaris systems, you may need to increase the number of semaphores. TimesTen consumes one SEMMNI per active database, plus one additional SEMMNI per TimesTen instance where Client/Server communication is done through shared memory.

For each database, TimesTen consumes 36 SEMMSL, plus one for each active connection. TimesTen consumes 100 SEMMSL if the Connections attribute is set to the default value (64), and one additional SEMMSL for each estimated connection above the default. We recommend that you increase the number of semaphores if you plan to use additional connections. For example:

  1. Log in as user root.

  2. Set or add the following lines to /etc/system:

    set semsys:seminfo_semmni = 20
    set semsys:seminfo_semmsl = 512
    set semsys:seminfo_semmns = 2000
    set semsys:seminfo_semmnu = 2000
    

    Note:

    The values in this step are the minimum number of required semaphores. You can increase these numbers as needed. You can use the following formula as a guide, although in practice, SEMMNS and SEMMNU can be much less than SEMMNI * SEMMSL because not every program in the system needs semaphores.

    SEMMNS=SEMMNU = (SEMMNI * SEMMSL)

  3. Reboot your system.

  4. To view the current limits:

    % /usr/sbin/sysdef
    

    This command displays the limits for SEMMSL, SEMMNS, SEMOPM, and SEMMNI. SEMOPM is the maximum number of operations per semop call. It does not need to be modified.

Shared memory IPC client connections

For Solaris systems before Solaris 10, to have more than six ShmIpc enabled client DSN connections per process, you must make changes to the SHMSEG kernel parameter. For example, to allow a single process to access 12 databases, add the following line to /etc/system and reboot before using TimesTen:

set shmsys:shminfo_shmseg=12

Other changes

Other changes that you may need to make to your Solaris system include the following:

  • To allow a large number of connections to a database, add the following lines to /etc/system and reboot before using TimesTen:

    set rlim_fd_cur=4096 
    set rlim_fd_max=4096
    
  • To set shared memory on Solaris 10 systems, specify project.max-shm-memory.

  • To enable large shared memory objects in Solaris, add the following line to /etc/system and reboot before using TimesTen:

    set shmsys:shminfo_shmmax = 0x40000000
    

    Note:

    The value 0x40000000 (a 4 followed by seven zeroes) indicates that the largest shared memory segment that can be created is 1024 MB. The size of the shared memory segment required for a database is larger than the database size permanent size. Set this value high enough to support the largest shared memory segment needed.

Large databases

If you keep databases on a Solaris UFS file system, and are using transaction-consistent checkpoints, you may need to change the settings of some kernel parameters to get the best performance for your checkpoints. The Solaris UFS Throttle algorithm causes processes that write a single large file to be put to sleep when a byte count threshold exceeds the high-water mark. To disable the algorithm, add the following line to the /etc/system file:

set ufs:ufs_WRITES = 0

Alternatively, you can increase the high-water mark by adding the following line:

set ufs:ufs_HW = desired value

You must reboot the system for the new value to take effect.

Setting the high-water mark to the size of the checkpoint file should provide satisfactory performance, although a lower value may as well. More information on the UFS Throttle algorithm may be obtained in the white paper, "Understanding Solaris Filesystems and Paging" (SMLI TR-98-55) available from http://labs.oracle.com/techrep/1998/abstract-55.html.

Replication

For replication, TCP send and receive buffers should be increased to a minimum of 512 KB. You may need to embed the following commands into a script that can be run at system boot time:

# /usr/sbin/ndd -set /dev/tcp tcp xmit_hiwat=524288
# /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat=524288

Windows requirements

The TimesTen debug libraries depend on Visual Studio 2003, 2005, 2008, or 2010. If you intend to use the debug libraries, ensure that one of these versions is installed.

On more recent Windows versions, such as Vista, Windows 2008, and Windows 7, you must have Administrator privileges to perform certain operations, such as starting and stopping the TimesTen daemon. If User Account Control is enabled, and you are logged in as the local Administrator, then you can successfully run these operations in the usual way. However, if you are logged in as a member of the TimesTen users group, then you must explicitly invoke these tasks with Windows Administrator privileges.

To start a command prompt window with Windows Administrator privileges, you can right-click the cmd.exe executable. (In Windows 7, for example, this executable is located in the C:\Windows\System32 folder.)

When the command window opens, it will indicate "Administrator" in the title bar.

Default installation directories

The TimesTen default installation directories for release 11.2.1 are as follows:

  • On Windows, C:\TimesTen

  • On UNIX, $HOME/TimesTen

TimesTen creates temporary files when a transaction frees a large amount of space in a database. In addition, other TimesTen operations, such as large deletes, use the temporary directory when copying files.

The temporary directory is operating system-dependent. Usually it is located according to the following points.

  • On Windows it is according to the %TMP% environment variable. This typically points to a location such as the following, for example:

    C:\Documents and Settings\username\Local Settings\Temp
    

    Or the equivalent on Window 7, where C:\Users replaces C:\Documents and Settings.

  • On Solaris and Linux: /tmp

  • On HP-UX and AIX: /var/tmp

You can change the location of your temporary directory by setting the TMP environment variable on Windows. On UNIX, you can change the location of your temporary directory by setting the TMPDIR environment variable.

Note:

On Windows, the complete temporary directory path must be less than 190 characters for the installation to complete successfully. In addition, TimesTen does not support file path names that contain multibyte characters. Make sure that the installation path, database path, transaction log path, and temporary file path do not contain any multibyte characters.

Considerations for locations of database files and other user files

During installation, if you have elected to install the TimesTen Quick Start, the installer will prompt you for a location for the DemoDataStore directory. By default, this will be located under the info directory that is under the Timesten installation path. We strongly recommend that you choose an alternate location, outside of the TimesTen installation path, for this directory.

We also strongly recommend that you not store any database files (checkpoint and log files) or any other user files anywhere under the TimesTen installation path. Any files under the installation path, including files not installed by TimesTen, may be removed during upgrade or uninstall operations.

Pre-Install requirements for operating system group and file permissions

The following sections describe creating the operating system groups and setting the correct directory permissions for TimesTen:

TimesTen instance administrators and TimesTen users groups

For security, we restrict access to the TimesTen installation to members of a single operating system group, under which TimesTen is installed. We refer to this group as the TimesTen users group. Only users that are members of the TimesTen users group are allowed to perform direct driver connections to TimesTen and perform operations on TimesTen databases. Any users connecting to a TimesTen database through a client connection do not need to be members of the TimesTen users group.

The user that installs TimesTen is the instance administrator. The instance administrator must be a member of the TimesTen instance administrators group, and must also be a member of the TimesTen users group.

  • On Windows, which does not have the same concept of "administrators group" as Linux, the TimesTen users group is effectively equivalent. Therefore, the instance administrator on a Windows installation must be a member of the TimesTen users group to install TimesTen. In addition, all users who perform a direct driver connection must be a member of the TimesTen users group.

  • On UNIX, the TimesTen instance administrators group and the TimesTen users group can be the same or different operating system groups:

    • TimesTen instance administrators group. Any user installing TimesTen must be a member of this group. This group must be granted read and write access to /etc/TimesTen, which contains information about all TimesTen instances installed on the computer.

    • TimesTen users group. The instance administrator must also be a member of this group to install TimesTen. After installation, only members of this operating system group are allowed to make direct driver connections to TimesTen and perform operations on TimesTen databases.

    The details on how to create both operating system groups on UNIX are included in "Creating UNIX TimesTen administrator and users groups".

Directory and file permissions

When installed, read and write permissions on TimesTen files and directories is limited to only members of the TimesTen users group, unless TimesTen was installed as "world accessible." TimesTen processes use these permissions.

The following sections describe directory and file permissions for Windows and UNIX systems.

Permissions and instance registry pre-requisites for TimesTen

On Windows, TimesTen files and directories are accessible only to members of the TimesTen users group.

If you choose to install TimesTen as world accessible, which is an option during the installation, TimesTen files and directories are accessible to everyone. In this case, anyone can perform any action on the TimesTen database files and shared memory segments. This is not recommended. Enable this option only if all users on this computer are trusted and you want to disable all operating system-level access control for this installation.

For more information on operating system groups, see "TimesTen instance administrators and TimesTen users groups".

On Windows, information about TimesTen is contained in the operating system registry.

On UNIX, TimesTen maintains a registry of all TimesTen instances installed on a given computer in /etc/TimesTen. The instance registry itself is not required for operation, but it is essential for correct installation and uninstallation of TimesTen. Before installing TimesTen, ensure that, the user installing TimesTen is a member of the administrator's group and has read and write permissions on the /etc/TimesTen directory.

The details on how to set the directory permissions for /etc/TimesTen to the instance administrators group are included in "Creating UNIX TimesTen administrator and users groups".

Note:

Checkpoint files and log files for databases should be installed on separate operating system devices. TimesTen returns a message to the daemon log if the transaction log files and checkpoint files for your databases are on the same operating system device.

Creating UNIX TimesTen administrator and users groups

The following details the pre-installation procedures to create the required operating system groups and set the directory permissions for the UNIX TimesTen install.

Create the TimesTen users group

During installation, you must specify the TimesTen users group. By default, the TimesTen users group for the instance is the primary operating system group of the user installing TimesTen. If you want the TimesTen users group to be other than the installer's primary group, you must specify the name of the group during installation.

Alternatively, you can make the TimesTen instance world accessible. However, this is not recommended.

The only way to change the TimesTen user group is to uninstall and reinstall the TimesTen instance, providing the new group name during reinstall.

If you do not have an operating system group for TimesTen users, the following outlines certain procedures that must be performed once as user root before installing TimesTen to create the TimesTen users group.

  1. Log in as root.

  2. Create an operating system group under which the TimesTen instance can be installed. In creating this operating system group, we suggest using the name timesten, but you can choose any name that you prefer.

    Note:

    Throughout this manual, for our examples, we use timesten to represent the name of the TimesTen users group.
  3. Add the user who is installing and any users who are administering TimesTen to the TimesTen users group that you just created.

  4. Provide the name of this group, if not the same as the default TimesTen users group, during the installation at the appropriate time.

The directory and file permissions for the TimesTen installation have the group specified as the group you defined during the installation. This sets the permissions to restrict read and write access for most directories, files, checkpoint files, transaction log files, shared memory segments, and semaphores to this defined group. There are exceptions for certain resources as determined by TimesTen. See "Directory and file permissions" for more information on permissions.

When installing on HP-UX systems, the operating system user running the TimesTen daemon must belong to an operating system group that has been given the MLOCK privilege, to use the MemoryLock feature of TimesTen.

For example, if the user is a member of a group called timesten, then the following command (run as root) gives the timesten group the MLOCK privilege:

# setprivgrp timesten MLOCK

You can use the getprivgrp command to check the privileges of a group:

$ getprivgrp timesten
timesten: MLOCK

Note:

On Solaris systems, you must be installed as root to use MemoryLock with a setting of 1 or 2. Databases in a non-root instance of TimesTen can use settings 3 and 4 for this attribute on Solaris systems.

Create the TimesTen instance registry and administrators group

On UNIX platforms, the instance registry is located in the directory /etc/TimesTen. Initial creation of the /etc/TimesTen directory may require root access. Creation of this directory is a once per computer, pre-installation step.

If the user installing TimesTen does not have read and write access to the /etc/TimesTen directory, the following outlines certain procedures that must be performed once as user root before installing TimesTen.

  1. Log in as root.

  2. If the directory /etc/TimesTen does not exist, create it.

    # mkdir /etc/TimesTen
    

    The disk space required for the files in this directory is at least 100 KB.

  3. If the instance registry file, instance_info, does not already exist, create it.

    # touch /etc/TimesTen/instance_info
    
  4. Create an operating system group for the TimesTen instance administrators group. You can name this group as you want. For our examples, we use the name ttadmin.

    # groupadd ttadmin
    
  5. Assign ownership permissions on the /etc/TimesTen directory to the TimesTen instance administrators group so that only the instance administrator may access and execute. At install time, the instance_info file is added to the /etc/TimesTen directory. This file must be readable and writable by the instance administrators group.

    Before installing TimesTen, set the permission mode for /etc/TimesTen to 770, and permissions for all files under /etc/TimesTen to 660.

    The following commands modify the group ownership of the TimesTen directory to be the ttadmin group and changes the permissions for all files in this directory to read and write for members of the ttadmin group:

    # chgrp -R ttadmin /etc/TimesTen
    # chmod 770 /etc/TimesTen/
    # chmod 660 /etc/TimesTen/*
    
  6. You can now install TimesTen on UNIX systems. The installer verifies the existence and permissions of /etc/TimesTen and fails if the permissions are not correct.

Installing TimesTen on UNIX systems

The instance may be installed in any directory to which the TimesTen instance administrator has sufficient permission.

Note:

Before beginning installation, be sure that the prerequisites defined in "Installation prerequisites" have been met.

The following sections provide instructions on installing TimesTen on UNIX systems.

Installing TimesTen

To install TimesTen on your UNIX system, follow these steps:

  1. Download TimesTen to your system. The download consists of a gzipped TAR file that is named timestenrelease.platform.tar.gz, for example, timesten112140.linux86.tar.gz.

  2. Log in as the TimesTen instance administrator and copy the GZIP file to the location from which you want to install.

  3. Unzip the installation file:

    % gunzip timestenrelease.platform.tar.gz
    
  4. Extract the TimesTen files:

    % tar -xf timestenrelease.platform.tar
    
  5. Change to the platform directory:

    % cd platform
    

    For example on a Linux system:

    % cd linux86
    
  6. Run the TimesTen setup script:

    % ./setup.sh
    

    Note:

    If a user installs TimesTen as root, the installer gives the following warning: "You are about to install TimesTen as root. TimesTen daemon processes run with root privileges."

    If you click OK to install as root, then the instance administrator is root, and any actions or applications that must be performed by the instance administrator must be run as root.

    While no options are required to install TimesTen, the setup.sh script takes these options:

    Option Description
    -install Installs TimesTen.
    -uninstall Uninstalls TimesTen.
    -batch filename Installs or uninstalls TimesTen without having to respond to prompts. If filename is specified, the installation reads all installation prompts from the file. The batch file filename is optional. However, TimesTen recommends that you create the batch file and specifically indicate the instance name of the installation.

    If no batch file is provided or if the batch file does not contain an instance name, TimesTen installs a default instance, using tt1121_bits for the instance name. If an instance with the same name exists on the installation computer, the install procedure fails.

    -help Displays the help message.
    -installDoc Installs the TimesTen documentation.
    -quickstart Installs the Quick Start.
    -record filename Installs or uninstalls TimesTen and records responses to prompts described in file name. The file can then be used as the parameter to the -batch option.
    -verbose Displays extra installation information.

    The installation contains TAR files of TimesTen components. If the setup script cannot find the TAR files from which to extract these components, it prompts you for their location.

  7. Enter your response to the setup script prompts.

Note:

To install or uninstall TimesTen without having to respond to prompts, use the -batch flag with the setup.sh script. Batch files from older releases of TimesTen cannot be used to install this release. All new prompts in the installation script for this release are assigned default answers and may produce unexpected results when batch files from different releases are used.

We recommend that you re-create the response file using -record each time changes are made. Because answers to new installation questions may not be present in the original silent install response file, unexpected results can occur.

The setup script performs the following actions (unless your answers resulted in termination of the installation process).

  • Prompts you to do the following:

    • Install a new instance.

    • Upgrade an existing instance. (This option allows you to upgrade from a release previous to the TimesTen 11.2.1 release.)

    • Display information about an existing instance.

    • Quit the installation.

  • Prompts you to choose the default instance name or choose an instance name for your TimesTen instance.

    Note:

    Each TimesTen installation is identified by a unique instance name. The instance name must at least one alphanumeric string and no longer than 255 characters.
  • Prompts you to install one of the following components:

    • Client/Server and Data Manager

    • Data Manager only

    • Client only

  • Prompts you for the location of your TimesTen instance. By default installs the instance in $HOME/TimesTen. The TimesTen documentation refers to the installation directory as install_dir.

  • Prompts you for the location of the TimesTen daemon home directory.

  • Prompts you for the location of TimesTen daemon log files. The default is install_dir/info.

  • Prompts you to specify the daemon port number. The default port number is 53384 for 32-bit installations and 53388 for 64-bit installations.

    Note:

    All installations that replicate to each other must use the same daemon port number that is set at installation time. Verify the daemon port number by running the ttVersion utility.
  • Prompts you to set the TimesTen users group or choose world accessibility. For more information on these options, see "Pre-Install requirements for operating system group and file permissions" for details on the TimesTen users group and file permissions. You can do the following:

    1. Restrict access to group default group.

    2. Restrict access to a different group.

    3. Make the TimesTen instance world accessible (not recommended). Choose this option only if all users on this computer are trusted and you want to disable all operating system-level access control for this installation.

  • Prompts you to determine if PL/SQL should be enabled for the instance. Default answer is "yes." If not enabled at install time, PL/SQL can be enabled for the instance at a later time using the ttmodinstall utility.

    Note:

    Enabling PL/SQL increases the size of some TimesTen libraries.
  • Prompts you to set the location to be supplied for the TNS_ADMIN environment variable that specifies the directory where the tnsnames.ora file can be found.

    You can leave this field blank. If you do not specify the value of the TNS_ADMIN environment variable at install time, you can set it at a later time with the ttmodinstall utility. However, before using the In-Memory Database Cache, you must set this environment variable.

  • Prompts you to specify the server port number. The default port number is 53385 for 32-bit installations and 53389 for 64-bit installations. Installs the client and server components.

  • Prompts you to install Quick Start and the TimesTen documentation. The TimesTen Quick Start applications can take up to 64 MB of disk space. The default directory is install_dir/quickstart and install_dir/doc.

  • Prompts for the location of where to install the demo database. This indicates that when you install the Quick Start, the TimesTen demo database files are installed in the DemoDataStore directory that defaults to the install_dir/info/DemoDataStore location.

    Important: Refer to "Considerations for locations of database files and other user files".

  • Installs the client components.

  • Prompts you to indicate if you want to install TimesTen replication with Oracle Clusterware. Prompts you for the path for the Oracle Clusterware installation on this computer and the port number for the TimesTen Clusterware agent.

  • The install checks for any node where the Oracle Clusterware is currently configured and prompts you to specify a node list for TimesTen replication with Oracle Clusterware.

  • Removes any previous installation of this release of TimesTen if you are installing an upgrade.

  • Installs the TimesTen components into the appropriate directories.

  • Starts the daemon.

The daemon writes a timestend.pid file into the directory from which the daemon was started. By default, this is install_dir/info. This file contains the daemon's process ID. When you stop the daemon, this ID is used to determine the process to terminate. When the process terminates, the timestend.pid file is removed.

Note:

TimesTen returns a message to the daemon log if the transaction log files and checkpoint files for your databases are on the same operating system device.

If you want the TimesTen instance to start each time the computer is rebooted, log in as user root, and run the setuproot script as root. The setuproot script is located in the install_dir/bin directory:

# cd install_dir/bin
# setuproot -install

Working with the TimesTen daemon and server on UNIX systems

The TimesTen main daemon (timestend) starts automatically when the operating system is booted and operates continually in the background. Application developers do not interact with timestend directly; no application code runs in the daemon and application developers do not, in general, have to be concerned with it. Application programs that use TimesTen databases communicate with the daemon transparently by using TimesTen internal routines.

There are situations, however, when you may have to start and stop the daemon manually, using the TimesTen main daemon startup script. This section explains how to start and stop the daemon. If you have installed the TimesTen Server, it starts automatically when the TimesTen daemon is started and stops automatically when the TimesTen daemon is stopped.

Note:

You must be the TimesTen instance administrator or have root privileges to interact with the TimesTen daemon.

To stop the daemon manually, use the utility command:

% ttDaemonAdmin -stop

To start the daemon manually, use the utility command:

% ttDaemonAdmin -start

Informational messages on UNIX systems

As the TimesTen daemon operates, it generates error, warning, informational and debug messages for TimesTen system administration and for debugging applications. At installation time, you determine whether these messages go into a file or to the syslog facility.

If messages are logged using the syslog, the LOG_USER syslog facility is used by default.

To specify the syslog facility used to log TimesTen Daemon and subdaemon messages, on a separate line of the ttendaemon.options file add:

-facility name

Possible name values are: auth, cron, daemon, local0-local7, lpr, mail, news, user, or uucp.

The syslog facility allows messages to be routed in a variety of ways, including recording them to a file. The disposition of messages is under the control of the /etc/syslog.conf configuration file.

Entries in the syslog.conf file contain two columns. The first column contains a list of the types of messages to log to a particular file. The second column contains the name of the log file. A tab appears between the message type and file name. Each entry in the syslog.conf file has the format: message_type file_name. Message types are specified in two parts:

subsystem-facility.severity-level

Depending on the configuration specified in that file, messages can be logged into various files. For the TimesTen daemon, specify the message types: user.debug, user.info, user.warn and user.err. You can also use the wildcard character * to represent the subsystem-facility. Since debug messages are ranked highest, specifying *.debug or user.debug is sufficient in preparing a file for the support or error log. In a message type list, delimit items by semi-colons. For example:

*.debug /var/adm/syslog/syslog.log
user.err; user.warn; user.info /var/adm/messages

To make changes to /etc/syslog.conf, you must have root privileges. Changes only take effect after the syslog daemon (syslogd) process is terminated (with the command kill -1) and restarted.

For further details, see your operating system documentation for syslog.conf or syslogd for information on configuring this file.

Note:

If the /etc/syslog.conf file does not exist on your system, create one according to the syslog.conf manual page so the daemon can log its data to the syslog facility.

To determine if your syslog configuration file is set up correctly, run the TimesTen ttSyslogCheck utility. Finally, once syslogd has been set up correctly, you may use the TimesTen ttDaemonLog utility to view only those messages in the system log file that TimesTen logged.

Changing the daemon port number on UNIX

Though the instance registry enforces TCP/IP port uniqueness for TimesTen instances, the possibility of the TimesTen main daemon port conflicting with ports used by non-TimesTen applications always exists.

The ttmodinstall utility allows the instance administrator to change the port number on which the main TimesTen daemon listens. If you have not stopped the TimesTen daemon before using ttmodinstall, the utility stops the daemon before changing the port number. After the port change, the daemon is automatically restarted. This feature is useful if you install TimesTen and later find that the port is in use.

The utility is run from the command line and takes the -port option with the new port number as an argument. For example:

% ttmodinstall -port 12345

See the Oracle TimesTen In-Memory Database Reference for more details on ttmodinstall.

Uninstalling TimesTen on UNIX systems

To uninstall all TimesTen components, follow these steps:

  1. Log in as the TimesTen instance administrator.

  2. The TimesTen setup script is in the install_dir/bin directory. Run the script with the -uninstall option in a directory outside of the installation directory, by typing:

    % install_dir/bin/setup.sh -uninstall
    

Uninstalling the system removes all TimesTen libraries and executables and also stops and uninstalls the daemon and Server. You can execute ps to verify that all TimesTen processes have terminated. To verify that TimesTen has been successfully uninstalled, verify that the install_dir no longer exists.

Installing TimesTen on Windows systems

This section discusses installation and related issues for Windows systems.

TimesTen provides separate installers for 32-bit and 64-bit installations. On Windows 64-bit systems, you can do either a 64-bit installation (typical) or a 32-bit installation, but you cannot do both a 64-bit installation and a 32-bit installation of the same release. (You could, however, have a 64-bit installation of the 11.2.2.2.0 release and a 32-bit installation of the 11.2.1.9.0 release, for example.)

Note:

Before beginning installation, ensure that the prerequisites defined in "Installation prerequisites" have been met.

Installing TimesTen

An InstallShield program installs your TimesTen instance on Windows systems. To install TimesTen manually, run the setup.exe executable.

Notes:

  • In Windows 7, you must right-click setup.exe and select "Run as administrator" from the resulting dropdown list. (In earlier Windows versions, you have the necessary administrative privileges by default when you execute setup.exe.)

  • Each time you execute setup.exe, the install program checks for previous TimesTen installations. On Windows, you can install only one instance of any major TimesTen release, where a major release is indicated by the first three parts of the release number, such as 11.2.1. If a previous version of the same TimesTen major release exists (such as 11.2.1.4.0 if you are trying to install 11.2.1.9.0), the installer returns an error message asking you to uninstall the previous release.

The TimesTen installation script performs these actions:

  • Prompts you for the location of the installation. By default, TimesTen is installed under C:\TimesTen\tt1121_32 (32-bit installation) or tt1121_64 (64-bit installation).

  • Prompts you to select the components that you would like to install:

    • TimesTen Data Manager

    • TimesTen Data Manager Debug Libraries

    • TimesTen Server

    • TimesTen Client

    • Optional Components

      • Timesten Quick Start

      • TimesTen Documentation

    For more information, see "Components available on Windows".

  • Prompts for the location to install the demo database. When you install the TimesTen Quick Start, the demo database files are installed in the DemoDataStore directory that defaults to the following location:

    %USERPROFILE%\Application Data\TimesTen\DemoDataStore\
    

    This is a location such as the following, for example:

    C:\Documents and Settings\username\Application Data\TimesTen\DemoDataStore\
    

    Or the equivalent on Window 7, where C:\Users replaces C:\Documents and Settings. For example:

    C:\Users\username\Application Data\TimesTen\DemoDataStore\
    

    Note that Application Data may be a symbolic link (to AppData\Roaming on Windows 7, for example).

    Important: Refer to "Considerations for locations of database files and other user files".

  • Prompts you to set the location to be supplied for the TNS_ADMIN environment variable that specifies the directory where the tnsnames.ora file can be found.

    You can leave this field blank. If you do not specify the value of the TNS_ADMIN environment variable at install time, you can set it at a later time with the ttmodinstall utility. However, before using the In-Memory Database Cache, you must set this environment variable.

  • Prompts you to select the Program Folder for the Start Menu. Browse to choose the folder that you want for this installation either from existing folders or a new folder. The default is Timesten 11.2.1 (32-bit) or TimesTen 11.2.1 (64-bit).

  • Asks if you want permissions on this installation to be readable and writable by anyone who has access to the computer. This is not recommended. If disabled, permissions are restricted to users who are members of the TimesTen users group. See "Pre-Install requirements for operating system group and file permissions" for details on permissions and world accessibility. Choose this option only if you want to disable all operating system-level access control for this installation.

  • Prompts you to specify whether PL/SQL should be enabled for the instance. By default, it is enabled. If not enabled at install time, PL/SQL can be enabled for the instance at a later time using the ttmodinstall utility.

  • Prompts you to register environment variables. If selected, the installation program adds TimesTen directories to the system environment variables LIB and INCLUDE and sets other appropriate variables. If you decide not to register the environment variables at installation time, you can set the environment variables at any time after installation on a per session basis by running the script install_dir\bin\ttenv.bat. The ttenv script is described in "Setting environment variables for TimesTen".

  • Prompts you to select the JDK version, if any, to add to the CLASSPATH variable.

  • Displays your installation selections before continuing to install TimesTen.

  • Prompts you to display the release notes and launch the Quick Start Guide. For information on the Quick Start, see "TimesTen Quick Start".


Note:

TimesTen cannot be installed in a mapped network drive. Attempting to do so results in an error.

Installing TimesTen in silent mode

TimesTen allows you to save installation options to a batch file that you can later use to install TimesTen without having to answer each option in a dialog box. To set up silent mode:

  • From a command-line, run:

    C:> setup.exe /r
    

    With this option, TimesTen takes you through a normal setup operation. TimesTen saves your responses to the file C:\Windows\setup.iss.

You can now use this file to run an installation in silent mode:

  • From a command-line, run: setup.exe -s -fl response_file. For example:

    C:> setup.exe -s -f1C:\Windows\setup.iss
    

    This acquires the installation options from the response file. No dialog boxes appear. Some information pop-up dialogs may still appear, such as the one that informs you that the services are being started.

Note:

Batch files from releases older than TimesTen Release 11.2.1 should not be used to install this release. All new prompts in the installation script for this release are assigned default answers and may produce unexpected results when batch files from different releases are used.

Verifying installation

To verify that TimesTen has been properly installed, check that the driver files are available and that the services are running:

  1. Check that the TimesTen 11.2.1 Start menu shortcut has been added to the Windows Desktop Start > All Programs menu.

  2. On the Windows Desktop, choose Start > Control Panel > Administrative Tools > Data Sources (ODBC). This opens the ODBC Data Source Administrator.

  3. Choose the Drivers tab. Check to see that the TimesTen Data Manager 11.2.1 driver is installed. (If you installed TimesTen Client, that driver should be listed as well. See the next section, "Verifying TimesTen Client and Server installation".) Click OK.

  4. On the Windows Desktop, choose Start > Control Panel > Administrative Tools > Services and check that the TimesTen Data Manager 11.2.1 service has status "Started". At this time, you can also set Recovery options to attempt to restart the service after a failure.

Verifying TimesTen Client and Server installation

Perform the following steps to verify that the Client and Server have been properly installed.

Note:

The instructions in this section are valid if you are installing 32-bit TimesTen on 32-bit Windows or 64-bit TimesTen on 64-bit Windows. However, if you are installing 32-bit TimesTen on 64-bit Windows, verify the TimesTen ODBC entries by executing the following:

%WINDIR%\SysWOW64\odbcad32.exe

  1. On the Windows Desktop, choose Start > Control Panel > Administrative Tools > Data Sources (ODBC). This opens the ODBC Data Source Administrator.

  2. Choose the Drivers tab. Check to see that the TimesTen Client 11.2.1 driver is installed. (You should also see the TimesTen Data Manager 11.2.1 driver. See the preceding section, "Verifying installation".) Click OK.

  3. Choose the System DSN tab.

  4. Select the sampledbCS_1121 sample data source and click Configure.

    Note:

    The sampledb_1121 DSN is used for direct connections. The sampledbCS_1121 DSN is used for client/server connections.

    This opens the TimesTen Client Data Source Setup dialog.

  5. Click Test Oracle TimesTen Server Connection to attempt a connection to the server.

    The ODBC Administrator attempts to connect to the TimesTen Server and displays a message to let you know if it was successful. When you click this button, the TimesTen Client verifies the following:

    • ODBC, Windows sockets, and the TimesTen Client are installed on the computer.

    • The TimesTen Server you have selected is defined.

    • The TimesTen Server is running.

  6. Click Test Data Source Connection to attempt a connection to the data source on the TimesTen Server.

    The ODBC Data Source Administrator attempts to connect to the TimesTen data source and displays a dialog to let you know if it was successful. When you click Test Data Source Connection, the TimesTen Client verifies that:

    • The data source you have chosen is defined on the server.

    • The TimesTen Client can connect to the data source.

Working with the Data Manager Service and the Server on Windows

The TimesTen Data Manager Service starts automatically when you install the TimesTen Data Manager. In addition, if you installed the TimesTen Server, it is automatically started whenever the TimesTen Data Manager service is started. You can change the startup mode for the TimesTen Data Manager to require manual startup.

Note:

You must have administrative privileges to set the startup mode or to start and stop the TimesTen Data Manager service.

To change the startup mode:

  1. On the Windows desktop, choose Start > Control Panel > Administrative Tools > Services. This displays all currently available services.

  2. Double-click the TimesTen Data Manager 11.2.1 service to examine its properties dialog.

  3. In the properties dialog, the Startup type list should indicate Automatic (default). You can optionally change it to Manual. In either case, you can click Stop or Start (as applicable) in the properties dialog to stop or start the service. For typical usage, set the Startup type back to the default and click OK when you are through.

Informational messages on Windows systems

TimesTen writes error messages into the tterrors.log file. This file is located in the install_dir\srv\info directory. You can use the ttDaemonLog utility to view messages logged by the TimesTen Data Manager. For a description of the system administration utilities, see "Utilities" in the Oracle TimesTen In-Memory Database Reference.

Uninstalling TimesTen on Windows systems

To uninstall TimesTen for Windows:

  • On the Windows Desktop, choose Start > Control Panel > Add/Remove Programs (or Programs and Features in Windows 7).

To verify that removal was successful, check the following:

  • TimesTen 11.2.1 has been removed from the Start > All Programs menu.

  • TimesTen Data Manager 11.2.1 has been removed from the Services list.

  • The TimesTen 11.2.1 drivers have been removed from the Drivers tab in the ODBC Data Source Administrator Control Panel.

Notes:

  • DSNs created by TimesTen installation are removed upon TimesTen uninstall. DSNs created by users are not removed during TimesTen uninstall.

  • See "Verifying installation" for information about the Services list and ODBC Data Source Administrator Control Panel.

Installing TimesTen on Exalogic systems

To Install TimesTen on an Exalogic system, you follow the prompts in the TimesTen installation scripts as described in the procedures in "Installing TimesTen on UNIX systems". Also, ensure that you have met the prerequisites for Oracle Linux installations. See "Linux prerequisites"

We recommend that you install TimesTen on each of the compute nodes of an Exalogic system.

Note:

Installing TimesTen binaries once on the shared disk for use on more than one compute node is not supported.

Some considerations on the location of the TimesTen installation files are:

  • If the TimesTen checkpoint and transaction log files must reside on the ZFS shared storage, you must add the -allowNetworkFiles option to the ttendaemon.options file. See "Allowing database access over NFS-mounted systems" in the Oracle TimesTen In-Memory Database Operations Guide.

  • The database and log directory must reside outside the TimesTen Instance home directory to enable simple rolling upgrades.

Specifically, we strongly recommend that the TimesTen installation, checkpoint and transaction log files for each node be stored in the locations shown in Table 1-1.

Table 1-1 Installation, checkpoint file, and transaction log file locations

Component Directory

Installation

/non-NFS_mounted_file_system_path/TimesTen/TTinstance

Database

/u01/machinename/general/path or /u01/common/images/machinename/TTinstance

Log directory

/u01/machinename/general/username/TTinstance


Installing Oracle Clusterware for use with TimesTen

Install Oracle Clusterware per instructions in the Oracle Clusterware Administration and Deployment Guide.

Please follow these recommendations:

  • Create an NFS share on the ZFS 7320 Storage Appliance 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, refer to the Oracle Clusterware Administration and Deployment Guide for more details.

  • Install Clusterware on the ZFS 7320 Storage Appliance. The solid state disk (SSD) file system may not have sufficient space.

    Note:

    Installing in a Shared Oracle Home is not recommended as it 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:

        mkdir -p /opt/oracle
        mount storage-server:/export/compute_node_1/general /opt/oracle
        
      • On host 2:

        mkdir -p /opt/oracle
        mount storage-server:/export/compute_node_2/general /opt/oracle
        
      • On host n:

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

ODBC installation

On Windows systems, the Windows driver manager supports anything up to Microsoft ODBC 3.5 SDK. TimesTen supports the Microsoft ODBC 2.5 SDK. For any ODBC applications that link with the latest version of the Microsoft ODBC Data Source Administrator (ODBC32.LIB file), the TimesTen driver manager handles the connection using ODBC 2.5.

The ODBC SDK redistributable components are installed in C:\Windows\System32 on Windows systems. Microsoft only permits TimesTen to redistribute portions of the ODBC SDK; those portions are installed automatically (if they are not present). Other components—Microsoft sample programs, online help files, and C language header files—are available separately from Microsoft as part of the Microsoft ODBC SDK, which can be installed separately as required. Additionally, the ODBC C language header files and ODBC online help are bundled as part of Microsoft Visual Studio 2005, 2008, or 2010. Most TimesTen developers do not need to install the SDK separately.

On UNIX systems, no separate SDK installation is required.

Environment variables

This section describes various environment variables that you may need to set, depending on the features of TimesTen that your application uses. The following table summarizes, in alphabetical order, the environment variables detailed in this section and other parts of this guide. Some of these environment variables are platform-specific.

Environment variable What to include For settings and other information, see:
LIB, LIBPATH, LD_LIBRARY_PATH or SHLIB_PATH On UNIX systems, include the lib directory under the TimesTen installation directory. "Shared library path environment variable"
NLS_LANG If NLS_LANG is set to as NA, an OCI connection error or the ORA-12705 message is thrown. On Windows, if an older version of Oracle has been installed, such as Oracle9i, the registry key HKEY_LOCAL_ computer\Software\ORACLE\NLS_LANG may be set to an invalid value, such as NA. If this value is NA, the TimesTen installer replaces the value with AMERICAN_AMERICA.US7ASCII. This ensures that TimesTen OCI, Pro*C, and IMDB Cache can connect properly. TimesTen uses the Oracle Instant Client to make these connections. The Oracle Instant Client requires this value to be a valid NLS_LANG setting.
ODBCINI The location where the odbc.ini file used by TimesTen databases is to be found. "ODBCINI environment variable"
PATH Include the bin directory under the TimesTen installation directory. On Windows, also include the path to the Oracle installation if you are using the IMDB Cache option. "PATH environment variable", "Shared library path environment variable" and "Installing TimesTen on Windows systems"
SYSODBCINI Set to the location where the sys.odbc.ini file used by TimesTen system databases is to be found. This environment variable should be set in the startup script. "SYSODBCINI environment variable"
SYSTTCONNECTINI Set to the location where the sys.ttconnect.ini file used by TimesTen Client applications to define logical server names. "SYSTTCONNECTINI environment variable"
TMP or TMPDIR Set to the location of the temporary directory. TimesTen uses this directory during recovery and other operations. "Default installation directories"
TNS_ADMIN If using IMDB Cache, set to the location of the tnsnames.ora file. Required if you are using the IMDB Cache option. "TNS_ADMIN environment variable"
Java For Java applications, there are certain environment variables that must be set. "Java environment variables"

The following sections describe environment variables in TimesTen:

Setting environment variables for TimesTen

If, after installation, you want to set the environment variables to standard TimesTen settings, use the ttenv script. This includes setting paths so that TimesTen utilities can be executed, among other things. You must invoke this script before starting TimesTen in order for any of the changes to take effect.

For UNIX platforms, use either of the following scripts depending on your shell:

install_dir/bin/ttenv.sh
install_dir/bin/ttenv.csh

For a Windows platform, use the install_dir/bin/ttenv.bat script.

install_dir\bin\ttenv.bat

Execute the following for a description of the command-line options for ttenv:

source ttenv.csh -help

or:

. ttenv.sh -help

PATH environment variable

TimesTen provides utilities for managing and debugging TimesTen applications. To make these utilities readily available, include the bin directory found in install_dir in the PATH environment variable.

Note:

install_dir is the directory where TimesTen is installed.

On Windows, the PATH environment variable must also contain the bin directory of the Oracle installation, if you are using the IMDB Cache option.

ODBCINI environment variable

TimesTen applications use the odbc.ini file to define data sources and their connection attributes. (For a description of connection attributes, see "Connection Attributes" in the Oracle TimesTen In-Memory Database Reference.) By default on UNIX platforms, TimesTen first looks for the .odbc.ini file in the home directory of the user running the TimesTen application. To override the name and location of this file at run-time, set the $ODBCINI environment variable to the path name of an.odbc.ini file before launching the TimesTen application.

If TimesTen cannot locate a user DSN file, TimesTen also looks for the sys.odbc.ini file in install_dir/info. For more information, see "Overview of user and system DSNs" in Oracle TimesTen In-Memory Database Operations Guide.

SYSODBCINI environment variable

TimesTen applications use the sys.odbc.ini file to define system data sources and their connection attributes. (For a description of connection attributes, see "Connection Attributes" in the Oracle TimesTen In-Memory Database Reference.) Any user on the computer can use a system data source. On Windows, system DSNs are defined from the System DSN tab of the ODBC Data Source Administrator. On UNIX, system DSNs are defined in the file install_dir/info/sys.odbc.ini. To override the name and location of this file at run-time, set the $SYSODBCINI environment variable to the path name of a sys.odbc.ini file before launching the TimesTen application.

If TimesTen cannot locate a user DSN file, TimesTen also looks for the sys.odbc.ini file in install_dir/info.

For more information, see "Overview of user and system DSNs" in Oracle TimesTen In-Memory Database Operations Guide.

SYSTTCONNECTINI environment variable

TimesTen client applications use the sys.ttconnect.ini file to define logical server names. For a description of logical server names, see "Working with the TimesTen Client and Server" in the Oracle TimesTen In-Memory Database Operations Guide. By default on UNIX platforms, TimesTen looks in install_dir/sys.ttconnect.ini. To override the name and location of this file at run-time, set the SYSTTCONNECTINI environment variable before launching the TimesTen Client application.

TimesTen also looks for the sys.ttconnect.ini file under install_dir/info.

On Windows systems, logical server names can be configured using the ODBC Data Source Administrator.

TNS_ADMIN environment variable

On platforms where the IMDB Cache is supported, to work with Oracle data, you must set the TNS_ADMIN environment variable be set to the path of the tsnnames.ora file.

The ttmodinstall utility with the -tns_admin option allows you to set a value for this environment variable after installation. See the Oracle TimesTen In-Memory Database Reference for more details on ttmodinstall.

Shared library path environment variable

On Solaris and Linux systems, add install_dir/lib directory to the LD_LIBRARY_PATH environment variable.

On AIX systems, add install_dir/lib directory to the LIBPATH environment variable.

On HP-UX 64-bit systems, add install_dir/lib to the LD_LIBRARY_PATH environment variable.

Java environment variables

The following sections provide more detail about the environment variables that affect the environment for TimesTen Java applications.

Set the CLASSPATH variable

Java classes and class libraries are found on CLASSPATH. Before executing a Java program that loads any of the TimesTen JDBC drivers, the CLASSPATH environment variable must contain the class library file:

install_dir/ttjdbcjdk_ver.jar

Where jdk_ver indicates the version of the JDK that you are using. For example, for JDK 5.0, jdk_ver is 5 and the file name would be ttjdbc5.jar. For JDK 6.0, jdk_ver is 6 and the file name would be ttjdbc6.jar.

Note:

If multiple JAR files are listed in the CLASSPATH, make sure the TimesTen JAR file is listed first.

On UNIX, CLASSPATH elements are separated by colon. For example:

set CLASSPATH .:install_dir/lib/ttjdbc6.jar

or:

setenv CLASSPATH .:install_dir/lib/ttjdbc6.jar

On Windows, CLASSPATH elements are separated by semicolons.

Also, on Windows, do not use quotes when setting the CLASSPATH environment variable even if a directory path name contains spaces.

For example, this is correct:

set CLASSPATH=.;install_dir/lib/ttjdbc6.jar

This is incorrect:

set CLASSPATH=.;"install_dir/lib/ttjdbc6.jar"

If in doubt about the JDK version you have installed on your system, enter:

> java -version

If you are going to use the JMS/XLA interface, then you also need to add the following to your CLASSPATH:

install_dir/lib/timestenjmsxla.jar
install_dir/3rdparty/jms1.1/lib/jms.jar
install_dir/lib/orai18n.jar

For example, your CLASSPATH would look like the following example (replacing install_dir as appropriate):

.:install_dir/lib/ttjdbc6.jar:install_dir/lib/timestenjmsxla.jar
:install_dir/3rdparty/jms1.1/lib/jms.jar:install_dir/lib/orai18n.jar

By default, JMS/XLA looks for a configuration file called jmsxla.xml in the current working directory. To use another name or location for the file, you need to specify it as part of the environment variable in the InitialContext class and add the location to the CLASSPATH setting. See Oracle TimesTen In-Memory Database Java Developer's Guide for more information about the jmsxla.xml configuration file.

Set the shared library path variable

Before running a Java program that loads the TimesTen JDBC driver, the shared library path for your system environment variable must be set to include the TimesTen install_dir/lib directory. The name of the variable used for the shared library path depends on the system used

System Name of Variable
Linux LD_LIBRARY_PATH
Solaris LD_LIBRARY_PATH
HPUX SHLIB_PATH or LD_LIBRARY_PATH
AIX LIBPATH
Windows PATH

Set the THREADS_FLAG variable (UNIX only)

The TimesTen JDBC driver uses native threads. Green threads are not supported.

On some UNIX platforms, to use the native threads package, you must set the THREADS_FLAG environment variable to native. How you set the flag depends on your shell.

In csh, the syntax is:

setenv THREADS_FLAG native

In sh, the syntax is:

THREADS_FLAG=native
export THREADS_FLAG

Set the PATH variable

Make sure the javac and java executables are both on your executable search path.

TimesTen Quick Start

During installation, you have the option of installing TimesTen Quick Start, which includes a variety of tutorials, demo applications, and other resources. If you choose to install Quick Start, it is installed by default under the directory install_dir/quickstart. On UNIX you have the option of specifying an alternative location. Regardless of where you install Quick Start, the home page for further information is install_dir/quickstart.html.

Quick Start provides tutorials, demos, and sample code for administration, access control, application development, replication, and caching, including the following areas. The demo databases are first installed at the time that you install the Quick Start.

Configuration and setup:

  • Creating, loading, and unloading a TimesTen database

  • Setting up user accounts and privileges

  • Using TimesTen utilities and built-in procedures for system operations

  • Setting up In-Memory Database Cache to cache an Oracle database

  • Setting up replication using active standby pairs and Oracle Clusterware

  • Configuring a Java EE or J2EE application server to work with TimesTen

  • Using Oracle SQL Developer with TimesTen

  • Using Oracle Enterprise Manager with TimesTen

Application development:

  • C applications using ODBC and XLA

  • C applications using Oracle Call Interface (OCI) or the Pro*C/C++ Precompiler

  • C++ applications using TimesTen TTClasses and XLA

  • Java applications using JDBC and JTA

  • PL/SQL applications

Performance and best practices:

  • Response time demo

  • Programming tips

  • Database schema setup tips

  • Hardware configuration tips

  • Operating system configuration tips

Through the Quick Start home page, you can find information to set up and run the demos.

  • Demo schema and setup: The build_sampledb script creates a sample database and demo schema. You must run this before you start using the demos.

  • Demo environment and setup: The ttquickstartenv script, a superset of the ttenv script generally used for TimesTen setup, sets up the demo environment. You must run this each time you enter a session where you want to compile and run any of the demos.

  • Demos and setup: Quick Start demos are in subdirectories under the quickstart/sample_code directory. For instructions on compiling and running the demos, see the README files in the subdirectories. Also see "Getting Started" and the various API links under "Sample Programs" on the Quick Start home page.

Viewing the online documentation

Online copies of TimesTen documentation are installed along with the TimesTen product unless you choose not to install the documentation. Documentation is provided in HTML and PDF format. The HTML can be viewed in your browser. The PDFs can be viewed with the Adobe Acrobat Reader. If you do not currently have the Adobe Acrobat Reader installed, it is available from the Adobe Systems web page, http://www.adobe.com.

Online documentation is installed in the install_dir/doc directory.

Note:

The online documentation represents the most current release of the documentation.

TimesTen on HP-UX Memory Windows

The following sections discuss installation and related topics for HP-UX Memory Windows:

Installing TimesTen on HP-UX Memory Windows

An instance of TimesTen can run in a memory window. A separate instance of TimesTen is required for each memory window. During installation, the TimesTen installer prompts you to indicate whether this instance is to be run in a memory window.

For a memory windows installation, the installer appends the instance name and port number of the daemon to /etc/services.window allowing the instance name to be used as a key to the getmemwindow(1M) command. Use the getmemwindow<instance> command to determine which port is being used by the instance.

Using TimesTen in a memory window

To use a TimesTen instance running in a memory window, you must launch your application using the HP-UX setmemwindow(1M) command.

For example, given instance tt1121_32, use:

% setmemwindow -j -i `getmemwindow tt1121_32` <prog>

TimesTen utilities are used without the setmemwindow command, for example:

% ttBackup ...

Address space considerations

The maximum size for any one database remains 1 GB with 32-bit TimesTen.

TimesTen allocates a single shared memory segment per database. TimesTen may also allocate shared memory segments when configured to use the shared memory IPC mechanism for Client/Server.

The daemon and utility programs (programs) provided by TimesTen are linked with EXEC_MAGIC, using the -N option to ld(1). You may change the TimesTen programs to be marked SHMEM_MAGIC, enabling 2 GB of shared memory within the window. Any single database is still limited to 1 GB.

For example, to use SHMEM_MAGIC, log in as root and use the following.

# chatr -M tt_instance/bin/timesten* tt_instance/bin/*Cmdtt_instance/bin/ttcserver

To return to EXEC_MAGIC, use the following.

# chatr -N tt_instance/bin/timesten* tt_instance/ bin/ *Cmdtt_instance/bin/ttcserver

To determine if a program is SHMEM_MAGIC or EXEC_MAGIC:

# chatr binary

The chatr(1M) command prints "normal executable" for EXEC MAGIC programs. It prints SHMEM_MAGIC for programs so marked.

Note:

If the TimesTen programs are marked SHMEM_MAGIC, the user application must be marked SHMEM_MAGIC also. Failure to mark the application SHMEM_MAGIC may result with an Invalid Argument error (EINVAL, errno=22) when attempting to connect to TimesTen.

HP-UX Memory Windows Troubleshooting

TimesTen support may ask for all of the following to diagnose a problem using memory windows.

  • How many memory windows do you have configured?

    % /usr/sbin/kmtune -q max_mem_windows
    
  • What is the maximum shared memory segment size?

    % /usr/sbin/kmtune -q shmmax
    
  • How many windows are you using?

    % cat /etc/services.window
    
  • Do you have the correct instance in your path?

    % ttVersion % ttStatus % getmemwindow tt_instance
    
  • Can you connect with a utility provided by TimesTen?

    % ttIsql -connStr dsn=my_dsn
    
  • If you installed the Quick Start, can you successfully run a demo program? The TimesTen demos are located under install_dir/quickstart/sample_code.

  • What other segments are in use?

    % ipcs -m -a
    
  • Does setmemwindow(1M) or a TimesTen utility such as ttStatus return silently when you expected output?

  • Check the error status from the setmemwindow command.

  • What does the memwin_stats tool show?

    % memwin_stats -w
    

    The memwin_stats tool may be downloaded from HP at ftp://contrib:9unsupp8@hprc.external.hp.com/

  • What error are you getting when you try to connect?

The following list is not exhaustive but may help sort out the problem.

  • Not enough core (ENOMEM, errno=12) indicates a problem allocating the requested amount of shared memory. Can you attach with small PermSize and TempSize attributes?

  • Shared memory can be fragmented. Sometimes, you can attach with increasingly larger segments until you allocate what you want. Are you attempting to allocate more than 1 GB within your window (2 GB if using SHMEM_MAGIC)?

  • Permission Denied (EACCES, errno=13) indicates that you are attempting to attach to the wrong instance or are pointing to the wrong memory window. Which -i argument is passed to setmemwindow(1M)?

  • Invalid Argument (EINVAL, errno=22) indicates that the shared segment may have been allocated in another quadrant. Did you mark the TimesTen programs SHMEM_MAGIC? Did you also mark your application SHMEM_MAGIC?

  • No space left on device (ENOSPC, errno=28) may indicate that the system is not configured for enough shared memory segments or identifiers or that the system may have insufficient swap space to allocate the shared segment. Check the values of shmseg, shmmni, maxswapchunks and run the swapinfo(1M) command.

Installation problems

To avoid problems during installation, make sure you have met all prerequisites. Using information in the installation guide and the release notes, check the following:

  • You have installed all required operating system patches.You are running a supported version of the operating system.

  • You have made all required kernel configuration changes.

  • You have sufficient disk space.

  • On UNIX, you are a member of the TimesTen administrator's group. See "TimesTen instance administrators and TimesTen users groups".

  • On Windows, you are installing as user Administrator who is a member of the local Administrators group.