Oracle uses three files (listener.ora, tnsnames.ora & sqlnet.ora) for network configuration.
Listener.ora
The listerner.ora file contains server side network configuration parameters.
It can be found in the ORACLE_HOME/network/admin directory on the server.
EXAMPLE Listener.ora file:
-------------LINUX----------------
# listener.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = edrserver)(PORT = 1521))
)
)
)
-------------WINDOWS----------------
# listener.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Ntws205.rmsi.com)(PORT = 1521))
)
)
)
==================================================================================
After any changes/modifications in the listener.ora file
the listener should be restarted or reloaded to allow the new configuation to take effect.
[oracle@edrserver admin]$lsnrctl stop
[oracle@edrserver admin]$lsnrctl start
or
[oracle@edrserver admin]$lsnrctl reload
Tnsnames.ora
The tnsnames.ora file contains client side network configuration parameters. It can be found in the ORACLE_HOME/network/admin directory on the client. This file will also be present on the server if client style connections are used on the server itself.
Example of a tnsnames.ora file:
--------------WINDOWS--------------------
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
EDR_205 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ntws205.rmsi.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = edr)
(SERVER = DEDICATED)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
----------------LINUX----------------------
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
EDR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = edrserver)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = edr)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
NOTE: There are two names “EDR_205” which is called as “TNS_ENTRY” which we use with the connect string like “username/pwd@TNS_ENTRY” & “EDR” which is the service_name (instance_name).
=================================================================================
Sqlnet.ora
The sqlnet.ora file contains client side network configuration parameters. It can be found in the ORACLE_HOME/network/admin directory on the client. This file will also be present on the server if client style connections are used on the server itself.
Example of an sqlnet.ora file:
# sqlnet.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
====================================
You can find some of the Network related issues and their solutions in the following link:
Error codes and solutions
Look in:
Tuesday, March 04, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment