设置oracle数据库监听密码
设置oracle数据库监听密码
为监听器设置密码 防止远程用户关闭
C:\Documents and Settings\yibin>lsnrctl
LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-9月 -2008 08:23
:07
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
欢迎来到LSNRCTL,请键入"help"以获得信息。
LSNRCTL> help
以下操作可用
星号 (*) 表示修改符或扩展命令:
start stop status
services version reload
save_config trace change_password
quit exit set*
show*
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
LISTENER的口令已更改
命令执行成功
LSNRCTL> set password
Password:
命令执行成功
LSNRCTL> save_config
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
保存的LISTENER配置参数。
监听器参数文件 D:\oracle\ora92\network\admin\listener.ora
旧的参数文件D:\oracle\ora92\network\admin\listener.bak
命令执行成功
LSNRCTL>
而这时关闭监听器则需要密码了
C:\Documents and Settings\yibin>lsnrctl stop
LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-9月 -2008 08:29
:07
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-01169: 监听器尚未识别口令
通过用以下命令设置密码来关闭监听
C:\Documents and Settings\yibin>lsnrctl
LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-9月 -2008 08:30
:04
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
欢迎来到LSNRCTL,请键入"help"以获得信息。
LSNRCTL> set password
Password:
命令执行成功
LSNRCTL> stop
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
命令执行成功
LSNRCTL>
而再本机启动监听时 是不需要密码的
C:\Documents and Settings\yibin>lsnrctl start
LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-9月 -2008 08:32
:06
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
启动tnslsnr:请稍候...
TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
系统参数文件为D:\oracle\ora92\network\admin\listener.ora
写入D:\oracle\ora92\network\log\listener.log的日志信息
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yibin.hnisi.com.cn)(PORT=1521)))
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Produc
tion
启动日期 13-9月 -2008 08:32:07
正常运行时间 0 天 0 小时 0 分 0 秒
跟踪级别 off
安全性 ON
SNMP OFF
监听器参数文件 D:\oracle\ora92\network\admin\listener.ora
监听器日志文件 D:\oracle\ora92\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yibin.hnisi.com.cn)(PORT=1521)))
服务摘要..
服务 "PLSExtProc" 包含 1 个例程。
例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
监听器的安全性也由off变成on了
远程用户是否能 start listener 有待验证
要是密码丢失了 可以尝试用以下几种方法:
1. Open the listener.ora and find the following line: "filepasswords_listener= " Type "pwd" after the = sign. Stop the listener and restarted it.
1a. Then perform. the following: LSNRCTL> set password pwd command successfully LSNRCTL> stop command successfully
2. If the previous step does not work, try commenting out the following line on the listener.ora file: #passwords_listener= xxxx
2a. Stop the listener process. Restart and stop listener again.
3. Verify that the passwords_listener parameter has a value - it cannot be set to a blank password.