Professional Documents
Culture Documents
Define A Data Source Name (DSN)
Define A Data Source Name (DSN)
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.odbc.ini to add source definition and save
Driver - location of the TimesTen direct linked ODBC driver DataSource - location and name of the database files LogDir - directory for the transaction logs PermSize - Permanent partition of the database size in MB TempSize -Temporary partition of the database size in MB DatabaseCharacterSet - Character Set of the database
So mono_ttdb database has been created and loaded into memory. Check the TimesTen in memory Database status +++++++++++++++++++++++++++++++++++++ [oracle@cloud bin]$ ./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. -----------------------------------------------------------------------Accessible by group dba End of report [oracle@cloud bin]$ ./ttisql mono_ttdb Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=mono_ttdb"; Connection successful: DSN=MONO_TTDB;UID=oracle;DataStore=/u01/app/ttdata/datastores/mono_ttdb;DatabaseCh aracterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/home/oracle/TimesTen/t t1122/lib/libtten.so;LogDir=/u01/app/ttdata/logs;PermSize=40;TempSize=32;TypeMode=0; (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 =================================
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 .. -rw-rw---- 1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.res0 -rw-rw---- 1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.res1 -rw-rw---- 1 oracle dba 67108864 Nov 19 05:02 mono_ttdb.res2 drwxr-xr-x 2 oracle dba 4096 Nov 19 05:02 . -rw-rw---- 1 oracle dba 15880192 Nov 19 05:20 mono_ttdb.log0