移除XDB 的方法,在10g的OTN上有说明:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/appaman.htm%23sthref2384
Removethe dispatcher by removing the Oracle XML DB dispatcher entry from the init.orafile as follows:
dispatchers="(PROTOCOL=TCP)(SERVICE=<sid>XDB)"
If the server parameter file is used, runthe following command when the instance is up and while logged in as SYS:
ALTERSYSTEM RESET dispatchers scope=spfile sid='*';
示例:
SYS@dave2(db2)> ALTER SYSTEM RESETdispatchers scope=spfile sid='*';
System altered.
但是查看dba_services 还是可以查到该值:
SYS@dave2(db2)> select name fromdba_services where name='dave2XDB';
NAME
---------------
dave2XDB
SYS@dave2(db2)> show parameter dispatchers
NAME TYPE VALUE
--------------------------- -----------------------------------------
dispatchers string (PROTOCOL=TCP)(SERVICE=dave2XDB)
max_dispatchers integer
将监听重启一下:
[oracle@db2 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 10.2.0.1.0 -Production on 19-JUL-2011 19:34:18
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db2)(PORT=1521)))
The command completed successfully
[oracle@db2 ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 -Production on 19-JUL-2011 19:34:26
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting/u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 -Production
System parameter file is/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to/u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db2)(PORT=1521)))
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version10.2.0.1.0 - Production
Start Date 19-JUL-2011 19:34:27
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db2)(PORT=1521)))
Services Summary...
Service "PLSExtProc"has 1 instance(s).
Instance "PLSExtProc",status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@db2 ~]$ lsnrctl service
LSNRCTL for Linux: Version 10.2.0.1.0 -Production on 19-JUL-2011 22:43:44
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db2)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) forthis service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "dave2" has 1instance(s).
Instance "dave2", status READY, has 1 handler(s) for thisservice...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "dave2_XPT" has 1instance(s).
Instance "dave2", status READY, has 1 handler(s) for thisservice...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
--SIDXDB 已经没有了
SYS@dave2(db2)>show parameter dispa
NAME TYPE VALUE
----------------------------------------------- ------------------------------
dispatchers string
max_dispatchers integer
通过参数已经看不到了。但通过dba_services还可以查到。
SYS@dave2(db2)> select name fromdba_services where name='dave2XDB';
NAME
----------------------------------------------------------------
dave2XDB
SYS@dave2(db2)> select comp_name,status, version from DBA_REGISTRY where comp_name='Oracle XML Database';
COMP_NAME STATUS VERSION
--------------- ----------------------------------------------------
Oracle XML Data VALID 10.2.0.1.0
如果要停用XML DB 特性,可以drop xdb 服务
SYS@dave2(db2)> execdbms_service.delete_service('dave2XDB');
PL/SQL procedure successfully completed.
然后查看dba_services 视图,就没有该记录了
SYS@dave2(db2)> select name fromdba_services where name='dave2XDB';
no rows selected |