1. location of TNSnames.ora
C:\app\dingl\product\11.2.0\client_1\network\admin\tnsnames.ora
2. Use of the TNSnames.ora
Oracle provides a utility called tnsping:
the rest commands like sqlplus/sqlldr all use it.
R:\>tnsping someconnection
TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 27-AUG-20
08 10:38:07
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
C:\Oracle92\network\ADMIN\sqlnet.ora
C:\Oracle92\network\ADMIN\tnsnames.ora
TNS-03505: Failed to resolve name
R:\>
R:\>tnsping entpr01
TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 27-AUG-20
08 10:39:22
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
C:\Oracle92\network\ADMIN\sqlnet.ora
C:\Oracle92\network\ADMIN\tnsnames.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = **)
(PROTOCOL = TCP) (Host = ****) (Port = 1521))) (CONNECT_DATA = (SID = ENTPR0
1)))
OK (40 msec)
R:\>
This should show what file you're using. The utility sits in the Oracle bin
directory.
http://docs.oracle.com/cd/A59447_01/nt_804ee/doc/network.804/a55913/apc.htm
3.Oracle Network Products use the following configuration files:
On Your Server | On Your Client |
---|---|
CMAN.ORA | SQLNET.ORA |
LISTENER.ORA | TNSNAMES.ORA |
SQLNET.ORA |
|
TNSNAMES.ORA |
|
Below is a description of the configuration files:
A description of how the files are created is described below: