Archive for the ‘Listener’ Category

Oracle Listener and Service Name

Oracle Net Listener

The one operation unique to the Oracle database server side is the act of receiving the initial connection through an Oracle Net listener. The Oracle Net listener, commonly known as the listener, brokers a client request, handing off the request to the server. The listener is configured with a protocol address. Clients configured with the same protocol address can send connection requests to the listener. Once a connection is established, the client and Oracle database server communicate directly with one another.

Listener Control utility

The Listener Control utility enables you to administer listeners.You can use its
commands to perform basic management functions on one or more listeners.
Additionally, you can view and change parameter settings.

For a majority of commands, the Listener Control utility establishes an Oracle Net
connection with the listener that is used to transmit the command. To initiate an Oracle
Net connection to the listener, the Listener Control utility needs to obtain the protocol
addresses for the named listener or a listener named LISTENER. This is done by
resolving the listener name with one of the following mechanisms:
■ listener.ora file in the directory specified by the TNS_ADMIN environment
variable mostly in $ORACLE_HOME/network/admin directory on UNIX.
■ Naming method, for example, a tnsnames.ora file
If the listener name is LISTENER and it cannot be resolved, a protocol address of
TCP/IP, port 1521 is assumed.

The Listener Control utility supports several types of commands:

LSNRCTL> HELP
The following operations are available
An asterisk (*) denotes a modifier or extended command:
change_password
exit
quit
reload
services
set*
show*
spawn
start
status
stop
trace
version

LSNRCTL> SET
The following operations are available with set.
current_listener
displaymode
inbound_connect_timeout
log_file
log_directory
log_status
password
raw_mode
save_config_on_stop
startup_waittime
trc_file
trc_directory
trc_level

LSNRCTL> SET LOG_STATUS on

LSNRCTL> SET LOG_DIRECTORY /usr/oracle/admin

 

Net Service Name

A net service name is an alias that is used for a connect descriptor. To access a net service (such as a database) across the network, a net service name is required.

net service names are either found in the tnsnames.ora file

· Directory server

· Oracle Names Server

· External Naming services

Oracle Network Issues Link

Network DBA

This link contains common network issues for Oracle Connectivity along with brief description of network files.

NETWORK DBA 

1. LISTENER.ORA file

It is a server side file and contains information regarding network configuration parameters. It can be found in the ORACLE_HOME/network/admin directory on the server.

Sample File

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  )

 

If listener is modified then the listener should be restarted or reloaded to allow the new configuration to take place.  Basic commands of Listener control utility are as follows:

LSNRCTL>start   LSNRCTL>stop  LSNRCTL>reload LSNRCTL>status LSNRCTL>show

 

2.TNSNAMES.ORA file

It is a Client side file which is created on both sites SERVER/CLIENT. It contains client side network configuration parameters.It can be found in the ORACLE_HOME/network/admin. It can be found on the server if client style connections are used on the server side.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

3. SQLNET.ORA file

It is a Client side file which is created on both sites SERVER/CLIENT. It is use for user AUTHENTICATION purpose.

SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

 

Another good link for commonly known TNS errors from

Emre Baransel – Oracle Blog