In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to start and shut down and restart the oracle listener in linux. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.
For DBA, starting and shutting down oracle listeners is a basic task, but Linux system administrators or programmers sometimes need to do some basic DBA operations in the development database, so it is important for them to understand some basic management operations.
We will discuss ways to start, shut down, and view the status of listeners with the LSNRCTL command.
How to start, shut down, and restart oracle listeners
Be sure to check the status of the oracle listener using the lsnrctl status command before starting, shutting down, or restarting the oracle listener. In addition to getting the status of the listener, you can get the following information from the output of the lsnrctl status command:
Start time of the listener
Run time of the listener
The location of the listener parameter file listener.ora, usually in the $ORACLE_HOME/network/admin directory
Location of the listener log file
If the oracle listener is not running, you will get the following information
View plaincopy to clipboardprint?
$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
$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 will get the following information
View plaincopy to clipboardprint?
$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
$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
two。 Start the oracle listener
If the oracle listener is not running, you can start the oracle listener with the lsnrctl start command, which will start all listeners. If you only want to start a specific listener, you can specify the name of the listener after start, for example: lsnrctl start [listener-name].
View plaincopy to clipboardprint?
$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
$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. Turn off the oracle listener
If the oracle listener is running, you can use the lsnrctl stop command to close the oracle listener, which closes all listeners. If you only want to close a specific listener, you can specify the name of the listener after stop, for example: lsnrctl stop [listener-name]
View plaincopy to clipboardprint?
$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
$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 the oracle listener
Restart the listener with lsnrctl reload, which replaces lsnrctl stop and lsnrctl start. Rebooting will read the configuration of listener.ora without shutting down and starting the listener.
View plaincopy to clipboardprint?
$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
$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 all listener commands
The lsnrctl hep command displays all available listener commands. The output in oracle11g is as follows:
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.
View plaincopy to clipboardprint?
$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*
$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*
two。 Get detailed help for the specified listener command
You can use lsnrctl help to get detailed help for the specified command. As shown below
View plaincopy to clipboardprint?
$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
This is how to start and shut down and restart the oracle listener in linux shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.