CHANGE_PASSWORD
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.
CHANGE_PASSWORD命令用于创建和修改密码!
如建立口令的简单过程如下:
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.ora
Old Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.bak
The command completed successfully
--===============================================================
修改口令:
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=liuxiaohui)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.ora
Old Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.bak
The command completed successfully
SET PASSWORD
Use the command SET PASSWORD prior to privileged Listener Control utility commands, such as SAVE_CONFIG and STOP.
The password entered should match the one established for the PASSWORDS_listener_name parameter in the listener.ora file or set by the CHANGE_PASSWORD command.
SET PASSWORD命令用于设置当前环境密码,以便能够执行如SAVE_CONFIG和STOP这类重要操作。这里输入的密码要和listener.ora文件中PASSWORDS_listener_name参数指定的密码一致,或者和CHANGE_PASSWORD命令设定的密码一致。
这样做的目的是保护LISTENER不被非法的关闭,而不是限制非法用户启用监听。如,当其他用户、或远程用户关闭LISTENER时,必须SET PASSWORD,才能执行STOP,否则会收到错误:
[oracle@boypoo2 ~]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-OCT-2006 22:02:22
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener listener1
Current Listener is listener1
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.100)(PORT=1521)))
TNS-01169: The listener has not recognized the password
TNS-01189: The listener could not authenticate the user
LSNRCTL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25744374/viewspace-732001/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25744374/viewspace-732001/