ORACLE TNS Configuration
TNS Connections
The TNS connection type is an appropriate option in any of the following circumstances:
- You have an Oracle client installed on your machine.
- You have access to many Oracle Database instances.
- You do not know the machine details of the system hosting the Oracle Database instance you want to connect to.
A TNS connection uses an alias entry from a tnsnames.ora file. Oracle SQL Developer uses only one tnsnames.ora file. You may have more than one on your local machine or want to use the tnsnames.ora file on a remote machine, so note that Oracle SQL Developer looks sequentially for the tnsnames.ora file in the following locations:
- $HOME/.tnsnames.ora
- $TNS_ADMIN/tnsnames.ora
- /etc/tnsnames.ora (non-Windows systems)
- $ORACLE_HOME/network/admin/tnsnames.ora
- Registry key
On Windows systems, if a tnsnames .ora file exists but Oracle SQL Developer isn't using it, create a TNS_ADMIN environment variable via Control Panel -> System -> Advanced -> Environment Variables, specifying the file's location as the variable's value.
Follow these steps to create a TNS connection in Oracle SQL Developer:
- In the New / Select Database Connection dialog box, enter the same connection name, username, and password you used for the basic connection.
- Select TNS from the Connection Type list. The GUI changes slightly to provide a list of all network alias entries available to you. Select an alias.
- Click Test and Connect as before.
Comments
Post a Comment