Friday, March 14, 2014

Using DBMS_SERVICE to manage service

Services can be ceate/delete/stop/start by DBMS_SERVICE package

exec DBMS_SERVICE.DELETE_SERVICE('MYSERVICE');

exec DBMS_SERVICE.CREATE_SERVICE('MYSERVICE','MYSERVICE');

exec DBMS_SERVICE.START_SERVICE('MYSERVICE','MYINSTANCE1');
exec DBMS_SERVICE.START_SERVICE('MYSERVICE','MYINSTANCE2'); -- rac
...

In RAC services should be managed by "srvctl ... service". However there are some exceptions, for example you can not manage default database service with srvctl.


No comments: