The password can be set either by specifying it
through the command CHANGE_PASSWORD, or through a parameter in the
listener.ora file. We saw how to do that through the CHANGE_PASSWORD
command earlier. If the password is changed this way, it should not
be specified in the listener.ora file. The password is not displayed
anywhere. When supplying the password in the listener control
utility, you must supply it at the Password: prompt as shown above.
You cannot specify the password in one line as shown below.
The password has to be specified on the prompt as
follows.
LSNRCTL> set
password
Password: Enter t0p53cr3t here; it will not be displayed.
The command completed successfully
LSNRCTL> stop
The other method of setting the password is
through the parameter file. In the file listener.ora, insert the
following line.
passwords_listener = t0p53cr3t
To specify passwords for other listeners, use
the name appended to the word passwords above. For example,
passwords_listener1 = t0p53cr3t
sets the password for listener1. In this
method, setting the password has to be passed in one line such as:
LSNRCTL> set password
t0p53cr3t
The method of getting a prompt and entering the
non-displayed password will not work.
However, when the password is changed in the
case where the password is explicitly mentioned in the parameter
file, the operation will never be successful.
LSNRCTL> set password manager1
The command completed successfully
LSNRCTL>
change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBDEV1)(PORT=1526)))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBDEV1)(PORT=1526)))
TNS-01169: The listener has not recognized the password
LSNRCTL>
Regardless of how you enter the password,
through a single line or on the prompt, the change will not be
successful. To change the password, you have to remove the line
passwords_listener in the file listener.ora
and then change the password.
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|