108. You want your listener to be password protected to prevent it from being shut down. You want to
accomplish this task while the listener is functional. Which method could you use to achieve this
objective?
A.use the CHANGE_PASSWORD command of the Listener control utility
B.use the SET PASSWORD and SAVE_CONFIG commands of the Listener control utility
C.use the CHANGE_PASSWORD and SAVE_CONFIG commands of the Listener control utility
D.manually modify the listener.ora file to include the password for the listener and restart the listener
Answer: C
CHANGE_PASSWORD
Purpose
Use the CHANGE_PASSWORD
command to establish an encrypted password or change an encrypted password set with the PASSWORDS_
listener_name
parameter in the listener.ora
file.
Prerequisites
None
Password Required If One Has Been Set:
Yes. If a password is set, then issue then issue the SET PASSWORD command prior to this command.
Syntax
From the operating system:
lsnrctl CHANGE_PASSWORD [listener_name]
From the Listener Control utility:
LSNRCTL> CHANGE_PASSWORD [listener_name]
Arguments
[listener_name
]: Specify the listener name, if the default name of LISTENER
is not used.
Usage Notes
The Listener Control utility prompts you for the old password and then for the new one. It asks you to re-enter the new one, and then changes it. Neither the old nor the new password displays during this procedure. CHANGE_PASSWORD
is usually followed by the SAVE_CONFIG command to save the new password in thelistener.ora
file. If a SAVE_CONFIG
command is not issued, then the new password will be in effect only until the listener is shut down.
See Also:
Oracle Database Net Services Administrator's Guide for further information about password security of the listenerExample
The following shows a new password of takd01
being set:
LSNRCTL> CHANGE_PASSWORD Old password: New password: takd01 Reenter new password: takd01 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521))) Password changed for LISTENER The command completed successfully LSNRCTL> SAVE_CONFIG Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521))) Saved LISTENER configuration parameters. Listener Parameter File /oracle/network/admin/listener.ora Old Parameter File /oracle/network/admin/listener.bak The command completed successfully
The following shows the password being changed from takd01
to smd01:
LSNRCTL> SET PASSWORD Password: takd01 The command completed successfully LSNRCTL> CHANGE_PASSWORD Old password: takd01 New password: smd01 Reenter new password: smd01 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521))) Password changed for LISTENER The command completed successfully LSNRCTL> SAVE_CONFIG Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521))) Saved LISTENER configuration parameters. Listener Parameter File /oracle/network/admin/listener.ora Old Parameter File /oracle/network/admin/listener.bak The command completed successfully
SAVE_CONFIG
Purpose
Use the SAVE_CONFIG
command to compare the current configuration state of the listener, including trace level, trace file, trace directory, and logging to thelistener.ora
file. Any changes are stored in listener.ora
, preserving formatting, comments, and case as much as possible. Prior to modification of thelistener.ora
file, a backup of the file, called listener.bak
, is created.
Password Required If One Has Been Set
Yes. If a password is set, then issue then issue the SET PASSWORD command prior to this command.
Syntax
From the operating system:
lsnrctl SAVE_CONFIG [listener_name]
From the Listener Control utility:
LSNRCTL> SAVE_CONFIG [listener_name]
Arguments
[listener_name
]: Specify the listener name, if the default name of LISTENER
is not used.
Usage Notes
This command enables you to save all runtime configuration changes to the listener.ora
file, which can be especially useful for saving changed encrypted passwords.
Example
LSNRCTL> SAVE_CONFIG listener Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521))) Saved LISTENER configuration parameters. Listener Parameter File /oracle/network/admin/listener.ora Old Parameter File /oracle/network/admin/listener.bak The command completed successfully