listener 参考 [转]

这篇文章摘自metalink, 作为如何设置listener密码保护的快速参考.文章的在HPUX 11I, ORACLE8.1.7.4的环境下测试成功:
How to password protect your listener
-------------------------------------
To avoid inadvertent stopping of your listener or to prevent unauthorized
access to your listener, you may set up password protection for your listener.
1. Cleartext Password

- Add PASSWORDS_ entry to your existing listener.ora file.
e.g.
PASSWORDS_LISTENER =(semdg04)
- Stop your listener, and restart it.
Now passwords are in effect.
To stop the listener, set password command must be used.
e.g.
lsnrctl
LSNRCTL> set current_listener listener1
LSNRCTL> set password p1 (Notice: here must be set password p1, if use set password , then return , tape xxxxx; will get TNS-01169: The listener has not
recognized the password )
LSNRCTL> stop

2. Encrypted Password

- Comment out PASSWORD_ line if cleartext password is set.
- Restart listener.
- Run lsnrctl

LSNRCTL> set current_listener
LSNRCTL> set save_config_on_stop on
LSNRCTL> change_password
Old password:
New password:
Reenter new password:

e.g:
LSNRCTL> change_password
Old password:
New password: snake77 (Notice: Here the password "snake77" should be encrypted, not display)
Reenter new password: snake77

Just hit key for old password since no previuos password is set.
The passwords you entered will not be echoed.

- Stop the listener
LSNRCTL> set password
Password:
LSNRCTL> stop
e.g.
LSNRCTL> set password
Password: e1
LSNRCTL> stop

- Check your listener.ora file

Entries similar to the following should have been added to your listener.ora
automatically.

SAVE_CONFIG_ON_STOP_listener1 = ON
PASSWORDS_listener1 = 2D6C48144CF753AC
Sample Files:
-------------
listener.ora
#
# (1) listener.ora
#
LOG_DIRECTORY_LISTENER1 = /tmp/log
LOG_FILE_LISTENER1 = listener.log
TRACE_DIRECTORY_LISTENER1 = /tmp/log
TRACE_FILE_LISTENER1 = listener.trc
TRACE_LEVEL_LISTENER1 = ADMIN
LISTENER1 =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 12345))
)
#passwords_listener1=(p1,p2)
#----ADDED BY TNSLSNR 23-DEC-99 14:57:24---
SAVE_CONFIG_ON_STOP_listener1 = ON
PASSWORDS_listener1 = 2D6C48144CF753AC
#------------------------------------------
sqlnet.ora
#
# (2) sqlnet.ora
#

NAMES.DEFAULT_DOMAIN = your_domain
NAMES.DIRECTORY_PATH = (TNSNAMES)
LOG_DIRECTORY_SERVER = /tmp/log
LOG_FILE_SERVER = server.log
TRACE_DIRECTORY_SERVER = /tmp/log
TRACE_FILE_SERVER = server
TRACE_LEVEL_SERVER = ADMIN
#
#eof
[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/503782/viewspace-983268/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/503782/viewspace-983268/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值