Thursday, November 09, 2006

DBMS_SERVICE and net service names

Oracle 10gR1 was the first release to come with the package DBMS_SERVICE.
This package can be used to manage services for single instances.
There are procedures for creation , activation, deactivation, and removing of services.
We can measure workloads and limit resources through services and there are more and more concepts which are using services.
A RAC has the capability of managing services across instances.

The package contains a number of constants, exceptions and subprogramms.

Here is an example for the creation of a service on a single instance:

PL/SQL procedure successfully completed.

SQL> exec dbms_service.START_SERVICE('HALLO')
SQL> show parameter service
------------------------------------ ----------- ------------------------------
service_names string OTTO

The confusing thing here is that the parameter NETWORK_NAME is in fact the value returned in the initialization parameter SERVICE_NAMES!

And the parameter
SERVICE_NAME is the values used for the net service name in tnsnames.ora!!

This is crazy I think! How confusing and misleading this is!

Therefore you should use the same value for both parameters in the call of the procedure!


Post a Comment

<< Home