Monitoring service Management (RPM)

Source: Internet
Author: User
Tags snmp unix domain socket

If you want to manage (start, shut down, etc.) the Monitoring service of Oracle database, you can do it through the Lsnrctl command on the Windows/linux platform, below

We mainly talk about how to use the LSNRCTL command to manage the monitoring service (I am in two databases (different platforms, different versions) operation, for the moment called Server A,

Server B):

1: View detailed help for the Service Listener command

Server a:red Hat Enterprise Linux Server Release 6.0 (Santiago) ORACLE 10

[Email protected] ~]$ Lsnrctl

Lsnrctl for linux:version 10.2.0.1.0-production on 04-jul-2012 12:10:13

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Welcome to Lsnrctl, type ' help ' for information.

Lsnrctl> Help

The following operations is 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*

Server B:window Platform ORACLE 11

Lsnrctl> Help

The following actions are available

An asterisk (*) indicates a modifier or an extended command:

Start Stop status

Services version Reload

Save_config Trace Change_password

Quit Exit set*

show*

Compare 10g and 11g, you can find 11g less spawn command

Parameters

Parameter function description

Start

Start the specified monitoring service: start [<listener_name>]: Start listener

Stop

Stop the specified listening service: stop [<listener_name>]: Stop Listener

Status

View the specified listening service status: status [<listener_name>]: Get the status of listener

Services

Lists a summary table of services and the number of connection information created and rejected for each protocol service handler

: Service [<listener_name>]: Get the service information of the listener

Version

View Monitoring Service Version information: version [<listener_name>]: Get the version information of the listener

Reload

Restart monitoring service: reload [<listener_name>]: Reload the parameter files and SIDs

Save_config

Save the information to modify the listener configuration to the parameter file: Save_config [<listener_name>]: Saves configuration changes to parameter file

Trace

Turn on trace feature for listener: Trace OFF | USER | ADMIN | support [<listener_name>]: Set tracing to the specified level

Spawn

Produces a program that runs as an alias in the Listener.ora file:

Spawn [<listener_name>] <spawn_alias> [< (arguments= ' arg0, arg1,... ');]

Change_password

Modify the secret of shutting down the listening service: Change_password [<listener_name>]: Changes the password of the listener

Quit

Exit Tnsrctl command: Quit | Exit:exit Lsnrctl

Exit

Exit Tnsrctl command: Quit | Exit:exit Lsnrctl

Set

Setting the configuration of the listening service

Show

Display some parameter configuration information

2: Start the specified listening service

Server A:

lsnrctl> Start LISTENER

Starting/database/product/dbhome_1/bin/tnslsnr:please wait ...

Tnslsnr for Linux:version 10.2.0.1.0-production

System parameter File Is/database/product/dbhome_1/network/admin/listener.ora

Log messages Written To/database/product/dbhome_1/network/log/listener.log

Listening on: (Description= (Address= (PROTOCOL=IPC) (Key=extproc1)))

Listening on: (Description= (Address= (protocol=tcp) (Host=db-server) (port=1521)))

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version Tnslsnr for Linux:version 10.2.0.1.0-production

Start Date 05-jul-2012 10:38:14

Uptime 0 days 0 hr. 0 min. 0 sec

Trace level off

Security on:local OS Authentication

SNMP OFF

Listener Parameter File/database/product/dbhome_1/network/admin/listener.ora

Listener Log File/database/product/dbhome_1/network/log/listener.log

Listening Endpoints Summary ...

(Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

(Description= (address= (protocol=tcp) (Host=db-server) (port=1521)))

Services Summary ...

Service "Plsextproc" has 1 instance (s).

Instance "Plsextproc", status UNKNOWN, have 1 handler (s) for the This service ...

Service "Wgods" has 1 instance (s).

Instance "Wgods", status UNKNOWN, have 1 handler (s) for the This service ...

The command completed successfully

Server B:

lsnrctl> Start LISTENER

Start Tnslsnr: Please wait ...

Tnslsnr for 32-bit windows:version 11.2.0.1.0-production

System parameter file is E:\app\kerry\product\11.2.0\dbhome_1\network\admin\listener.ora

Log information written to E:\app\kerry\diag\tnslsnr\kerry-PC\listener\alert\log.xml

Monitoring: (Description= (Address= (protocol=tcp) (host=127.0.0.1) (port=1521)))

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

The STATUS of LISTENER

------------------------

Alias LISTENER

Version Tnslsnr for 32-bit windows:version 11.2.0.1.0-production

Start Date May-July-2012 10:37:49

Uptime 0 days 0 hours 0 minutes 5 seconds

Trace level off

Security On:local OS Authentication

SNMP OFF

Listener parameter File E:\app\kerry\product\11.2.0\dbhome_1\network\admin\listener.ora

Listener log File E:\app\kerry\diag\tnslsnr\kerry-PC\listener\alert\log.xml

Listener Endpoint Summary ...

(Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521)))

Service Summary:

The service "Clrextproc" consists of 1 instances.

The instance "Clrextproc", State UNKNOWN, contains 1 handlers for this service ...

The service "orcl.20.32.106" consists of 1 instances.

