Oracle監聽器中的XDB、XPT和PLSExtProc服務
Oracle監聽器中的XDB、XPT和PLSExtProc服務
資料庫在shutdown狀態下,僅有PLSExtProc服務,且處於未知狀態。
資料庫在nomount狀態下,有SID、SIDXDB、SID_XPT、PLSExtProc服務,其中,SID、SIDXDB、SID_XPT服務處於
就緒/準備狀態,PLSExtProc處於未知狀態。
下面分別介紹各個服務的作用:
SID:啟動資料庫例項的服務
SIDXDB:高效處理XML資料的服務,預設會佔用8080埠。
SID_XPT:Oracle 10g為DG準備的服務,DB BROKER會用到,如果不用DG可以刪掉。
PLSExtProc:PL/SQL呼叫外部介面(C、JAVA編寫的過程)的服務——容易受攻擊
觀察監聽在資料庫每個狀態下各個服務的啟動情況和狀態:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
注:資料庫在shutdown狀態下,僅有PLSExtProc服務,且處於未知狀態。
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 826277888 bytes
Fixed Size 1222096 bytes
Variable Size 473958960 bytes
Database Buffers 348127232 bytes
Redo Buffers 2969600 bytes
Service "C2155" has 1 instance(s).
Instance "C2155", status BLOCKED, has 1 handler(s) for this service...
Service "C2155_XPT" has 1 instance(s).
Instance "C2155", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
注:資料庫在nomount狀態下,有SID、SID_XPT、PLSExtProc服務,其中,SID、SID_XPT服務處於封鎖狀態,PLSExtProc處於未知狀態。
SQL> alter database mount;
Database altered.
Services Summary...
Service "C2155" has 1 instance(s).
Instance "C2155", status READY, has 1 handler(s) for this service...
Service "C2155_XPT" has 1 instance(s).
Instance "C2155", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
注:資料庫在nomount狀態下,有SID、SID_XPT、PLSExtProc服務,其中,SID、SID_XPT服務處於就緒/準備狀態,PLSExtProc處於未知狀態。
SQL> alter database open;
Database altered.
Services Summary...
Service "C2155" has 1 instance(s).
Instance "C2155", status READY, has 1 handler(s) for this service...
Service "C2155XDB" has 1 instance(s).
Instance "C2155", status READY, has 1 handler(s) for this service...
Service "C2155_XPT" has 1 instance(s).
Instance "C2155", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
【LISTENER】使用Oracle隱含引數禁止“_XPT”服務註冊到監聽器
在Oracle的10.2版本中,Oracle不僅會將資料庫的例項註冊到監聽器,與此同時還會註冊生成一個名為_XPT(以資料庫的SID開頭,以XPT結尾,中間是下劃線)的服務,這個服務是用於Data Guard環境,對正常資料庫連線沒有影響。鑑於_XPT服務的作用,我們完全有理由取消這個註冊。這裡給出禁止_XPT服務註冊到監聽器的方法。
我們可以通過將隱含引數“__dg_broker_service_names”內容置空的方法達到這個目的。
1.“__dg_broker_service_names”隱含引數的含義
可以通過x$ksppi和x$ksppcv獲取隱含引數的當前值和說明資訊。查詢結果如下。
sys@ora10g> select a.ksppinm param_name,b.ksppstvl param_value,a.ksppdesc param_description from x$ksppi a,x$ksppcv b where a.indx = b.indx and a.ksppinm = '__dg_broker_service_names';
PARAM_NAME PARAM_VALUE PARAM_DESCRIPTION
-------------------------- ------------- ----------------------------
__dg_broker_service_names ora10g_XPT service names for broker use
2.監聽器狀態資訊
ora10g@secdb /home/oracle$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-AUG-2011 21:19:58
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb)(port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-AUG-2011 21:19:12
Uptime 0 days 0 hr. 0 min. 46 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/ora10gR2/product/10.2.0/db_2/network/admin/listener.ora
Listener Log File /oracle/ora10gR2/product/10.2.0/db_2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb.localdomain)(PORT=1521)))
Services Summary...
Service "ora10g" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
Service "ora10g_XPT" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
The command completed successfully
其中“ora10g_XPT”便是我們所提到的_XPT服務。我們的目標就是去除這個註冊資訊。
3.將“__dg_broker_service_names”隱含引數置空
sys@ora10g> alter system set "__dg_broker_service_names" = '';
System altered.
注意,此隱含引數為動態引數,可以直接進行調整。
4.重啟監聽器後檢視監聽狀態
1)停止監聽器
LSNRCTL> stop
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb)(port=1521)))
The command completed successfully
2)啟動監聽器
LSNRCTL> start
Starting /oracle/ora10gR2/product/10.2.0/db_2/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/ora10gR2/product/10.2.0/db_2/network/admin/listener.ora
Log messages written to /oracle/ora10gR2/product/10.2.0/db_2/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb)(port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-AUG-2011 21:22:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/ora10gR2/product/10.2.0/db_2/network/admin/listener.ora
Listener Log File /oracle/ora10gR2/product/10.2.0/db_2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
3)等待資料庫例項註冊到監聽後檢視監聽器狀態
ora10g@secdb /home/oracle$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-AUG-2011 21:23:00
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb)(port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-AUG-2011 21:22:40
Uptime 0 days 0 hr. 0 min. 21 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/ora10gR2/product/10.2.0/db_2/network/admin/listener.ora
Listener Log File /oracle/ora10gR2/product/10.2.0/db_2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb.localdomain)(PORT=1521)))
Services Summary...
Service "ora10g" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
The command completed successfully
此時ora10g_XPT服務已經不在監聽中註冊。任務完成。
5.小結
在非Data Guard環境的Oracle 10.2版本及以上環境,我們都可以使用此方法實現禁止_XPT服務註冊到監聽器。消除一切疑惑的內容,將資料庫的執行狀態掌握在自己的手中。
About Me
........................................................................................................................ ● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除 ● 本文在itpub、部落格園、CSDN和個人微 信公眾號( xiaomaimiaolhr )上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文部落格園地址: http://www.cnblogs.com/lhrbest ● 本文CSDN地址: https://blog.csdn.net/lihuarongaini ● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA寶典今日頭條號地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● QQ群號: 230161599 (滿) 、618766405 ● 微 信群:可加我微 信,我拉大家進群,非誠勿擾 ● 聯絡我請加QQ好友 ( 646634621 ) ,註明新增緣由 ● 於 2019-07-01 06:00 ~ 2019-07-31 24:00 在西安完成 ● 最新修改時間:2019-07-01 06:00 ~ 2019-07-31 24:00 ● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店 : https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麥苗出版的資料庫類叢書 : http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麥苗OCP、OCM、高可用網路班 : http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麥苗騰訊課堂主頁 : https://lhr.ke.qq.com/ ........................................................................................................................ 使用 微 信客戶端 掃描下面的二維碼來關注小麥苗的微 信公眾號( xiaomaimiaolhr )及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。
........................................................................................................................ |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2652121/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20200115]監聽中沒有xdb服務.txt
- oracle監聽不到例項服務Oracle
- javaWeb中的監聽器JavaWeb
- Spring Data JPA中事務監聽器TransactionExecutionListenerSpring
- 監聽器和過濾器過濾器
- 事件和事件監聽器事件
- centos 7 下搭建zabbix監聽服務CentOS
- oracle靜態監聽Oracle
- JMS監聽Oracle AQOracle
- Windows平臺如何修改監聽的服務名稱?Windows
- Rpc-實現Client對ZooKeeper的服務監聽RPCclient
- Springboot中自定義監聽器Spring Boot
- 過濾器和監聽器總結過濾器
- Netty中自定義事件處理程式和監聽器Netty事件
- Oracle dblink監聽問題Oracle
- 6、oracle網路(監聽)Oracle
- Oracle監聽程式當前無法識別連線描述符中請求服務 解決方法Oracle
- netty服務端監聽客戶端連線加入和斷開事件Netty服務端客戶端事件
- Spring5原始碼解析-Spring框架中的事件和監聽器Spring原始碼框架事件
- Oracle 11g/12c 監聽器白名單的配置Oracle
- oracle 最全的監聽、tnsnames.ora格式Oracle
- Oracle 監聽異常處理Oracle
- Oracle啟動兩個監聽Oracle
- Oracle 建立非1521埠監聽Oracle
- Oracle 監聽投毒COST解決Oracle
- 【經典】連線oracle的總結(關於tnsname和監聽)Oracle
- [20180509]配置靜態監聽服務與ORA-12514
- Spring中如何優雅的使用監聽器模式Spring模式
- Vue3.0的遞迴監聽和非遞迴監聽Vue遞迴
- JMeter—監聽器(十二)JMeter
- npmscript命令同時開啟多個監聽服務concurrentlyNPM
- oracle rac scan監聽更改埠號Oracle
- Spring Boot 中動態管理 Kafka 監聽器Spring BootKafka
- 屬性和監聽
- oracle 資料庫lsnrctl監聽的日誌路徑和trace檔案Oracle資料庫
- 解決Oracle XDB與Tomcat等的8080埠的衝突OracleTomcat
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- springBoot的過濾器,監聽器,攔截器Spring Boot過濾器