Installing and Configuring Target TimesTen Database

You can install and configure target TimesTen database for both on-box and off-box deployments.

Note:

If you already have a suitable TimesTen instance and database that is configured for connectivity to the source Oracle database, then you can skip this step.

  1. Prepare an Oracle Database Net Services tnsnames.ora file with a suitable TNS entry to enable connectivity from the TimesTen host system to the source Oracle database. Save this file in a suitable directory.

    The following example creates a TNS entry called myoradb:

    MYORADB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = oradb.example.net)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = myoradb)
        )
      )
  2. Set the TNS_ADMIN location for the cache agent with the ttInstanceModify -tnsadmin option to set the path to the tnsnames.ora file. Specify the full path to the directory where the file is located.

    ttInstanceModify -tnsadmin /TimesTen/conf
  3. For cache in TimesTen Classic, set the TNS_ADMIN environment variable to indicate the full path to the directory where the tnsnames.ora file is located. Set this variable in the user's profile script so that it persists.
    export TNS_ADMIN=/TimesTen/tnsadmin
  4. Restart the main daemon to capture this setting.

    ttDaemonAdmin -stop
    ttDaemonAdmin -start
  5. Prepare the host where the target TimesTen database resides. Install TimesTen and create a TimesTen instance. When creating the instance, enable the instance to use the TNS_ADMIN value that it can detect from the environment. See Installation of TimesTen Classic on Linux or UNIX in the Oracle TimesTen In-Memory Database Installation, Migration, and Upgrade Guide.

  6. Once you have a functional TimesTen instance, define a Data Source Name (DSN) in the instance sys.odbc.ini file. The DSN defines all of the parameters for the target database.

    The following example shows a DSN, cache1, for the TimesTen database. This type of DSN is known as a Server DSN as it defines all of the attributes for the database and defines an endpoint for direct mode connections. The value for the OracleNetServiceName attribute should be the name of the TNS entry (myoradb in this example) that was configured previously. The values specified for DatabaseCharacterSet and ConnectionCharacterSet must match the source Oracle Database character set.

    [ODBC Data Sources]
    cache1=TimesTen 22.1 Driver
     
    [cache1]
    DataStore=/disk1/db/ckpt/myappdb
    LogDir=/disk2/db/log
    PermSize=8192
    TempSize=512
    LogBufMB=1024
    LogFileSize=1024
    MemoryLock=4
    DatabaseCharacterSet=AL32UTF8
    ConnectionCharacterSet=AL32UTF8
    OracleNetServiceName=myoradb
  7. While logged in as the TimesTen instance administration user, set the environment for the TimesTen instance. Connect to the DSN using the ttIsql utility, which creates the target database.