The instance "ORCL", State UNKNOWN, contains 1 handlers for this service ...

Command execution succeeded

Lsnrctl> Top

NL-00853: the command "Top" is not defined. Please try "help"

3: Stop monitoring Service

Server A:

Lsnrctl> stop

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

The command completed successfully

Server B:

Lsnrctl> stop

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

Command execution succeeded

4: View Monitoring Service status

Server A:

Server B:

5: View the Listening service version

Server A:

Lsnrctl> version

Connecting to (Address= (PROTOCOL=TCP) (Host=db-server) (port=1521))

Tnslsnr for Linux:version 10.2.0.1.0-production

TNS for Linux:version 10.2.0.1.0-production

Unix Domain Socket IPC NT Protocol Adaptor for Linux:version 10.2.0.1.0-production

Oracle bequeath NT Protocol Adapter for Linux:version 10.2.0.1.0-production

TCP/IP NT Protocol Adapter for Linux:version 10.2.0.1.0-production,

The command completed successfully

Server B:

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

Tnslsnr for 32-bit windows:version 11.2.0.1.0-production

TNS for 32-bit windows:version 11.2.0.1.0-production

Oracle bequeath NT Protocol Adapter for 32-bit windows:version 11.2.0.1.0-production

Windows NT Named Pipes NT Protocol Adapter for 32-bit windows:version 11.2.0.1.0-production

Windows NT TCP/IP NT Protocol Adapter for 32-bit windows:version 11.2.0.1.0-production,

Command execution succeeded

6: View Monitoring Service information

Server A:

Lsnrctl> Service

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

Services Summary ...

Service "Plsextproc" has 1 instance (s).

Instance "Plsextproc", status UNKNOWN, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" established:0 refused:0

LOCAL SERVER

Service "Wgods" has 2 instance (s).

Instance "Wgods", status UNKNOWN, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" established:0 refused:0

LOCAL SERVER

Instance "Wgods", status ready, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" Established:1 refused:0 State:ready

LOCAL SERVER

Service "Wgodsxdb" has 1 instance (s).

Instance "Wgods", status ready, have 1 handler (s) for the This service ...

Handler (s):

"D000" established:0 refused:0 current:0 max:1022 state:ready

DISPATCHER <machine:db-server, pid:31049>

(Address= (PROTOCOL=TCP) (Host=db-server) (port=34792))

Service "WGODS_XPT" has 1 instance (s).

Instance "Wgods", status ready, have 1 handler (s) for the This service ...

Handler (s):

"Dedicated" Established:1 refused:0 State:ready

LOCAL SERVER

The command completed successfully

Server B:

Lsnrctl> Services

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

Service Summary:

The service "Clrextproc" consists of 1 instances.

The instance "Clrextproc", State UNKNOWN, contains 1 handlers for this service ...

Handlers:

"Dedicated" established: 0 has been rejected: 0

LOCAL SERVER

The service "orcl.20.32.106" consists of 1 instances.

The instance "ORCL", State UNKNOWN, contains 1 handlers for this service ...

Handlers:

"Dedicated" established: 0 has been rejected: 0

LOCAL SERVER

Command execution succeeded

7: Restart the Monitoring service: This command can replace Lsnrctl stop and Lsnrctl start, which can be restarted without shutting down the Listening service command.

Read Listener.ora configuration, suitable for use after modifying the listening service file.

Server A:

Lsnrctl> Reload

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

The command completed successfully

Server B:

Lsnrctl> Reload

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

Command execution succeeded

8: Modify, set the listening service password

If the listening service password is not set, the default password is blank.

Lsnrctl> Change_password

Old Password:

New Password: ******

Reenter new password: ******

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

The password for the listener has changed

Command execution succeeded

Lsnrctl> Change_password

Old Password:

New Password:

Reenter New password:

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

Password changed for LISTENER

The command completed successfully

Lsnrctl> Set Password

Password:

The command completed successfully

Lsnrctl> Save_config

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

Saved LISTENER configuration parameters.

Listener Parameter File/database/product/dbhome_1/network/admin/listener.ora

Old Parameter File/database/product/dbhome_1/network/admin/listener.bak

The command completed successfully

At this point, you check the Listener.ora, you will find that the file is more encrypted under the password

After the deletion of the item, save the Listener.ora file, you can cancel the Lsnrctl encryption password;

#----ADDED by Tnslsnr 18-dec-2012 17:28:17---

Passwords_listener = 1baf8fabbd6810d3

#--------------------------------------------

This setting is valid in the Oracle 9i version, and in the 10g version, even after the password is set, it is possible to stop the monitoring service without entering the password because in Oracle, the Tnslistener are secure out of the box and there sh Ould not is a need to set a listener password as in older versions of the Oracle listener.

After oracle10g, setting the listener password is not necessary for security checks, because the default in 10g in addition to the user to start monitoring, other users can not stop listener (there are some other LSNRCTL commands are also banned, such as trace , reload, etc.), even if listener does not have a password set. By default, start listener or use the LSNRCTL Status command to view the listening status as you can see: Security On:password or Local OS Authentication This indicates that the listener security mechanism uses the password mode or the local OS authentication mode, in this state, even if the monitoring password is set, for the user to start monitoring, It is still possible to stop listening without any password.

