濮阳杆衣贸易有限公司

主頁 > 知識(shí)庫 > Oracle 監(jiān)聽器密碼設(shè)置方法(LISTENER)

Oracle 監(jiān)聽器密碼設(shè)置方法(LISTENER)

熱門標(biāo)簽:百度地圖標(biāo)注途經(jīng)點(diǎn) 地圖標(biāo)注養(yǎng)老院 哈爾濱電話機(jī)器人銷售招聘 愛客外呼系統(tǒng)怎么樣 圖吧網(wǎng)站地圖標(biāo)注 山東crm外呼系統(tǒng)軟件 開發(fā)外呼系統(tǒng) 慧營銷crm外呼系統(tǒng)丹丹 哪個(gè)400外呼系統(tǒng)好

監(jiān)聽器也有安全?Sure!在缺省的情況下,任意用戶不需要使用任何密碼即通過lsnrctl 工具對Oracle Listener進(jìn)行操作或關(guān)閉,從而造成任意新的會(huì)話都將無法建立連接。在Oracle 9i 中Oracle監(jiān)聽器允許任何一個(gè)人利用lsnrctl從遠(yuǎn)程發(fā)起對監(jiān)聽器的管理。也容易導(dǎo)致數(shù)據(jù)庫受到損壞。

1. 未設(shè)定密碼情形下停止監(jiān)聽

[oracle@test ~]$ lsnrctl stop listener_demo92  -->停止監(jiān)聽,可以看出不需要任何密碼即可停止 
                                              
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 26-JUN-2011 08:22:26          
                                              
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.             
                                              
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))         
The command completed successfully 

2. 重新啟動(dòng)監(jiān)聽并設(shè)置密碼

[oracle@test ~]$ lsnrctl                                                 
                                                             
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 26-JUN-2011 08:24:09                         
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.                            
                                                             
Welcome to LSNRCTL, type "help" for information.	                                    
LSNRCTL> set current_listener listener_demo92 -->設(shè)置當(dāng)前監(jiān)聽器                             
Current Listener is listener_demo92                                            
LSNRCTL> start       -->啟動(dòng)過程也不需要任何密碼,啟動(dòng)的詳細(xì)信息省略                         
LSNRCTL> change_password  -->使用change_password來設(shè)置密碼                                
Old password:                                                       
New password:                                                       
Reenter new password:                                                   
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))                        
Password changed for listener_demo92                                           
The command completed successfully                                            
LSNRCTL> save_config    -->注意此處的save_config失敗                                 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))                        
TNS-01169: The listener has not recognized the password                                  
LSNRCTL> set password    -->輸入新設(shè)定的密碼驗(yàn)證                                    
Password:                                                         
The command completed successfully                                            
LSNRCTL> save_config    -->再次save_config成功                                     
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))                        
Saved listener_demo92 configuration parameters.                                      
Listener Parameter File  /oracle/92/network/admin/listener.ora                              
Old Parameter File  /oracle/92/network/admin/listener.bak                                
The command completed successfully                                            
                                                             
-->增加密碼之后可以看到listener.ora文件中有一條新增的記錄,即密碼選項(xiàng)(注:盡管使用了密碼管理方式,仍然可以無需密碼啟動(dòng)監(jiān)聽)
[oracle@test admin]$ more listener.ora                                          
	#----ADDED BY TNSLSNR 26-JUN-2011 05:12:48---                                      
	PASSWORDS_listener_demo92 =                                               
	#--------------------------------------------

3. 嘗試未使用密碼的情況下停止監(jiān)聽

[oracle@test ~]$ lsnrctl stop listener_demo92                        
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 26-JUN-2011 06:09:51          
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.             
                                              
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))         
TNS-01169: The listener has not recognized the password  -->收到錯(cuò)誤信息,需要使用密碼認(rèn)證

4. 使用密碼來停止監(jiān)聽

[oracle@test ~]$ lsnrctl                            
LSNRCTL> set current_listener listener_demo92                 
Current Listener is listener_demo92                      
LSNRCTL> stop                                 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))   
TNS-01169: The listener has not recognized the password            
LSNRCTL> set password                             
Password:                                   
The command completed successfully                       
LSNRCTL> stop                                 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))   
The command completed successfully                       
LSNRCTL> status                                
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))   
TNS-12541: TNS:no listener                           
 TNS-12560: TNS:protocol adapter error                     
 TNS-00511: No listener                            
  Linux Error: 111: Connection refused                    
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))       
TNS-12541: TNS:no listener                           
 TNS-12560: TNS:protocol adapter error                     
 TNS-00511: No listener                            
  Linux Error: 2: No such file or directory	                 

5. save_config失敗的問題

