Archive for February, 2015
Oracle LSNRCTL – Listener Shutdown and Startup Procedures
February 17th, 2015, posted in Linux OS, Oracle
Starting up and shutting down the oracle listener is a routine task for a database administrator. However a Linux system
administrator or programmer may end-up doing some basic DBA operations on development database. It is critical for non-DBAs to understand the basic database admin activities.
In this article, let us review how to start, stop, check status of an oracle listener using Oracle listener control utility LSNRCTL.
How To Start, Stop and Restart Oracle Listener
1. Display Oracle Listener Status
Before starting, stopping or restarting make sure to execute lsnrctl status command to check the oracle listener status as shown below. Apart from letting us know whether the listener is up or down, you can also find the following valuable information from the lsnrctl status command output.
- Listner Start Date and Time.
- Uptime of listner – How long the listener has been up and running.
- Listener Parameter File – Location of the listener.ora file. Typically located under $ORACLE_HOME/network/admin
- Listener Log File – Location of the listener log file. i.e log.xml
If the Oracle listener is not running, you’ll get the following message.
lsnrctl status
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:39
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
If the Oracle listener is running, you’ll get the following message.
$ lsnrctl status LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:02 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production Start Date 29-APR-2009 18:43:13 Uptime 6 days 21 hr. 43 min. 49 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.1.0/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) Services Summary... Service "devdb" has 1 instance(s). Instance "devdb", status UNKNOWN, has 1 handler(s) for this service... Service "devdb.thegeekstuff.com" has 1 instance(s). Instance "devdb", status READY, has 1 handler(s) for this service... Service "devdbXDB.thegeekstuff.com" has 1 instance(s). Instance "devdb", status READY, has 1 handler(s) for this service... Service "devdb_XPT.thegeekstuff.com" has 1 instance(s). Instance "devdb", status READY, has 1 handler(s) for this service... The command completed successfully
2. Start Oracle Listener
If the Oracle listener is not running, start the listener as shown below. This will start all the listeners. If you want to start a specific listener, specify the listener name next to start. i.e lsnrctl start [listener-name]
$ lsnrctl start LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:42 Copyright (c) 1991, 2007, Oracle. All rights reserved. Starting /u01/app/oracle/product/11.1.0/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.1.0.6.0 - Production System parameter file is /u01/app/oracle/product/11.1.0/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production Start Date 04-APR-2009 16:27:42 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/11.1.0/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) Services Summary... Service "devdb" has 1 instance(s). Instance "devdb", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
3. Stop Oracle Listener
If the Oracle listener is running, stop the listener as shown below. This will stop all the listeners. If you want to stop a specific listener, specify the listener name next to stop. i.e lsnrctl stop [listener-name]
$ lsnrctl stop
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:37
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
The command completed successfully
4. Restart Oracle Listener
To restart the listener use lsnrctl reload as shown below instead of lsnrctl stop and lsnrctl start. realod will read the listener.ora file for new setting without stop and start of the Oracle listener.
$ lsnrctl reload
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 17:03:31
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
The command completed successfully
Oracle Listener Help
1. View Available Listener Commands
lsnrctl help command will display all available listener commands. In Oracle 11g following are the available listener commands.
- start – Start the Oracle listener
- stop – Stop the Oracle listener
- status – Display the current status of the Oracle listener
- services – Retrieve the listener services information
- version – Display the oracle listener version information
- reload – This will reload the oracle listener SID and parameter files. This is equivalent to lsnrctl stop and lsnrctl start.
- save_config – This will save the current settings to the listener.ora file and also take a backup of the listener.ora file before overwriting it. If there are no changes, it will display the message “No changes to save for LISTENER”
- trace – Enable the tracing at the listener level. The available options are ‘trace OFF’, ‘trace USER’, ‘trace ADMIN’ or ‘trace SUPPORT’
- spawn – Spawns a new with the program with the spawn_alias mentioned in the listener.ora file
- change_password – Set the new password to the oracle listener (or) change the existing listener password.
- show – Display log files and other relevant listener information.
$ lsnrctl help
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:12:09
Copyright (c) 1991, 2007, Oracle. All rights reserved.
The following operations are available
An asterisk (*) denotes a modifier or extended command:
start stop status
services version reload
save_config trace spawn
change_password quit exit
set* show*
2. Get More help on Specific Listener Command
You can get detailed help on a specific oracle listener command as shown below. In the following example, it gives all the available arguments/parameters that can be passed to the lsnrctl show command.
$ lsnrctl help show LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:22:28 Copyright (c) 1991, 2007, Oracle. All rights reserved. The following operations are available after show An asterisk (*) denotes a modifier or extended command: rawmode displaymode rules trc_file trc_directory trc_level log_file log_directory log_status current_listener inbound_connect_timeout startup_waittime snmp_visible save_config_on_stop dynamic_registration
Follow Me On Social Networks :
-
Recent Posts
Recent Comments
- DBA Immam on Changing the look and feel of Oracle EBS environment
- DBA_Immam on Query To List Scheduled Jobs in Oracle Database
- DBA_Immam on Query To List Scheduled Jobs in Oracle Database
- Syed Ali Immam Rizvi on RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
- Syed Ali Immam Rizvi on Oracle Database : How to Backup Oracle Database using RMAN with Examples
Categories
- ANiMALS (89)
- BiRdS (5)
- SCAR LiON GALLERY (40)
- Art (298)
- WORKiNG iN GRAPHiCS (28)
- AStROLOGY (13)
- BoYs (619)
- No Smoking (54)
- Scarface'S DIARY (282)
- ChARACtERs (70)
- CoLoURs (11)
- DAtEs iN a YeAR (166)
- fUNNY (754)
- COMiCS (699)
- Death Note (43)
- COMiCS (699)
- GiRLs (292)
- Ink On PAPER (605)
- iNSCENtS (6)
- Islam (427)
- Dua (25)
- Islamic Books (4)
- Islamic Teachings (92)
- Muharram (76)
- Rajab (6)
- Ramazan (30)
- Safar (3)
- Saying Of Hazrat Ali ( A.S ) (79)
- Saying Of Holy Prophet ( P.B.U.H) (48)
- Sufism (124)
- Zul-Haj (5)
- Kingdom (20)
- LoVE (310)
- MOViES (341)
- DC Comic And Movies (112)
- Fight Club (15)
- Hannibal (25)
- MARVEL (20)
- Rorschach (12)
- Scarface (10)
- Sherlock Holmes (26)
- PAKiSTAN (179)
- Photography (14)
- POEPLes (104)
- POEtRY.. (331)
- Allama Iqbal (24)
- Asghar (6)
- Bayaam Shah Warsi (2)
- Bulleh Shah (7)
- Ghalib (36)
- Jaun Elia (43)
- LYRiCS (74)
- Mir Anees (6)
- Rumi (26)
- STORiES (47)
- TEChNoLoGY (394)
- Apple (8)
- Linux OS (87)
- Solaris (78)
- Microsoft (30)
- MOBiLE (21)
- Android (12)
- Oracle (220)
- Oracle EBS Application (38)
- Oracle Queries (122)
- Physics (2)
- Programming (24)
- SOCiAL NEtWORkS (15)
- TV Shows (181)
- Ainak Wala Jin (34)
- Alif Noon (41)
- Arrow (10)
- Friends (11)
- Game of Thrones (6)
- Mirza Ghalib (10)
- Moin Akhtar (23)
- Naruto (2)
- Zia Mohiuddin (25)
- Uncategorized (4)
- UNiVERSE (77)
- ANiMALS (89)
Archives
- December 2025
- November 2025
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- March 2025
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- January 2011
- December 2010
- August 2010
- January 2009
Tags
bad batman boy care comic crazy death drama Evil fight funny Ghalib girl good hate Hazrat Ali hope Imam Ali Imam Hussain islam islamic teaching john joker Karbala love lover man men miss you movie muslim muslims Oracle Oracle Application Oracle DBA pain Pakistan Part poet poetry sorrow tv show urdu woman womenShare It With Others :




