Вы находитесь на странице: 1из 6

The listener The listener processes on a Oracle server detect incoming requests from clients for connection and

manage network-traffic once clients have connected to an Oracle database. The listener implements a listener.ora configuration-file to help keep track of names, protocols, services and hosts. Apart from pre-defined and known statically-registered databases, a listener can also accept dynamic service registration from a database. lsnrctl command The lsnrctl command is a listener command. The lsnrctl command is a SQL*Net utility used for controlling database listeners. The listener.ora file is the configuration file for the network listener. The listener is required for allowing remote clients to connect to the Oracle database via the network. This utility cannot create or configure listeners, but provides commands to control listener functions such as starting and stopping listeners, reporting the status of listeners, changing parameter listener settings, etc. We will get all lsnrctl commands through this utility. We will use lsnrctl command for the open lsnrctl and help command show the all command of the listener. C:\Users\USERNAME>lsnrctl LSNRCTL> help Output:

The following commands are used to manage the listener: 1. Start Command The Starts the listener with the name specified, otherwise LISTENER will be used. For Windows systems, the listener can also be started from the Control Panel.

Example: lsnrctl> Start [listener_name] 2. Stop Command We will use stop command for Stops the listener. For Windows systems, the listener can also be stopped from the Control Panel. Exampl: lsnrctl> Stop [listener_name] 3. Status Command The status command provides status information about the listener, including start date, uptime, and trace level. Output:

4. Services Command The services command displays each service available, along with the connection history.


5. Version Command The version command displays the version information of the listener. Output:

6. Reload Command The reload command forces a read of the configuration file in order for new settings to take effect without stopping and starting the listener. Example: lsnrctl> Reload LISTNER 7. Save_Config Command

The save_config command creates a backup of the existing listener.ora file and saves changes to the current version. Example: lsnrctl> Save_Config LISTNER 8. Trace Command The trace command sets the trace level to one of the following OFF, USER, ADMIN, or SUPPORT. Example: lsnrctl> Trace LISTNER off for no trace output user for user trace information admin for administration trace information support for Oracle Support Services trace information

9. Change_Password Command The change_password command sets a new password for the listener. Example: lsnrctl> Change_Password LISTNER 10. Quit and Exit Command The quit and exit command use for exits the utility. 11. Set Command The set command changes the value of any parameter. Everything that can be shown can be set.


12. Show Command The show command displays current parameter settings. Output:

13. Help Command To provide a list of all the Listener Control utility commands or provides syntax help for a particular Listener Control utility command. Output LSNRCTL> HELP The following operations are available

An asterisk (*) denotes a modifier or extended command: exit quit reload services set* show* spawn

start status stop trace version

14. CURRENT_LISTENER Command Purpose To set the name of the listener to administer, Subsequent commands that would normally require listener_name can be issued without it. Syntax From the Listener Control utility LSNRCTL> SET CURRENT_LISTENER listener_name Example LSNRCTL> SET CURRENT_LISTENER lsnr Current Listener is lsnr 15. DISPLAYMODE Command To change the format and level of detail for the SERVICES and STATUS commands. Syntax From the Listener Control utility: LSNRCTL> SET DISPLAYMODE {compat | normal | verbose | raw} Arguments Specify one of the following modes:

compat: Output that is compatible with older versions of the listener. normal: Output that is formatted and descriptive. Oracle recommends this mode. verbose: All data received from the listener in a formatted and descriptive output. raw: All data received from the listener without any formatting. This argument should be used only if recommended by Oracle Support Services.

LSNRCTL> SET DISPLAYMODE normal Service display mode is NORMAL