Oracle Database - tnsnames.ora
Table of Contents
1 - 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.
2 - Articles Related
3 - Example
3.1 - Simple format
net_service_name =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oel11g)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
3.2 - 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)
)
)
4 - Location
The tnsnames.ora file is located in the $Oracle_Home\Network\Admin\ directory.
5 - Configuration
The Tnsnames must be in the directory given by the TNS_ADMIN directory.
echo %TNS_ADMIN%
D:\svn\Config\Oracle Database