The tnsnames.ora file contains information needed to connect to the Oracle servers.
For our system, the location for this is: d:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
The following shows the contents of a tnsnames.ora file. The first entry defines the connection information to database XE. There can be multiple entries such as these if you wish to connect to multiple databases.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORASERV)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)