Introduction

Client config files

TimesTen XE supports both client/server and direct linked database connections.

TimesTen XE client/server connections can be over TCP or TCP/TLS.

Direct linked connections can only occur when the TimesTen XE client and server are on the same machine.  Direct linked connections are significantly faster than client/server connections.

TimesTen clients on Windows, MacOS, Linux, Solaris and AIX can connect to TimesTen XE servers on Linux using client config files.

Once the relevant TimesTen Client is installed, client/server connectivity is the same on Linux, Windows, macOS, AIX and Solaris.

A separate blog covers client/server without client config files.

 

 

All SQL APIs support client config files

All components supported with client config files

When client config files are used, all possible SQL APIs are supported.

 

 

 

TimesTen XE Server

TimesTen Server and ttcservers

The TimesTen XE client/server listener is called the TimesTen Server. The TimesTen Server is a database listener similar to the Oracle Net tnslsnr.

The TimesTen Server has a set of processes called ttcserver which listen for TimesTen client requests. The ttcserver processes can be single-threaded or multi-threaded.

By default, the TimesTen XE Server listens on TCP port 6625.

TimesTen XE ttStatus

In the above example, the TimesTen Server is listening on TCP port 6625 and had two connections to the sampledb database:

  • A direct linked connection of type process
  • A client/server TCP/IP connection from a machine called den03hhr
    • The connection is of type server as it is a ttcserver process

 

The TimeTen XE Server listens by default when the TimesTen XE daemon is started.

Configuraing and tuning the TimesTen XE Server will be covered in another blog.

 

 

Connection Metadata

Generic database client/server metadata

Conceptually, all database clients need the same metadata to connect to a remote database server.

Database client/server connection metadata

 

Client Config files

Client config file

Windows uses the ODBC Driver Manager to define connection metadata which gets stored in the Windows Registry.

All other platforms use the sys.odbc.ini config file to define the connection metadata.

 

 

Client DSNs and logical Server names

  • For ODBC databases, a Data Source Name is called a DSN
  • On the TimesTen Server machine, a server DSN defines a TimesTen database in the sys.odbc.ini config file
  • On the TimesTen Client machine, the connection metadata is defined as a client DSN
  • On Windows, the ODBC Data Source Administator defines the client DSN and logical server names
  • On Linux, macOS, Solaris and AIX client machines:
    • The client DSN is defined in the sys.odbc.ini [or odbc.ini] config file
    • The logical server name is also part of sys.odbc.ini

 

 

Windows Client

The Windows ODBC Data Source Administrator is used to define the client DSN and logical server names.  This connection metadata is then stored in the Windows Registry.

The following screen shots show how to configure the client DSN and logical servers name for a TimesTen XE server.

The configuration is the same for:

  • Windows 8.1
  • Windows 10
  • Windows 11
  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Start the ODBC Data Source Administrator [64 bit] on the Windows machine.

ODBC Data Source Administrator

Add a User DSN [client DSN]

 

Add TimesTen 22.1 Client for a user DSN

Choose TimesTen Client 22.1

 

Add Client DSN metadata

The client DSN is called sampleCS and it refers to logical server name sampledb_CS.

The User ID, Password and Connection Character Set are also defined.

 

Click on Servers to define the logical server name.

Add a TimesTen logical server name

Click on Setup to define the TimesTen logical server name.

 

Define the logical server name

Define the network address [hostname or IP address] and TCP port.  The logical server name will be sampledb_CS.

Click OK to accept the logical server name that you defined.

 

Logical server name

Click Close to save the logical server name that you defined.

 

Server DSN and Server Name defined

Define the Server DSN sampledb and {logical} Server Name sampledb_CS.

 

Verify TCP connectivity to the TimesTen XE server via the Test Oracle TimesTen Server Connection button.

Test Oracle TiesTen Server Connection

 

Verify that an ODBC database connection can be created via the Test Data Source Connection button.

Test Data Source Connection

 

Click OK to save the Client DSN and Server Name that you have defined.

Save the Client DSN

 

Finally test the new client DSN via the TimesTen Windows ttisql.exe executable.

Connect to the client DSN via ttisql

The following occurred in the above screen shot:

  • Changed directory to the TimesTen 22.1 bin directory
  • Set the TimesTen environment via the ttenv.bat script
  • Ran ttVersion to verify that the TimesTen environment was correctly set
  • Used the Client DSN sampledbCS to connect to the remote TimesTen XE Linux server 
    • The user name and password were defined in the Client DSN
    • You can override the any client attributes by adding the name/values to the connect string. eg
    • ttisql “dsn=sampledbCS;uid=scott”

 

 

Linux / macOS / Solaris / AIX Clients

client DSN

In the above picture, the following occurred:

  • ttisqlcs used a client DSN called sampledbCS
  • The sys.odbc.ini config file defined sampledbCS as a client/server driver
  • The client DSN in sys.odbc.ini for sampledbCS defined the network address + TCP port + server DSN of the TimesTen XE server

 

The following example uses the client DSN in ttisqlcs on a Timesten XE client machine to connect to a remote TimesTen XE server machine.

ttisqlcs client DSN example

In the above picture, the following occurred:

  • Changed dirctory to the TimesTen XE bin directory
  • Set the TimesTen XE environment via the ttenv.csh script
  • Ran ttVersion to verify that the TimesTen XE environment was correctly set
  • Ran ttisqlcs using the sampledbCS client DSN and using the user doug

The configuration of sys.odbc.ini for macOS, Solaris and AIX are exactly the same as for Linux.

 

 

Learn more about TimesTen XE:

 

More TimesTen XE Blogs

 

 

Summary

  • TimesTen XE uses TPC/IP for client/server database connections
  • The TimesTen XE connection metadata is similar to any other database
  • TimesTen client/server can be used with client config files to support all SQL APIs
  • The connection string metadata is the same for Windows, macOS, Linux, Solaris and AIX
  • The Linux, macOS, Solaris and AIX config files are exactly the same
  • Windows uses the ODBC Data Source Administrator and the Windows Registry instead of config files
  • Direct linked connections do not use TCP/IP and are significantly faster

 

Disclaimer: These are my personal thoughts and do not represent Oracle’s official viewpoint in any way, shape, or form.