-->在 Oracle 9i中,使用save_config命令將會(huì)失敗                                     
	LSNRCTL> save_config                                                 
	Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname>)(PORT=port>)))                  
	TNS-01169: The listener has not recognized the password	                               
                                                            
-->應(yīng)該先使用set password之后再save_config,則保存配置成功。                              
	LSNRCTL> set password                                                
	Password: the password you chose>                                          
	The command completed successfully                          
/*在Oracle 10g 中不會(huì)出現(xiàn)類似的問題,因?yàn)樵?0g中可以使用基于操作系統(tǒng)驗(yàn)證方式。listener將檢測到如果用戶屬于dba組的成員,
將會(huì)被授予改變密碼,保存配置以及停止監(jiān)聽等權(quán)限。 */                                 

6. 配置listener.ora中ADMIN_RESTRICTIONS參數(shù)

參數(shù)作用:
當(dāng)在listener.ora文件中設(shè)置了ADMIN_RESTRICTIONS參數(shù)后,在監(jiān)聽器運(yùn)行時(shí),不允許執(zhí)行任何管理命令,同時(shí)set命令將不可用
,不論是在服務(wù)器本地還是從遠(yuǎn)程執(zhí)行都不行。此時(shí)對于監(jiān)聽的設(shè)置僅僅通過手工修改listener.ora文件,要使修改生效,只能
使用lsnrctl reload命令或lsnrctl stop/start命令重新載入一次監(jiān)聽器配置信息。
修改方法:
在listener.ora文件中手動(dòng)加入下面這樣一行
ADMIN_RESTRICTIONS_監(jiān)聽器名> = ON

下面是其它網(wǎng)友的補(bǔ)充:

LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ecp-uc-db1)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ecp-uc-db1)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Old Parameter File /opt/oracle/product/10.2.0/db_1/network/admin/listener.bak
The command completed successfully
[oracle@ecp-uc-db1 admin]$ cat listener.ora
#—-ADDED BY TNSLSNR 10-JUN-2011 18:13:24—
PASSWORDS_LISTENER = 6D7AA003392C436A
#——————————————–
note:10g數(shù)據(jù)庫上需要上添加(重啟監(jiān)聽)
LOCAL_OS_AUTHENTICATION_LISTENER = OFF

1、添加LOCAL_OS_AUTHENTICATION_LISTENER = OFF之前

Security ON: Password or Local OS Authentication

2、添加LOCAL_OS_AUTHENTICATION_LISTENER = OFF之后

Security ON: Password
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ecp-uc-db1)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ecp-uc-db1)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password 123456
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ecp-uc-db1)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0 – Production
Start Date 10-JUN-2011 18:15:49
Uptime 0 days 0 hr. 1 min. 16 sec
Trace Level off
Security ON: Password
SNMP OFF
Listener Parameter File /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ECP-UC-DB1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
Service “ecp” has 1 instance(s).
Instance “ecp”, status READY, has 1 handler(s) for this service…
Service “ecpXDB” has 1 instance(s).
Instance “ecp”, status READY, has 1 handler(s) for this service…
Service “ecp_XPT” has 1 instance(s).
Instance “ecp”, status READY, has 1 handler(s) for this service…
The command completed successfully

您可能感興趣的文章:
  • Oracle監(jiān)聽器被優(yōu)化大師掛掉后的完美解決方法
  • Linux下重啟oracle服務(wù)及監(jiān)聽器和實(shí)例詳解
  • Oracle監(jiān)聽口令及監(jiān)聽器安全詳解
  • Oracle監(jiān)聽器服務(wù)不能啟動(dòng)的解決方法
  • Oracle 11g2的監(jiān)聽器配置教程
  • Oracle安裝監(jiān)聽器錯(cuò)誤的解決方法

標(biāo)簽:開封 甘肅 固原 承德 青島 和田 周口 武漢

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Oracle 監(jiān)聽器密碼設(shè)置方法(LISTENER)》,本文關(guān)鍵詞  Oracle,監(jiān)聽器,密碼,設(shè)置,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Oracle 監(jiān)聽器密碼設(shè)置方法(LISTENER)》相關(guān)的同類信息!
  • 本頁收集關(guān)于Oracle 監(jiān)聽器密碼設(shè)置方法(LISTENER)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    广水市| 通化县| 康定县| 呼和浩特市| 隆回县| 大余县| 同仁县| 郸城县| 科技| 张家界市| 嘉兴市| 柯坪县| 滁州市| 叶城县| 呼伦贝尔市| 什邡市| 金塔县| 肇州县| 汕尾市| 九龙城区| 广平县| 象山县| 淮阳县| 洛川县| 威宁| 临漳县| 屏边| 宁晋县| 金塔县| 临泽县| 江孜县| 绵阳市| 淮滨县| 温州市| 大化| 应城市| 板桥市| 龙江县| 中江县| 台中市| 拜泉县|