You are on page 1of 6

+++++++++++++++++++++++++++++++++++++++ ++ + Create a TimesTen in memory database +++ +++++++++++++++++++++++++++++++++++++++ Assumption: TimesTen database software has been installed Oracle user has been

used for TimesTen installed. So OS user Oracle is the administrator user for creating TimesTen database. 1. Define a Data Source Name (DSN) ============================== DSN defines the configuration of the database and must be defined before creating Database.

Modify the sys.odbc.ini [Add DSN anywhere in the ODBC DATA Sources section]

2. Specify New data Source definition =================================== edit sys. Verify that database daemon is running ================================ .location and name of the database files LogDir .odbc.Character Set of the database 3.location of the TimesTen direct linked ODBC driver DataSource .directory for the transaction logs PermSize .ini to add source definition and save Driver .Permanent partition of the database size in MB TempSize -Temporary partition of the database size in MB DatabaseCharacterSet .

4. ttisql to connect database and create the database store ============================================ .

Check the TimesTen in memory Database status +++++++++++++++++++++++++++++++++++++ [oracle@cloud bin]$ . type "exit" to quit ttIsql./ttisql mono_ttdb Copyright (c) 1996. 2013./ttstatus TimesTen status report as of Tue Nov 19 05:09:33 2013 Daemon pid 4161 port 53396 instance tt1122 TimesTen server pid 4170 started on port 53397 -----------------------------------------------------------------------Data store /u01/app/ttdata/datastores/mono_ttdb There are no connections to the data store Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. Oracle and/or its affiliates. -----------------------------------------------------------------------Accessible by group dba End of report [oracle@cloud bin]$ . Type ? or "help" for help. All rights reserved. .So mono_ttdb database has been created and loaded into memory.

connect "DSN=mono_ttdb". Connection successful: DSN=MONO_TTDB.ConnectionCharacterSet=US7ASCII.TypeMode=0.PermSize=40.TempSize=32.so.DataStore=/u01/app/ttdata/datastores/mono_ttdb.LogDir=/u01/app/ttdata/logs. (Default setting AutoCommit=1) Current size of the permanent and temporary data stores +++++++++++++++++++++++++++++++++++++++++ Command> dssize PERM_ALLOCATED_SIZE: 40960 PERM_IN_USE_SIZE: 9389 PERM_IN_USE_HIGH_WATER: 9389 TEMP_ALLOCATED_SIZE: 32768 TEMP_IN_USE_SIZE: 9442 TEMP_IN_USE_HIGH_WATER: 9505 Create a user and then object under that user ================================= .DatabaseCh aracterSet=AL32UTF8.UID=oracle.DRIVER=/home/oracle/TimesTen/t t1122/lib/libtten.

res0 -rw-rw---.1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.ds1 Note: TimesTen maintain two complete images on the disk and known as checkpoints Transaction logs for recovery ====================== [oracle@cloud logs]$ ls -ltra total 212348 drwxr-xr-x 4 oracle dba 4096 Nov 19 04:40 .ds0 -rw-rw---. -rw-rw---.res1 -rw-rw---.log0 . -rw-rw---.res2 drwxr-xr-x 2 oracle dba 4096 Nov 19 05:02 .1 oracle dba 28733432 Nov 19 05:18 mono_ttdb..1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.1 oracle dba 28758536 Nov 19 05:20 mono_ttdb. -rw-rw---.1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.. drwxr-xr-x 3 oracle dba 4096 Nov 19 05:02 .1 oracle dba 15880192 Nov 19 05:20 mono_ttdb.Now check the DataStore and LogDir ============================ [oracle@cloud datastores]$ ls -ltra total 56224 drwxr-xr-x 2 oracle dba 4096 Nov 19 04:39 mono_ttdb drwxr-xr-x 4 oracle dba 4096 Nov 19 04:40 .