/
Oracle TNS Alias OCI Configuration

Oracle TNS Alias OCI Configuration

When connecting to Oracle using the OCI Driver, you can create a TNS Alias configuration to use in your database connection object in IguanaX. This method will work with all operating systems.

The Oracle ODBC package depends on the OCI drivers — so you need to set them up first. Follow the procedure in: Oracle OCI Driver Setup.

If the network admin directory does not exist, create it within your instantclient directory:

  • Windows: C:\Oracle\instanclient_X_Y\network\admin

  • Linux: /usr/lib/instanclient_X_Y/network/admin

Your database name (or tns_alias) can be defined in the Network Configuration File, tnsnames.ora. This file uses the following format:

<tns_alias>= (DESCRIPTION= (ADDRESS=(PROTOCOL = TCP)(HOST = hostname)(PORT = portnum)) (CONNECT_DATA= (SERVICE_NAME= <service_name>)))

For example:

 

If sqlnet.ora does not exist, create it.

This tells the Oracle client to time out if a connection to the Oracle server cannot be obtained within the specified number of seconds (the example uses 5 seconds). The default is to never time out, which can cause problems if the server is down or cannot be reached.

 

Related content

Oracle OCI Driver Setup
Oracle OCI Driver Setup
More like this
Microsoft SQL Server ODBC Setup
Microsoft SQL Server ODBC Setup
More like this
Connecting to Databases
Connecting to Databases
More like this
MySQL ODBC Setup
MySQL ODBC Setup
Read with this
Oracle ODBC Setup
Oracle ODBC Setup
More like this
MySQL libmysql Setup
MySQL libmysql Setup
Read with this