OCP-043 listener to be password protected(change_password)

来源:互联网 发布:香港李波事件知乎 编辑:程序博客网 时间:2024/06/08 03:09

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 listener

Example

The following shows a new password of takd01 being set:

LSNRCTL> CHANGE_PASSWORDOld password: New password: takd01Reenter new password: takd01Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521)))Password changed for LISTENERThe command completed successfullyLSNRCTL> SAVE_CONFIGConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521)))Saved LISTENER configuration parameters.Listener Parameter File   /oracle/network/admin/listener.oraOld Parameter File   /oracle/network/admin/listener.bakThe command completed successfully

The following shows the password being changed from takd01 to smd01:

LSNRCTL> SET PASSWORDPassword: takd01The command completed successfullyLSNRCTL> CHANGE_PASSWORDOld password: takd01New password: smd01Reenter new password: smd01Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521)))Password changed for LISTENERThe command completed successfullyLSNRCTL> SAVE_CONFIGConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521)))Saved LISTENER configuration parameters.Listener Parameter File   /oracle/network/admin/listener.oraOld Parameter File   /oracle/network/admin/listener.bakThe 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 listenerConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521)))Saved LISTENER configuration parameters.Listener Parameter File   /oracle/network/admin/listener.oraOld Parameter File   /oracle/network/admin/listener.bakThe command completed successfully


原创粉丝点击