TimesTen Connection Options

TimesTen supports direct, driver manager, and client/server connection options so that users can choose the best tradeoff between performance and functionality for their applications.

From an application's perspective, the TimesTen API is identical whether it is a direct connection, driver manager connection, or a client/server connection.

Applications can connect to a TimesTen database in one of the following ways:

For more information about connecting to a TimesTen Classic database, see Managing TimesTen Databases, Working With the TimesTen Client and Server and Connecting to TimesTen with ODBC and JDBC Drivers in the Oracle TimesTen In-Memory Database Operations Guide.

For details on connecting to a grid using TimesTen Scaleout, see Database Connections and Connecting to a Database in the Oracle TimesTen In-Memory Database Scaleout User's Guide.

Direct Connection

An application using a direct connection runs on the same system as the database. In a direct connection, the ODBC driver attaches the shared memory region of the TimesTen database into the application's process address space.

The application uses the direct driver to access the memory image of the database. Because no inter-process communication (IPC) of any kind is required, a direct connection provides extremely fast performance and is the preferred way for applications to access the TimesTen database.

Applications that use direct connections must run in the environment of the TimesTen instance that provides the database. When using TimesTen Scaleout applications can run in any data instance.

The ODBC direct driver is a library of ODBC and TimesTen routines that implement the database engine used to manage the database. Applications using other APIs use the appropriate API library, which then in turn uses the TimesTen ODBC driver.

Client/Server Connection

The TimesTen client driver and TimesTen Server daemon processes accommodate connections from remote client machines to databases across a network.

  • Applications on a client machine issue ODBC, JDBC or OCI calls. These calls access a local ODBC client driver that communicates with the TimesTen instance. The TimesTen instance, in turn, issues native ODBC requests to the ODBC direct driver to access the TimesTen database.

  • The TimesTen server daemon manages incoming connections from remote client applications. Its behavior is much like the TimesTen daemon for local applications, but it allocates a server child process to access the database on behalf of the client.

Traditional client/server access is supported for functions such as reporting, or when a large number of application-tier platforms must share access to a common in-memory database.

All exchanges between client and server are sent over a TCP/IP connection. If the client and server reside on separate hosts in the internal network, they communicate by using sockets and TCP/IP. If both the client and server reside on the same machine, they can communicate more efficiently by using direct connections.

  • Client applications communicate with the TimesTen instance that provides the database.

  • With TimesTen Scaleout, an application using a client/server connection may run on a data instance or on any host with access to the external network. Client applications are automatically connected to a working data instance. See Database Connections in the Oracle TimesTen In-Memory Database Scaleout User's Guide.

See Working With TimesTen Databases in ODBC in the Oracle TimesTen In-Memory Database C Developer's Guide and Working With TimesTen Databases in JDBC in the Oracle TimesTen In-Memory Database Java Developer's Guide.

Driver Manager Connection

Applications can connect to the TimesTen database through an ODBC driver manager. A single application can use a driver manager to link with multiple different drivers.

The driver manager enables applications to operate independently of the database and to use interfaces that are not directly supported by TimesTen. An application uses an ODBC driver manager when it wants to use both direct and client-server connections concurrently to a database.

  • The TimesTen driver manager (provided as part of TimesTen) provides a transparent, low overhead option for TimesTen drivers. The TimesTen driver manager enables ODBC applications to use direct and client-server connections from the same process to a TimesTen database. The TimesTen driver manager supports XLA, the Routing API, the TimesTen Utility API and TimesTen ODBC extensions. See Introduction to the TimesTen Driver Manager in the Oracle TimesTen In-Memory Database C Developer's Guide.

  • A generic ODBC driver manager provides support for ODBC applications written for a different ODBC versions or for multiple RDBMS products with ODBC interfaces. Windows provides a standard ODBC driver manager. For Linux or UNIX, you have a choice of open source or commercial driver managers.

Note that there are performance considerations in using an ODBC driver manager. The performance considerations are minimal with the TimesTen driver manager.

See Connecting to TimesTen With ODBC and JDBC Drivers in the Oracle TimesTen In-Memory Database Operations Guide.