what is the listeners?

Listeners:
• It is an observer.
• When a client request comes, the listener first receives it. And then it establishes a connection between the client and the database instance.
• Once the client is connected to the database instance successfully, it hands over the client connection to the server process.
• If the listener stops running, you cannot connect to the Oracle Database any more.
• Listener can handle the 100 connections.
• Default port number is 1521
• Location of the listener file
 $ORACLE_HOME/network/admin
To verify the up and running listener
ps -ef | grep tns
[oracle@localhost ~]$ ps -ef | grep tns
root 36 2 0 09:24 ? 00:00:00 [netns]
oracle 7293 3675 0 10:06 ? 00:00:00 /u01/app/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle 7320 7234 0 10:06 pts/0 00:00:00 grep --color=auto tns
Oracle Listener control commands
Listener Status
The status of the listener such as alias, version, start date, uptime, trace file, security, listener parameter files listener log files and listening endpoint summary.
Syntax: lsnrctl status listenername
[oracle@localhost ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 18-MAY-2021 10:06:28
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 18-MAY-2021 10:06:18
Uptime 0 days 0 hr. 0 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Listener Start:
Use the start command to bring up the listener:
Syntax: lsnrctl start listenername
[oracle@localhost ~]$ lsnrctl start listener
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 18-MAY-2021 10:06:16
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting /u01/app/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 18-MAY-2021 10:06:18
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Listener Stop:
Syntax: lsnrctl stop listenername
[oracle@localhost ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 18-MAY-2021 10:07:36
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
The command completed successfully

Comments

Popular posts from this blog

How To Check Alert Log File in Oracle?

How To Enable/Disable Archive Log Mode In Oracle Database?