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

PI SQL Client ODBC

Configure the Oracle database for gateway access (tnsnames​.ora)

Configure the Oracle database for gateway access (tnsnames​.ora)

  • Last UpdatedJan 04, 2023
  • 1 minute read

Before you use the gateway to access an ODBC data source, you must configure the Oracle database to enable communication with the gateway over Oracle Net.

To configure the Oracle database, add connection descriptors to the tnsnames.ora file.

By default, this file is in ORACLE_HOME\network\admin, where ORACLE_HOME is the directory in which the Oracle database or Gateway is installed. You cannot use the Oracle Net Assistant or the Oracle Net Easy Config tools to configure the tnsnames.ora file; you must edit the file manually.

Examples

# tnsnames.ora Network Configuration File: C:\WINDOWS.X64_180000_db_home\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

pi =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora2gtw.osisoft.int)(PORT = 1521))
)
(CONNECT_DATA =
(SID = pisqlclient)
)
(HS = OK)
)

Where:

Variable

Description

pi

The connect descriptor for DG4ODBC. You include this entry when creating the database link with SQL*Plus.

The SID_NAME is referenced from listener.ora.

PROTOCOL

TCP is used as the protocol for TCP/IP connections.

HOST

Specifies the machine where the gateway is running.

PORT

Matches the port number used by the Oracle Net Listener that is listening for the gateway. The Oracle Net Listener's port number can be found in the listener.ora file used by the Oracle Net Listener.

SID

Specifies the SID of the gateway and matches the SID specified in the listener.ora file of the Oracle Net Listener that is listening for the gateway.

HS = OK

Specifies that this connect descriptor connects to a non-Oracle system.

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