4.7.Oracle 10g Instant Client: Connection String Formats

The Oracle 10g Instant Client can be used in OpenLink single-tier and multi-tier environments. In a three-tier configuration, an OpenLink Oracle 10g agent residing on the middle-tier can use the Instant Client to connect to an Oracle instance on the third tier.

Instant Client allows you to run applications without installing the standard Oracle client (SQL*Net or Net8) or having an ORACLE_HOME. It supports two basic connection string formats:

  • //host:[port][/service name]

    • e.g. //dbase-server-5:4321/ORDERS

  • an Oracle Net keyword-value pair such as

    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=dlsun242)
        (PORT=5521)) (CONNECT_DATA=(SERVICE_NAME=bjava21)))

Naming methods that require a configuration file (such as tnsnames.ora or sqlnet.ora) for name translation can also be used if the environment variable TNS_ADMIN is set to point to the directory containing the file.

4.7.1.OpenLink Single-Tier Connections using Instant Client

Examples of accepted connection parameters settings are shown below.

Defining a DSN using the OpenLink Single Tier DSN Configuration Wizard

1) Using a local NET service name TNS_ADMIN must point a directory containing to a tnsnames.ora file to allow translation of the local NET service name to an Oracle connect descriptor.

Table4.1.

Connection String: O10G-TAF
Login ID: scott
Password: tiger

2) Using a connect URL string

Table4.2.

Connection String: //192.168.203.11:1521/O10G
Login ID: scott
Password: tiger

3) Using an Oracle NET connect descriptor

Table4.3.

Connection String: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.203.11)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=O10G)))
Login ID: scott
Password: tiger

All the above forms for the 'Connection String' field can also be appended to the Login ID using an '@' separator. The password can be supplied separately, or appended to the Login ID string using '/' as a separator.

4) Using a local NET service name appended to Login ID TNS_ADMIN must point a directory containing to a tnsnames.ora file to allow translation of the local NET service name to an Oracle connect descriptor.

Table4.4.

Login ID: scott@O10G-TAF
Password: tiger

5) Using a connect URL string appended to Login ID

Table4.5.

Login ID: scott/tiger@//192.168.203.11:1521/O10G
Password: &<blank>

6) Using an Oracle NET connect descriptor appended to Login ID

Table4.6.

Login ID: scott@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.203.11)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=O10G)))
Password: tiger

4.7.2.Oracle Instant Client Related Links

Oracle documentation: connection string formats
Oracle 10g Instant Client