脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2012-03-13 16:39:38
1.试着尝试使用dbms_service来停止和删除XDB服务.
SQL>Begin
Dbms_Service.Disconnect_Session('oraclXDB');
End;
/
PL/SQL procedure successfully completed.
SQL>Begin
dbms_service.stop_service('oraclXDB');
End;
/
PL/SQL procedure successfully completed.
SQL> Begin
dbms_service.delete_service('oraclXDB');
End;
/
Begin
*
ERROR at line 1:
ORA-44305: service oraclXDB is running
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_SERVICE", line 434
ORA-06512: at "SYS.DBMS_SERVICE", line 323
ORA-06512: at line 2
从以上过程发现使用dbms_service不能停止该服务.最后多次尝试不成功的情况下使用修改dispatchers参数的方法.
SQL> show parameters dispatchers;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=oraclX
DB)
max_dispatchers integer
SQL>
SQL> alter system set dispatchers='' scope=both;
System altered.
2.XPT服务是数据库动态注册的(pmon进程动态注册端口为1521的监听器,若想pmon动态监听到1521以外的端口需要使用alter system register注册),停止该服务将本地的监听器指向一个不存在的监听器即可,如下(监听器test并不存在):
SQL> alter system set local_listener='test' scope=both;
System altered.
或是通过设置隐含参数停止XPT服务.
alter system set "__dg_broker_service_names"='' scope=spfile;
-- The End--