一、设置密码
- 在监听启动状态设置密码
[oracle@node1 admin]$ lsnrctl
[oracle@node1 admin]$ lsnrctl- LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-NOV-2016 09:45:45
- Copyright (c) 1991, 2013, Oracle. All rights reserved.
- Welcome to LSNRCTL, type "help" for information.
- LSNRCTL> status
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
- Start Date 25-NOV-2016 09:35:38
- Uptime 0 days 0 hr. 10 min. 10 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
- Listener Log File /u01/app/oracle/diag/tnslsnr/node1/listener/alert/log.xml
- Listening Endpoints Summary...
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.66.101)(PORT=1521)))
- (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
- Services Summary...
- Service "orcl" has 1 instance(s).
- Instance "orcl", status READY, has 1 handler(s) for this service...
- Service "orclXDB" has 1 instance(s).
- Instance "orcl", status READY, has 1 handler(s) for this service...
- The command completed successfullyLSNRCTL> change_password
- Old password:
- New password:
- Reenter new password:
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
- Password changed for LISTENER
- The command completed successfully
- LSNRCTL> save_config
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
- Saved LISTENER configuration parameters.
- Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
- Old Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.bak
- The command completed successfully
- 9i 异常
当执行save_config保存时会报异常
TNS-01169: The listener has not recognized the password
此时运行
- LSNRCTL> set password
- Password:
- The command completed successfully
- LSNRCTL> save_config
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
- Saved LISTENER configuration parameters.
- Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
- Old Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.bak
- The command completed successfully
- LSNRCTL> exit
- 修改监听文件
# PASSWORDS_LISTENER下方添加
LOCAL_OS_AUTHENTICATION_LISTENER = OFF
- 重启监听