Oracle Database - tnsnames.ora

Card Puncher Data Processing

About

Located primarily on the clients, this file contains net service names mapped to connect descriptors and is a part of the local naming method in order to make a database connection.

If the file is not found in the directory specified by the TNS_ADMIN, then Oracle Net will check the ORACLE_HOME/network/admin directory.

Example

Simple format

net_service_name =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oel11g)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.localdomain)
    )
  )

Cluster TNS name

RAC1 =
(
   DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = HOST_RAC1)(PORT = 1521))
     (ADDRESS = (PROTOCOL = TCP)(HOST = HOST_RAC2)(PORT = 1521))
     (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = MY_RAC_SERVICE_NAME)
     )
)

Location

The tnsnames.ora file is located in the $Oracle_Home\Network\Admin\ directory.

Configuration

The Tnsnames must be in the directory given by the TNS_ADMIN directory.

echo %TNS_ADMIN%
D:\svn\Config\Oracle Database





Discover More
Obiee Connection Pool
OBIEE 10G/11G - Oracle Call Interface (OCI) configuration

This page shows you how to install an OCI driver with OBIEE. To use it you have to install it on the BI Server machine through an Oracle Client installation (for instance an Oracle Database, an...
Card Puncher Data Processing
Oracle Database - Easy Connect Method with host, port and service name (EZCONNECT)

The easy connect method is one of the naming method to get all the data needed to identified the location of the database. The easy connect naming method eliminates the need for service name lookup in...
Hs Odbc Excel Define Name
Oracle Database - How to read data through an ODBC connection with Gateway (Heterogeneous services)

This article is aimed to show how you can access data from oracle database via an odbc connection direct by using the gateway odbc agent (or program) generic connectivity. In this example, an odbc connection...
Card Puncher Data Processing
Oracle Database - Local Naming Method

The local naming method stores net service names and their connect descriptors in a localized (on each individual client's) configuration file named tnsnames.ora to locate network addresses. Local naming...
Card Puncher Data Processing
Oracle Database - Naming method (naming resolution method)

The Oracle Net Services naming method is resolution method used by a client application to resolve a connect identifier to a connect descriptor when attempting to connect to a database service. They...
Card Puncher Data Processing
Oracle Database - Net Service Name (tnsname)

A simple name for a service that resolves to a connect descriptor. Users initiate a connect request by passing a user name and password, along with a net service name in a connect string, for the service...
Card Puncher Data Processing
Oracle Database - Oracle Net Configuration Assistant

Oracle Net Configuration Assistant is provided primarily to configure basic network components during installation, including: Listener names and protocol addresses Naming methods the client will...
Card Puncher Data Processing
Oracle Database - Session Data Unit (SDU) parameter

SDU is a buffer that Oracle Net uses to place data before transmitting it across the network. Oracle Net sends the data in the buffer either when requested or when it is full. Under typical database configuration,...
Oracle Database File Location Variable
Oracle Database - System Identifier (SID)

The System Identifier (SID) identifies a specific database instance. The SID uniquely distinguishes the instance from any other instance on the same computer. Each database instance requires a unique SID...
Card Puncher Data Processing
Oracle Database - TNS Ping Utility

tnsping is an utility to verify that the net service name are resolved and find in the tnsnames.ora



Share this page:
Follow us:
Task Runner