Creating a TimesTen Client Instance
After the instance administrator unzips the distribution, thereby creating an installation, the next step is to create a TimesTen client instance.To do this, you run the ttInstanceCreate utility, located in the installation_dir/tt22.1.1.35.0/bin directory.
               
Note:
- 
                     Only the user who unpacked the distribution (the creator of the installation) can create an instance from the installation. 
- 
                     This user must be a member of the TimesTen users group. 
- 
                     This user is the only user that can be the instance administrator of this instance and all other instances associated with the installation. 
Topics include:
Overview of the ttInstanceCreate Utility
You can specify options for the ttInstanceCreate utility:
                  
- 
                        On the command line 
- 
                        In a file 
- 
                        Interactively as the utility runs 
You can also run ttInstanceCreate with the -help option to list the available options. See ttInstanceCreate in the Oracle TimesTen In-Memory Database
                        Reference for detailed descriptions.
                  
Note:
The ttInstanceCreate -clientonly option is optional for a client-only installation on a macOS or a Linux 32-bit host.
                     
Examples Creating TimesTen Client Instances
A TimesTen client instance can be used to connect either to a database in TimesTen Scaleout or a database in TimesTen Classic.
To create a client instance, navigate to the installation_dir/tt22.1.1.35.0/bin area and run the ttInstanceCreate utility.
                  
After you create the client instance, you can set up your DSN and then follow the steps to connect to the server from the client. See Working with the TimesTen Client and Server in the Oracle TimesTen In-Memory Database Operations Guide for details.
These sections illustrate how to use the ttInstanceCreate utility to create a client instance:
                  
Use ttInstanceCreate to Create a Client Instance Interactively
This example runs the ttInstanceCreate utility interactively to create a client instance. You run the utility from the installation directory. User input is shown in bold.
                        
%installation_dir/tt22.1.1.35.0/bin/ttInstanceCreate * Client installation detected. NOTE: Each TimesTen instance is identified by a unique name. The instance name must be a non-null alphanumeric string, not longer than 255 characters. Please choose an instance name for this installation? [ tt221 ] clientmac Instance name will be 'clientmac'. Is this correct? [ yes ] Where would you like to install the clientmac instance of TimesTen? [/home/ttuser ] /scratch/ttuser Creating instance in /scratch/ttuser/clientmac ... INFO: Mapping files from the installation to /scratch/ttuser/clientmac/install The 22.1 Release Notes are located here : '/installation_dir/tt22.1.1.35.0/README.html'
Use ttInstanceCreate to Specify Options on the Command Line
This example runs the ttInstanceCreate utility interactively to create a client instance. You run the utility from the installation directory. User input is shown in bold.
                        
%installation_dir/tt22.1.1.35.0/bin/ttInstanceCreate * Client installation detected. NOTE: Each TimesTen instance is identified by a unique name. The instance name must be a non-null alphanumeric string, not longer than 255 characters. Please choose an instance name for this installation? [ tt221 ] clientmac Instance name will be 'clientmac'. Is this correct? [ yes ] Where would you like to install the clientmac instance of TimesTen? [/home/ttuser ] /scratch/ttuser Creating instance in /scratch/ttuser/clientmac ... INFO: Mapping files from the installation to /scratch/ttuser/clientmac/install The 22.1 Release Notes are located here : '/installation_dir/tt22.1.1.35.0/README.html'
Review the Instance Home Directory and Subdirectories
You can review the instance home directory and subdirectories for informational purposes. When you create an instance, each instance includes these subdirectories under $TIMESTEN_HOME (Not all of the subdirectories are included in this list):
                  
- 
                        bin: TimesTen utilities and executables tailored and specific to the instanceThis includes ttenv.sh(orttenv.csh), which sets environment variables appropriately for the TimesTen environment for your session, andsetuproot.sh, which can be run as root to cause data instances to be automatically started whenever the operating system reboots.Note that ttenvalso puts thebindirectory in your path.
- 
                        conf: Contains thetimesten.conffile, which is the TimesTen instance configuration file
- 
                        diag: Diagnostic output, including the daemon log and error log
- 
                        info: Working directory of the TimesTen daemon, containing persistent state about the TimesTen instance
- 
                        install: Symbolic link referencing the installation associated with this instance.
- 
                        plsql: Contains this subdirectory:- 
                              utl_file_dir: The only directory that can be read from or written to by PL/SQL blocks using theUTL_FILEpackage
 
- 
                              
Review the timesten.conf File
The instance configuration file defines the attributes of the TimesTen instance. See "Instance Configuration File (timesten.conf)" for more information.
A sample file follows. Comments are indicated "#".
                  
# TimesTen Instance Configuration File
# Created by ttInstanceCreate
# Commented values are default values
hostname=host1
client_only=yes
timesten_release=22.1
instance_name=clientmac
daemon_port=-
admin_user=myadmin
admin_uid=12345
group_name=ttgroup
instance_guid=FE8D9351-E749-41B4-AEC9-6E27BCA882A5
verbose=1