时间:2021-07-01 10:21:17 帮助过:2人阅读
The DBMS_SERVICE package allows the creation, deletion, starting and stopping of services in both RAC and a single instance. Additionally it provides the ability to disconnect all sessions which connect to the instance
with a service name when RAC removes that service name from the instance.
The DBMS_SERVICE package lets you create, delete, activate and deactivate services for a single instance.
- Functions :
SQL> exec dbms_service.START_SERVICE(‘orderentry‘)
It Recommended to have the LOCAL_LISTENER (Database) parameter set for the Database :
If You are using the default local address of TCP/IP, port 1521 :
alter system set LOCAL_LISTENER = ‘(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTNAME or IP Add)(PORT=1521))‘ scope=spfile;
If You are using non default local address of TCP/IP, port other than 1521 :
alter system set LOCAL_LISTENER = ‘(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTNAME or IP Add)(PORT=1522))‘ scope=spfile;
References:
http://docs.oracle.com/cd/E11882_01/network.112/e41945/listenercfg.htm#CHDCCHIC
SQL> exec dbms_service.STOP_SERVICE(‘orderentry‘)
SQL> exec dbms_service.DELETE_SERVICE(‘orderentry‘)
-Monitoring
Use the following dictionary views to monitor services:
* dba_services - All defined services
* gv$active_services - All active (started) services
To see what service a session is connected to:
【翻译自mos文章】在Oracle单机数据库中定义database service
标签: