ORACLE TNS Configuration

TNS Connections

The TNS connection type is an appropriate option in any of the following circumstances:

  1. You have an Oracle client installed on your machine.
  2. You have access to many Oracle Database instances.
  3. 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:

  1. $HOME/.tnsnames.ora
  2. $TNS_ADMIN/tnsnames.ora
  3. /etc/tnsnames.ora (non-Windows systems)
  4. $ORACLE_HOME/network/admin/tnsnames.ora
  5. 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:

  1. In the New / Select Database Connection dialog box, enter the same connection name, username, and password you used for the basic connection.
  2. 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.
  3. Click Test and Connect as before.

Comments

Popular posts from this blog

Decompiling Delphi - 3

Decompiling Delphi - 2

Artificial Intelligence, Oxymoron and Natural Intelligence