Let us see how to set the listener password step wise.
1. Check the current status of the listener.
[oracle@OEL-11g ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 10-FEB-2015 18:57:38
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OEL-11g)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 10-FEB-2015 18:47:49
Uptime 0 days 0 hr. 9 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/base/product/11.2.0/db/network/admin/listener.ora
Listener Log File /oracle/base/diag/tnslsnr/OEL-11g/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OEL-11g)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary…
Service “ORADB” has 1 instance(s).
Instance “ORADB”, status READY, has 1 handler(s) for this service…
Service “ORADBXDB” has 1 instance(s).
Instance “ORADB”, status READY, has 1 handler(s) for this service…
The command completed successfully
2. Security is ON but for Local OS Authentication. Now let us check the listener.ora file:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OEL-11g)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /oracle/base
3. Now Stop the listener and configure password to the listener.
oracle@OEL-11g admin]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 10-FEB-2015 19:08:14
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL> set current_listener LISTENER
Current Listener is LISTENER
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OEL-11g)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> set save_config_on_stop on
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OEL-11g)(PORT=1521)))
LISTENER parameter “save_config_on_stop” set to ON
The command completed successfully
LSNRCTL> exit
[oracle@OEL-11g admin]$ cat listener.ora
# listener.ora Network Configuration File: /oracle/base/product/11.2.0/db/network/admin/listener.ora
# Generated by Oracle configuration tools.
LOCAL_OS_AUTHENTICATION_LISTENER=off
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OEL-11g)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /oracle/base
#—-ADDED BY TNSLSNR 10-FEB-2015 19:10:49—
SAVE_CONFIG_ON_STOP_LISTENER = ON
PASSWORDS_LISTENER = FC996BE8FB638140
4. Let us verify the listener functionality with password:
[oracle@OEL-11g admin]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 10-FEB-2015 19:14:33 Copyright (c) 1991, 2011, Oracle. All rights reserved. Welcome to LSNRCTL, type “help” for information. LSNRCTL> set cr urrent_listener LISTER^HN NER Current Listener is LISTENER LSNRCTL> set password Password: The command completed successfully LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OEL-11g)(PORT=1521))) The command completed successfully LSNRCTL> exit PASSWORD is required to STOP a listener but not to START a listener.
5. Now check the listener status. Security is changed to “ON. Password”
[oracle@OEL-11g admin]$ lsrncnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 10-FEB-2015 19:11:30
Copyright (c) 1991, 2011, Oracle. All rights reserved. Starting /oracle/base/product/11.2.0/db/bin/tnslsnr: please wait… TNSLSNR for Linux: Version 11.2.0.3.0 – Production System parameter file is /oracle/base/product/11.2.0/db/network/admin/listener.ora Log messages written to /oracle/base/diag/tnslsnr/OEL-11g/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OEL-11g)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OEL-11g)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 10-FEB-2015 19:11:30
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Password
SNMP OFF
Listener Parameter File /oracle/base/product/11.2.0/db/network/admin/listener.ora
Listener Log File /oracle/base/diag/tnslsnr/OEL-11g/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OEL-11g)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully