Listener process in Oracle
if you would like execute 2 or more command at a time then enter command with semicolon.
hostname ; uname -a ; echo $ORACLE_HOME ; echo $ORACLE_SID
hostname && ps -ef | grep pmon
The point we are explaining will applies both for RAC and Non - RAC environment.
Understanding the Oracle Database listener process.
=======================================
1) Listener is responsible for accepting the first time connection request and the subsequent handoff between user and the server process.
(Whenever a client process request a connection , the connect request is routed to the listener and then listener further hands it off over to dedicated or multi threaded server configuration to the oracle instance.
once when the address is forwarded to the client then client can directly start interacting with the server process or with the dispatcher process depending whether you run dedicated server connection or a multi threaded server connection. )
2)Normally run from same server as the database server . We can also make necessary configuration
changes to run the listener from different host than the database server itself but this is not a very common practice in single instance(NON Rac) environments.
3) one database can have multiple listeners.( all will be having different ports for incoming connection request.) .( it is common practice that one listener listening for multiple databases)
4) one listener can listen for connection requests made for multiple databases. (means One listener can listen for multiple databases.)
5)Dynamic Service registration with locally available Default Listner.
6)Dynamic service registration with locally available Non - Default Listener.
7)Dynamic service registration with Remotely available Listener (Default/Non-Default)
=====================
Lets consider a environment.
hostname : oracle3
$Oracle_home : /netappfiler/app/oracle/product/10.2.0
$ORACLE_SID=TEST.
The recommanded way to edit the listener file is only through utility Netmgr or netca.
netmgr or netca is the tool used for configuring the listener.
The default port of a listener is always 1521. if a protocol is TCP/IP and port is 1521 then we call it as default listener.
when either of these are not true , then such listener would be called as non-default listener.
if lsnrctl start is used for starting up the listener then by default it start Listener named process. if listener name is different then you have to mention the listener name
Following is output of command lsnrctl start.
This picture show Listner named "LISTENER" running on the host Oracle3 on port 1521 with tcp protocol.
you can readily verify using lsof -i tcp:1521(should be run as root)
This command will give me who is listening actively on port number 1521 using protocol TCP.
This will provide me details of the pid of the OS process the currently listening on this port 1521
The listener support no services means "listener doesn't aware of any process that is running on the server."
you can see in the above diagram command tnslsnr is listening on 1521 and it's process id 5541
(LISTEN) means currently it is in listening mode.
you can get status of the listener by entering command "Listener status"
instance name is TEST. What you can understand by this out put is Listener is aware of instance TEST
The responsibility of registering the running instance with default listener running on the host is with pmon process of that instance. means who has done this registration it is the pmon process done this registration.
hence my listener is aware about the instace TEST running on the same host. if it is not aware and if pmon is taking some time for the registration. you can do that registration manually by saying
" Alter system register" by loggin into database.
PMON is responsible for registering the INSTANCE with the DEFAULT LISTENER.
When PMON register instance with the default listener ?
During startup or periodically PMON will wake up and check whether we have running a DEFAULT LISTENER on the same host . if found it will register. this is called Dynamic service registration with locally availabe default listener
if you would like execute 2 or more command at a time then enter command with semicolon.
hostname ; uname -a ; echo $ORACLE_HOME ; echo $ORACLE_SID
hostname && ps -ef | grep pmon
The point we are explaining will applies both for RAC and Non - RAC environment.
Understanding the Oracle Database listener process.
=======================================
1) Listener is responsible for accepting the first time connection request and the subsequent handoff between user and the server process.
(Whenever a client process request a connection , the connect request is routed to the listener and then listener further hands it off over to dedicated or multi threaded server configuration to the oracle instance.
once when the address is forwarded to the client then client can directly start interacting with the server process or with the dispatcher process depending whether you run dedicated server connection or a multi threaded server connection. )
2)Normally run from same server as the database server . We can also make necessary configuration
changes to run the listener from different host than the database server itself but this is not a very common practice in single instance(NON Rac) environments.
3) one database can have multiple listeners.( all will be having different ports for incoming connection request.) .( it is common practice that one listener listening for multiple databases)
4) one listener can listen for connection requests made for multiple databases. (means One listener can listen for multiple databases.)
5)Dynamic Service registration with locally available Default Listner.
6)Dynamic service registration with locally available Non - Default Listener.
7)Dynamic service registration with Remotely available Listener (Default/Non-Default)
=====================
Lets consider a environment.
hostname : oracle3
$Oracle_home : /netappfiler/app/oracle/product/10.2.0
$ORACLE_SID=TEST.
The recommanded way to edit the listener file is only through utility Netmgr or netca.
netmgr or netca is the tool used for configuring the listener.
The default port of a listener is always 1521. if a protocol is TCP/IP and port is 1521 then we call it as default listener.
when either of these are not true , then such listener would be called as non-default listener.
if lsnrctl start is used for starting up the listener then by default it start Listener named process. if listener name is different then you have to mention the listener name
Following is output of command lsnrctl start.
This picture show Listner named "LISTENER" running on the host Oracle3 on port 1521 with tcp protocol.
you can readily verify using lsof -i tcp:1521(should be run as root)
This command will give me who is listening actively on port number 1521 using protocol TCP.
This will provide me details of the pid of the OS process the currently listening on this port 1521
The listener support no services means "listener doesn't aware of any process that is running on the server."
you can see in the above diagram command tnslsnr is listening on 1521 and it's process id 5541
(LISTEN) means currently it is in listening mode.
you can get status of the listener by entering command "Listener status"
instance name is TEST. What you can understand by this out put is Listener is aware of instance TEST
The responsibility of registering the running instance with default listener running on the host is with pmon process of that instance. means who has done this registration it is the pmon process done this registration.
hence my listener is aware about the instace TEST running on the same host. if it is not aware and if pmon is taking some time for the registration. you can do that registration manually by saying
" Alter system register" by loggin into database.
PMON is responsible for registering the INSTANCE with the DEFAULT LISTENER.
When PMON register instance with the default listener ?
During startup or periodically PMON will wake up and check whether we have running a DEFAULT LISTENER on the same host . if found it will register. this is called Dynamic service registration with locally availabe default listener
No comments:
Post a Comment