Oracle TNS Alias OCI Configuration
- Aryn Wiebe
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.
Â