Monday, September 12, 2011

Registering Information with a Nondefault Listener


If you want PMON to register with a local listener that does not use TCP/IP, port 1521, configure the LOCAL_LISTENER parameter in the initialization parameter file to locate the local listener.


For a shared server environment, you can alternatively use the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file to register the dispatchers with a nondefault local listener. Because both the LOCAL_LISTENER parameter and the LISTENER attribute enable PMON to register dispatcher information with the listener, it is not necessary to specify both the parameter and the attribute if the listener values are the same.


STEPS


For example, if the listener is configured to listen on port 1421 rather than port 1521, you can set the LOCAL_LISTENER parameter in the initialization parameter file as follows:


Step 1  Listener.ora file


LISTENER=
       (Description_list=
       (Description=
        (Address= (protocol=tcp)(host=server)(port=1421) )

        (Address= (protocol=ipc)(Key=extproc) )
       )

       )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
  )


Step 2

You can then resolve listener1 in the local tnsnames.ora as follows:
listeneralias is then resolved to the listener protocol addresses through a naming method, such as a tnsnames.ora file on the database server.
listener1=   (DESCRIPTION=    (ADDRESS=(PROTOCOL=tcp)(HOST=servername)(PORT=1421)))
 
Step 3

Set the LOCAL_LISTENER parameter in parameter file as follows:
alter system set LOCAL_LISTENER='listener1' OR
If you dont use tnsnames.ora entry
alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=tcp)(HOST=servername)(PORT=1421))'  
Step 4   (if Dispatcher configure to non default listener)
To register Dispatcher to non default listener as follows:
alter system set DISPATCHERS="(PROTOCOL=tcp)(DISPATCHERS =2)(LISTENER=listener1)" 
 
Listener Control Utility STATUS Command

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.0.2
Start Date 15-NOV-2009 20:22:00
Uptime 0 days 0 hr. 5 min. 22 sec
Trace Level support
Security OFF
SNMP OFF
Listener Parameter File /oracle/admin/listener.ora
Listener Log File /oracle/network/log/listener.log
Listener Trace File /oracle/network/trace/listener.trc
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=sales-server)(PORT=2484)))

Services Summary...
Service "sales.us.example.com" has 1 instance(s).
Instance "sales", status READY, has 3 handler(s) for this service...
Service "hr.us.example.com" has 1 instance(s).
Instance "hr", status READY, has 2 handler(s) for this service...
The command completed successfully
 
 
The name of the instance associated with the service along with its status and number of service handlers associated with the service
Status can be one of the following:
  • A READY status means that the instance can accept connections.
  • A BLOCKED status means that the instance cannot accept connections.
  • A READY/SECONDARY status means that this is a secondary instance in an Oracle Real Application Clusters primary/secondary configuration and is ready to accept connections.
  • An UNKNOWN status means that the instance is registered statically in the listener.ora file rather than dynamically with service registration. Therefore, the status is not known.

No comments:

Post a Comment