lsnrctl中,SET PASSWORD和CHANGE_PASSWORD命令

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_CONFIGSTOP这类重要操作。这里输入的密码要和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/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值