Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Client ODBC

Data source name (DSN) configuration

  • Last UpdatedJan 04, 2023
  • 4 minute read

A data source name (DSN) is a data structure that contains the information about a specific database that an ODBC driver needs in order to connect to it. The DSN includes the name, directory, driver of the database, and, depending on the type of DSN, the ID and password of the user. Once a DSN is configured, the ODBC client can reference it to make the connection.

In contrast, a connection that does not use a DSN requires that all the connection information be specified within the ODBC client using a connection string.

DSNs can be configured using the ODBC Data Source Administrator. On a 64-bit Windows system, there is a 32-bit and a 64-bit ODBC Data Source Administrator so that DSNs for 32-bit connections and 64-bit connections can be configured separately.

To configure a DSN for PI SQL Client ODBC, open the ODBC Data Source Administrator on your machine. Select the tab for the type of DSN you want and click Add. Select PI SQL Client, click Finish, and then complete the fields on the PI ODBC DSN Configuration window.

ODBC Data Source definition

The following table provides details about the fields in the ODBC Data Source area of the PI ODBC DSN Configuration window for PI SQL Client.

Field

Description

Name

A unique name identifying the DSN. Once you save the DSN, you cannot change the name.

Description

A description to further identify the DSN.

Connection tab

The following table provides details about the fields on the Connection tab.

Field

Description

AF Server

PI AF server name or Data Archive name. Required.

AF Database

Enter the AF database to connect to. Required.

Trusted Connection

Check this box to specify that the driver will request a secure (or trusted) connection to a PI SQL Data Access Server (RTQP Engine) instance. When selected, PI SQL Client ODBC uses integrated login security to establish connections using this data source. Any login ID or password supplied is ignored.

User

The User ID to use for authentication when you log on to the data source.

Password

The password to use for authentication when you log on to the data source.

Test Connection

Click the button to test the connection information you entered.

Advanced tab

The following table provides details about the fields on the Advanced tab.

Field

Description

Initial Catalog

Enter the initial catalog.

Note: By default, the data model for PI SQL Client consists of one catalog - Master. This catalog contains a set of tables and table-valued functions. For information about how to create other catalogs, see the PI SQL Commander Lite User Guide.

Time Zone

Defaults to Local. You can select a specific time zone used for parsing of timestamp literals and for rendering of timestamp column values.

Query Date

Defaults to Latest. You can enter any PI time expression. See the PI Server topic, PI time.

Locale

Enter the culture (locale) for the connection. The locale determines:

  • Decimal point and group separator for conversion from string to float/double

  • Decimal point for the conversion from float/double to string

  • Decimal point and group separator for Format function used with double

  • The following for Format function used with DateTime:

    • Date separator

    • Time separator

    • Day names

    • Abbreviated day names

    • Month names

    • Abbreviated month names

    • Era names

    • AM/PM designator names

      Defaults to Invariant, which is associated with the English language, but not with any country or region. You can enter a specific locale. For a list of locales available in Windows, see the last table in the Microsoft article: Windows Language Code Identifier Reference: Appendix A.

Command Timeout

Enter the command timeout in seconds. Enforces the command timeout for all commands, even if ODBC statement query timeout was specified.

Network

Define the network protocols to use and set the order in which to use them.

By default, there are two protocols defined: one for HTTPS on port 5464 and one for Net.TCP on port 5465. You can have one of each type defined. If you do not want to use a protocol, delete it to remove it from the list.

Click on a protocol to select it, then click the button for the action you want to perform.

  • Click Up to move the protocol up in the order.

  • Click Down to move the protocol down in the order.

  • Click Edit to change the port number.

  • Click Delete to remove the protocol.

  • If you have deleted a protocol and want to add it again, click Add.

Workarounds tab

The following table provides details about the fields on the Workarounds tab.

Field

Description

Maximum String

Specifies the maximum string size to be returned, because some clients may not handle long string correctly. Use 0 for unlimited size. Defaults to 4000.

Variant as String

Check this box to expose original Variant columns as String columns.

GUID as String

Check this box to expose original GUID columns as String columns.

TitleResults for “How to create a CRG?”Also Available in