Thursday, 26 January 2012

Times Ten 11.2.2 –Creating an Oracle Times Ten 11.2.2 database on Windows

TimesTen is a memory-optimized relational database that delivers very low response time and very high throughput to performance-critical systems. It is targeted to run in the application tier, close to applications, and optionally in process with applications.

A TimesTen database may be used as the database of record, and/or as a cache to an Oracle database.  In this blog I will try to list down steps to create Times Ten Database on Windows. The next blog I will be writing the most exciting feature of times ten as a cache to an Oracle database.
Steps to Create Times Ten Database 11.2.2 are as follows
1.       Define a Data Source Name ( DSN)
DSN – Defines the configuration of database, creation of DSN is required before creating database  
Go to Control Panel -> Administrative Tools -> Data Sources (ODBC)
Choose Tab System DSN, Click on Add to Create a New Data Source, Select the Times Ten Data Manager 11.2.2 Driver and then fill in details for Times Ten ODBC setup

The Times Ten ODBC setup has following tabs

2.       Data Store - Specify the data source name, the data store path/name, transaction log directory and database character set

3.       First Connection – Specify following parameters

Permanent Data Size – is the size in MB for the permanent partition of the database (Set it to 40 MB)
Temporary Data Size – is the Size in MB for temporary partition of the database (Set it to 32 MB)

Keep other setting as default and click ok to create DSN

4.       Check Times Ten Database Status - The main database daemon process must be running before a database can be created.
Run ttenv.bat command to set environmental variables and then run ttstatus to check the database status

5.       Connect to Database  -  Use command  Line Utility - ttiSQL TimesTen  , where TimesTen is a DSN Name

At first connection, the database TimesTen is being created and loaded into memory and ready to run commands

6.       Times Ten Commands

a.       dssize -  to check the size of database

b.      ttstatus ( via the host command ) – to view the database connection status for system processes and the database connections

c.  Create a Database User and grant CREATE SESSION and CREATE TABLE privileges   



d.      Connect to TimesTen Database with User (TT_USER)
CONNECT  “dsn=TimesTen;uid=TT_USER”;

e.      Create Table

f.        Create Index

g.       List Tables and Indexes

Use ‘Exit’ command to disconnect from the database.