Oracle listener lsnrctl, listenerlsnrctl

Source: Internet
Author: User
Tags time 0 password protection

Oracle listener lsnrctl, listenerlsnrctl

Lsnrctl (Listener Control) is an SQL * Net tool used to Control the listener database. This tool provides commands to Control the start and stop of listener and view the status of listener, changes the configuration parameters of listener.

Lsnrctl Introduction

Enter lsnrctl in the command line and you will get:

C: \ Documents ents and Settings \ Administrator> lsnrctlLSNRCTL for 32-bit Windows: Version 10.2.0.1.0-Production on month 26-9-2014 08: 44: 15 Copyright (c) 1991,200 5, Oracle. all rights reserved. welcome to LSNRCTL. Enter "help" for information. LSNRCTL>

Use the help command to view all available commands:

LSNRCTL> help the following operations can use an asterisk (*) to indicate a modifier or extended command: start stop statusservices version reloadsave_config trace change_passwordquit exit set * show *

The following is a brief description of these commands:

1) start: Use the specified listener name to start listener. Otherwise, LISTERNER is started. In Windows, listener can also be started in the control center service;
2) stop: stop listener. Windows can also be stopped from the service in the control center;
3) status: provides the status information of listener, including the start time, running time, and trace level;
4) services: print all available services;
5) version: print the version information of listener;
6) reload: forcibly read the configuration file to obtain the new configuration without stopping or starting the listener;
7) save_config: Creates a backup for the current listener. ora file and saves the changes to the current version;
8) trace: sets the trace level. Available values: OFF, USER, ADMIN, and SUPPORT;
9) dbsnmp_start: Start the DBSNMP sub-proxy;
10) dbsnmp_stop: Stop the DBSNMP sub-proxy;
11) dbsnmp_status: prints the status of the DBSNMP sub-proxy;
12) change_password: set a new password for listener;
13) quit or exit: exit;
14) set: changes the value of any parameter;
15) show: print the current parameter settings.

Lsnrctl application instance

The following describes how to use lsnrctl.

Start listener

When the listener is stopped, connecting to the database instance will cause a ORA-12541 exception and viewing the listener status will get:

LSNRCTL> status is being connected to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521) (CONNECT_DATA = (SID = lytest) (SERVER = DEDICATED) TNS-12541: TNS: No listener TNS-12560: TNS: protocol adapter Error TNS-00511: No listener 32-bit Windows error: 61: Unknown Error

In this case, you can start listener:

LSNRCTL> start tnslsnr: Please wait... TNSLSNR for 32-bit Windows: Version 10.2.0.1.0-Production the system parameter file is E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. ora writes E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ log \ listener. log monitoring: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.74.216.39) (PORT = 1521: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\. \ pipe \ EXTPROC0ipc) connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521) listener status ---------------------- alias LISTENER version TNSLSNR for 32-bit Windows: version 10.2.0.1.0-Production start date 26-9-2014 09:33:40 normal running time 0 days 0 hours 0 minutes 4 seconds tracking level off security ON: Local OS AuthenticationSNMP OFF listener parameter file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. ora listener log File E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ log \ listener. summary of log listening endpoints... (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.74.216.39) (PORT = 1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\. \ pipe \ EXTPROC0ipc) Service abstract .. the Service "PLSExtProc" contains one routine. Routine "PLSExtProc", status UNKNOWN, contains one processing program of this service... the command is successfully executed

At this point, the listener is successfully started.

Trace file

The listener trace file provides the listener working process information to help us locate the listener fault. The following is the help group information provided by lsnrctl for trace:

LSNRCTL> help tracetrace OFF | USER | ADMIN | SUPPORT [<listener_name>] : set tracing to the specified level

The following describes the parameters:
1) OFF: no trace output;
2) USER: user trace information;
3) ADMIN: administration trace information;
4) SUPPORT: Oracle Support Services trace information
Follow these steps to enable tracking:

LSNRCTL> trace support is connecting to the trace file (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521) opened: E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ trace \ listener. the trc command is successfully executed.

View the listener status:

LSNRCTL> status is being connected (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521 ))) listener status ---------------------- alias LISTENER version TNSLSNR for 32-bit Windows: version 10.2.0.1.0-Production start date 26-9-2014 10:35:06 normal running time 0 days 0 hours 31 minutes 26 seconds tracking level support security ON: Password or Local OS AuthenticationSNMP OFF listener parameter file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. ora listener log File E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ log \ listener. log listener trace file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ trace \ listener. summary of the trc listener endpoint... (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.74.216.39) (PORT = 1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\. \ pipe \ EXTPROC0ipc )))......

You can see the path of the trace file in "listener trace file": E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ trace \ listener. trc.
You can use the following command to query the trace file name:

LSNRCTL> show trc_file is connected to the LISTENER parameter (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521. the trc command is successfully executed.

View the trail level:

LSNRCTL> show trc_level is connected to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521). The LISTENER parameter "trc_level" is set to support Command Execution successful

Modify the trail File Name:

LSNRCTL> set trc_file 'lylistener. trc' is connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521). The LISTENER parameter "trc_file" is set to lylistener. the trc command is successfully executed.

Note that after the trace file name is modified, the trace will be disabled and you need to reset it (set setting is used here, which has the same effect as using trace ):

LSNRCTL> set trc_level user is connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521 ))) the LISTENER parameter "trc_level" is set to user. The command is successfully executed.

Next, check the listener status again:

LSNRCTL> status is being connected (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521 ))) listener status ---------------------- alias LISTENER Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0-Production start date 26-2014 10:35:06 normal running time 2 days 0 hours 8 minutes 3 seconds tracking level user security ON: password or Local OS AuthenticationSNMP OFF listener parameter file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. ora listener log File E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ log \ listener. log listener trace file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ trace \ lylistener. summary of the trc listener endpoint... (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.74.216.39) (PORT = 1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\. \ pipe \ EXTPROC0ipc )))...... command executed successfully

The file name of the trail has been changed.

Set password protection for listener

After 10 Gb of Oracle, the local Oracle user does not need a password to disable listener. The password is mainly set to prevent:
1) other users on the local machine disable listener;
2) Close listener remotely.
The following is a specific method.

LSNRCTL> change_passwordOld password: <enter the original password> New password: <enter the new password> Reenter New password: <confirm the new password>

After successful execution, you will see:

The password connecting to the LISTENER (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521) has been changed and the command is successfully executed.

Next, you need to save the Configuration:

LSNRCTL> save_config is connecting to the LISTENER Configuration Parameter (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.74.216.39) (PORT = 1521. Listener parameter file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. old ora parameter file E: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. bak Command executed successfully

In this way, password protection is set for your listener.


Which English abbreviation of lsnrctl is used in oracle lsnrctl?

Listener control
After you press lsnrctl and press enter, the Listener Control page is displayed.

After the oracle listener is restarted, The LSNRCTL> stat listener status is as follows:

SID_LIST_LISTENER is missing in your listener. ora file. That is to say, you have not created a database instance or you have not added the database instance to be listened to in the listener. ora file.

Related Article

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.