If you want to remove this security mechanism, you can add Local_os_authentication_[listener under Listener.ora name]=off

[Email protected] admin]$ VI Listener.ora

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = Plsextproc)

(Oracle_home =/database/product/dbhome_1)

(program = Extproc)

)

(Sid_desc =

(Sid_name = wgods)

(Oracle_home =/database/product/dbhome_1)

(Sid_name = wgods)

)

)

LISTENER =

(Description_list =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))

(ADDRESS = (PROTOCOL = TCP) (HOST = db-server) (PORT = 1521))

)

)

Local_os_authentication_listener=off

#----ADDED by Tnslsnr 18-dec-2012 17:28:17---

Passwords_listener = 1baf8fabbd6810d3

"Listener.ora" 33L, 779C written

[Email protected] admin]$ Lsnrctl

Lsnrctl for linux:version 10.2.0.1.0-production on 19-dec-2012 18:40:19

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Welcome to Lsnrctl, type ' help ' for information.

Lsnrctl> Reload

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

The command completed successfully

Lsnrctl> stop

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

Tns-01169:the Listener have not recognized the password

Lsnrctl> Set Password--Enter the password to stop the monitoring service

Password:

The command completed successfully

Lsnrctl> stop

Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))

The command completed successfully

9:set command Configuration

Parameters

Description

Set Password

Set Rawmode

Set Rawmode

Set DisplayMode

Set the display mode of the Lsnrctl tool to Raw, COMPACT, normal, or verbose

Set Trc_file

Set the name of the listener trace file

Set Trc_directory

Set the name of the Listener trace directory

Set Trc_level

Set the trace level to off, USER, ADMIN, support mode

Set Log_file

Display or set the log file

Set Log_directory

Set the log directory location

Set Log_status

Set whether log attributes are turned on for this listener

Set Current_listener

Sets the current listener as the specified listener

Set Inbound_connect_timeout

Setting the parameter specifies the time, in a few seconds, for the client to complete the network connection after it has been established, its connection request is monitored

Set Startup_waittime

Set the length of time a listener waits for a status command in a response lsnrctl command-line tool

Set Save_config_on_stop

Save changes to the Listener.ora file when you exit the Lsnrctl tool

Set Dynamic_registration

Use the Dynamic_registration_listener_name parameter to enable or disable dynamic registration. When set to ON, the listener accepts dynamic registrations, and when set to off, the listener refuses to register dynamically. Static registration is not affected

Set Enable_global_dynamic_endpoint

Lsnrctl> Set

The following operations is available after set

An asterisk (*) denotes a modifier or extended command:

Password Rawmode

DisplayMode Trc_file

Trc_directory Trc_level

Log_file Log_directory

Log_status Current_listener

Inbound_connect_timeout Startup_waittime

Save_config_on_stop

lsnrctl> Help Set Password

Set Password:set the password for subsequent calls

Lsnrctl> Help Set Current_listener

Set|show Current_listener [<listener_name>]: sets|shows Current listener

9: Save configuration information: After modifying some configurations, you can save to the configuration file by Save_config

Lsnrctl> Save_config

Connecting to (Description= (address= (protocol=tcp) (host=127.0.0.1) (port=1521))

Save the Listener configuration parameters.

Listener parameter File E:\app\kerry\product\11.2.0\dbhome_1\network\admin\listener.ora

Old parameter file E:\app\kerry\product\11.2.0\dbhome_1\network\admin\listener.bak

Command execution succeeded

Lsnrctl>

10: Setting the Listening level

11:spawn

12: Exit the Listen server command

Lsnrctl> exit

Lsnrctl> quit

13: Display some parameter configuration information

Parameters

Description

Show Rawmode

Display RAW mode information: Displays more detailed information about status and services (when they are set to ON). Value: On or off

Show DisplayMode

Display mode information

Show rules

Display Filter Rule information

Show Trc_file

Display trace File information

Show Trc_directory

Display trace file directory information

Show Trc_level

Show trace Levels

Show Log_file

Viewing log file information

Show Log_direcotory

Displaying log file directory information

Show Log_status

Show Log Status

Show Current_listener

Displays the current listening service name

Show Inbound_connect_timeout

Displays the parameters specified by the time, in a few seconds for the client to complete the network connection has been established after the monitoring of its connection request,

Show Startup_waitetime

Displays the length of time that the listener waits for a status command in the response Lsnrctl command-line tool

Show Snmp_visible

Show Save_config_on_stop

Displays whether changes to the Listener.ora file are saved when exiting the Lsnrctl tool

Show Dynamic_registration

Show whether dynamic registration is enabled or disabled

Show Enable_global_dynamic_endpoint

Show Oracle_home

Display Oracle Home directory information

Show PID

Show Oracle Listener Process ID

Resources:

Http://www.eygle.com/archives/2007/11/listener_security.html

Http://www.cnblogs.com/kerrycode/archive/2012/12/19/2825377.html

Monitoring service Management (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.