remote_listener和listener password
測試版本:10.2.0.1
接下來來看上面提到的2個問題:
1.如何把sevice_names註冊到遠端的lisenter上,目前db的資訊如下,資料庫執行在windows下
C:>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 1月 16 22:05:49 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter service_names
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string ABC
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl
SQL>
在win下的tnsnames.ora中加入下面內容:
LISTENER_R =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.253)(PORT = 1521))
這裡的ip:192.168.0.253對應的是一臺linux主機
之後修改win下db的
SQL> alter system set remote_listener=LISTENER_R;
系統已更改。
SQL>
之後轉移到linux主機下觀察listener的狀態:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xys)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 16-JAN-2010 21:56:50
Uptime 0 days 0 hr. 13 min. 10 sec
Trace Level off
Security ON: Password
SNMP OFF
Listener Parameter File /opt/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xys)(PORT=1521)))
Services Summary...
Service "ABC" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "ORCL" has 2 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "TEST" has 2 instance(s).
Instance "TEST", status UNKNOWN, has 1 handler(s) for this service...
Instance "TEST", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "test_XPT" has 1 instance(s).
Instance "TEST", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
清楚的發現了下面的資訊:
Service "ABC" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
.........
service...
Instance "orcl", status READY, has 1 handler(s) for this service...
這2條資訊都是win下db的service_names(值為A,orcl是win下db的db_name,這個不論service_names是否有值,始終都會使用db_name進行動態註冊的)
2.db的service_names進行了遠端註冊之後,我們可以把遠端的listener,這裡是linux主機看作是listner的server段,把windows主機看作是client段,這樣稱呼不知道是否準確.危險的事情出現了,在9i我們可以直接在listener 的client段(windows機器上)直接把遠端的listener(linux機器上)停止,這是非常危險的,oracle為了防止這樣的事情發生,提供了為listener設定密碼.10g進行了安全性加強,從client段嘗試停止遠端的listener時出現如下錯誤:
LSNRCTL> stop listener_r
正在連線到 (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.253)(PORT=1521))
TNS-01189: 監聽程式無法驗證使用者
LSNRCTL> exit
C:>set nls_lang=american_
C:>lsnrctl
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-JAN-2010 21:51
:04
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> stop listener_r
Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.253)(PORT=1521))
TNS-01189: The listener could not authenticate the user
在remote listener(listener server段,這裡是linux機器上)上設定password之後:
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xys)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xys)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /opt/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Old Parameter File /opt/app/oracle/product/10.2.0/db_1/network/admin/listener.bak
The command completed successfully
在listener的server段為listener設定口令之後繼續在client段嘗試停止listener:
LSNRCTL> stop listener_r
Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.253)(PORT=1521))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password manager
The command completed successfully
LSNRCTL> stop listener_r
Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.253)(PORT=1521))
The command completed successfully
檢查遠端listener(linux機器上)的狀態:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xys)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL>
很listener已經從client段被成功stop了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1030631/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- remote_listener和local_listenerREM
- local_listener ,remote_listener 的配置REM
- LOCAL_LISTENER 和 REMOTE_LISTENER說明 ——轉自chinaunixREM
- 關於local_listener、remote_listener、current_listenerREM
- local_listener與remote_listener詳述REM
- 關於RAC的remote_listenerREM
- local_listener 與 remote_listener 引數說明REM
- remote_listener引發的故障分析REM
- 為oracle listener set passwordOracle
- REMOTE_LISTENER對靜態FAILOVER的影響REMAI
- REMOTE_LISTENER對LOAD_BALANCE的影響(二)REM
- REMOTE_LISTENER對LOAD_BALANCE的影響(一)REM
- No need to set a listener password in ORACLE 10GOracle 10g
- ORA-00119: invalid specification for system parameter REMOTE_LISTENERREM
- 取消某個節點的remote_listener, 使它上面的應用獨立REM
- 客戶端設定了load balance , Server端就不用remote_listener了吧?客戶端ServerREM
- lsnrctl中,SET PASSWORD和CHANGE_PASSWORD命令
- Django中的函式make_password、set_password和check_passwordDjango函式
- Oracle WebLogic Default Password & Change PasswordOracleWeb
- Listener
- jQuery :passwordjQuery
- oracle listener 靜態和動態註冊Oracle
- oracle動態和靜態監聽listenerOracle
- VMware infrastructure web access 的login name和passwordASTStructWeb
- vmware server web access的login name和passwordServerWeb
- 【PROFILE】PASSWORD_REUSE_TIME和PASSWORD_REUSE_MAX引數在Oracle不同版本中的差別Oracle
- TNS Listener Hang, New Child Listener Process Forked
- Listener & FilterFilter
- Oracle ListenerOracle
- iOS Password AutoFilliOS
- password檔案
- Password Storage - UserDetailsAI
- 【024期】JavaWeb面試題(五):Filter和ListenerJavaWeb面試題Filter
- 504.3 Password and Access Attacks 密碼和訪問攻擊密碼
- JavaWeb-ListenerJavaWeb
- Filter&ListenerFilter
- An error from listenerError
- fitter&listener