Manage Listener commands in Oracle

Manage Listener commands in Oracle

Listener can be configured in one of three modes:
Database:    Provides network access to an Oracle database instance
PLSExtProc:  Method for PL/SQL packages to access operating system executable
Executable:  Provides network access to operating system executable

Enable or disable log of listener

--For Enable the log of listener
LSNRCTL> set log_status on

--For Disable the log of Listener
LSNRCTL> set log_status off

Remotely administer a Listener of database in oracle
Managed Database Server listener through Oracle Client Software like remote connection with IP address.

lsnrctl status 192.168.1.100
lsnrctl stop 192.168.1.100:1522

Set the log location of listener
1. Open lsnrctl utility and check log location with status command.
s
cmd>lsnrctl status

2. Change the log location in Listener:

lsrnctl>show log_directory
lsrnctl>show log_file
lsrnctl>show log_status

lsrnctl>set log_directory
lsrnctl>set log_file
lsrnctl>set log_status

--Also change Trace level
lsrnctl>set trc_directory
lsrnctl>set trc_file
lsrnctl>set trc_level


Example: TURN ON LOGGING

-- Check
LSNRCTL> show log_file
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER parameter "log_file" set to D:\oracle\diag\tnslsnr\node1\listener\ale
rt\log.xml
The command completed successfully
LSNRCTL>
LSNRCTL> show log_directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER parameter "log_directory" set to D:\oracle\diag\tnslsnr\node1\listene
r\alert
The command completed successfully
LSNRCTL>
LSNRCTL> show log_Status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER parameter "log_status" set to ON
The command completed successfully

LSNRCTL> set current_listener
LSNRCTL> set password Password:
LSNRCTL> set log_directory /network/admin
LSNRCTL> set log_file .log
LSNRCTL> set log_status on
LSNRCTL> save_config

Note: It is possible to overwrite the ORACLE_HOME/sqlplus/admin/glogin.sql
by changing the location of the log file.

Set the password for listener to make it Secure

LSNRCTL> set current_listener
LSNRCTL> change_password Old password:
New password:
Reenter new password:
LSNRCTL> set password Password:
LSNRCTL> save_config

Note: Following is the parameter need to mentioned in listener file for disable the Operating system authentication. you need to edit listener.ora file.
LOCAL_OS_AUTHENTICATION_ = OFF

For security purpose filter the IP Address which only connect through listener with database
Specify the client address for connectivity
$ORACLE_HOME/network/admin/sqlnet.ora file

tcp.validnode_checking = yes
tcp.invited_nodes = (x.x.x.x | name, x.x.x.x | name)
tcp.excluded_nodes=( x.x.x.x | name, x.x.x.x | name)

Note: Include either the invited_nodes or excluded_nodes, but do not use both.
Listener need to restart for setting the parameters.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s