Connections

Data connections contain the definitions needed to establish a connection to a data source. Furthermore, data connections offer several advantages:

  • A data connection can generate the required connection string automatically, e.g. by dragging the connection into a template (see chapter "Data connections"). This means that you don't have to repeatedly enter connection strings manually.

  • Data connections allow you to store frequently used access data for establishing a connection, so you don't need to define it over and over (see chapter "Choose connection to database").

  • You can use connections to encrypt access data in a connection string.

  • You can protect data for data sources with a password to prevent unauthorized access.

Prerequisites

To create a data connection, you have to use a specific Wizard that knows how to connect to a particular data source.

For example, to create connections to Microsoft SQL Server databases the Tricentis TDM Studio Wizard for Microsoft SQL Server must be installed and available. This also applies for all other database systems that Tricentis TDM Studio supports.

You can use the following database access Wizards, which are available in an installation of Tricentis TDM Studio:

  • Tricentis TDM Studio Wizard for Microsoft SQL Server

  • Tricentis TDM Studio Wizard for Oracle Databases

  • Tricentis TDM Studio Wizard for IBM DB2 for z/OS

  • Tricentis TDM Studio Wizard for IBM DB2 for LUW

Set up new connections

You can set up new connections in TDM Studio.

For example, you can set up a connection to an Oracle database that uses an installed ODBC driver, establishes the connection through a configured DSN, or uses direct access without ODBC.

To set up a new data connection, follow the steps below:

  1. Expand the Connections pane on the right side of TDM Studio.

  2. Right-click in the pane and select New from the context menu.

  3. Select your connection type from the subsequent context menu.

  4. In the Connection Unit dialog, enter the connection description and details.

Set up connection

If you set up an Oracle Native or ODBC connection and have configured your Oracle Client using a tnsnames.ora file, you have to enter the Transparent Network Substrate (TNS) service name into the Host name field.

The subsequent Data Connection dialog displays general details about the elements in the Connections pane and options specific to the selected connection.

Encrypt connections

You can encrypt your connections to prevent unauthorized access. Encrypted connections are not displayed as clear text. If you drag an encrypted connection from the Connections pane into a template, the string is not readable. However, it can be passed to functions such as OpenODBCConnection() in the same way as human-readable strings. The functions recognize whether the string is encrypted and decrypt it if necessary, i.e. when the task that contains the template is executed.

The encryption uses the Rijndael algorithm for encrypting strings used in TDM Studio.

If the encryption is also password-protected, you have to enter the password during the execution of the task or the execution is terminated. This ensures that only authorized users can access the data source or view and modify the data connection itself.

To encrypt a connection, follow the steps below:

  1. In the Connection Unit dialog, click on Protect....

  2. In the subsequent Encryption Settings dialog, select Encrypt the settings of the connection.

  3. Optionally, select Use password to decrypt the settings. Specify and confirm the password in the respective fields.

  4. Click OK.

Encrypt and password protect connection

Use connections

You can use your newly created data connections in two different contexts:

  • Manually created templates can use a data connection if you drag and drop it from the Connections pane into the template. In this case, the data connection acts like a code snippet. The connection string that needs to be entered into the function for accessing the data sink (e.g. OpenODBCConnection()) is inserted into the template.

  • Data connections are also required for the Tricentis TDM Wizard for Databases. The Wizard requests a connection in order to read the structure of the data sink and to create tasks and templates which write to or read from the data sink (see chapter "Choose connection to database").

You can only drag and drop connections if you have installed the appropriate driver for the selected database.