Skip Headers

PL/SQL Packages and Types Reference
10g Release 1 (10.1)

Part Number B10802-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

85
DBMS_SERVICE

The DBMS_SERVICE package lets you create, delete, activate and deactivate services for a single instance.

The chapter contains the following topics:


Using DBMS_SERVICE


Security Model

The client using this package should have the ALTER SYSTEM execution privilege and the V$SESSION table read privilege.


Summary of DBMS_SERVICE Subprograms

Table 85-1  DBMS_SERVICE Package Subprograms  
Subprogram Description

CREATE_SERVICE Procedure

Creates service

DELETE_SERVICE Procedure

Deletes service

DISCONNECT_SESSION Procedure

Disconnects service

START_SERVICE Procedure

Activates service

STOP_SERVICE Procedure

Stops service


CREATE_SERVICE Procedure

This procedure creates a service name in the data dictionary. Services are also created in the data dictionary implicitly when you set the service in the servive_names parameter or by means of the ALTER SYSTEM SET service_names command.

Syntax

DBMS_SERVICE.CREATE_SERVICE(
   service_name IN VARCHAR2,
   network_name IN VARCHAR2);

Parameters

Table 85-2  CREATE_SERVICE Procedure Parameters
Parameter Description

service_name

The name of the service limited to 64 characters in the Data Dictionary.

network_name

The network name of the service as used in SQLNet connect descriptors for client connections.

Examples

DBMS_SERVICE.CREATE_SERVICE('ernie.us.oracle.com','ernie.us.oracle.com');

DELETE_SERVICE Procedure

This procedure deletes a service from the data dictionary.

Syntax

DBMS_SERVICE.DELETE_SERVICE(
   service_name   IN VARCHAR2);

Parameters

Table 85-3  DELETE_SERVICE Procedure Parameters
Parameter Description

service_name

The name of the service limited to 64 characters in the Data Dictionary.

Examples

DBMS_SERVICE.DELETE_SERVICE('ernie.us.oracle.com');

DISCONNECT_SESSION Procedure

This procedure disconnects sessions with the named service at the current instance.

Syntax

DBMS_SERVICE.DISCONNECT_SESSION(
   service_name   IN VARCHAR2);

Parameters

Table 85-4  DISCONNECT_SESSION Procedure Parameters
Parameter Description

service_name

The name of the service limited to 64 characters in the Data Dictionary

Usage Notes

This procedure can be used in the context of a single instance as well as with Real Application Clusters.

Examples

DBMS_SERVICE.DISCONNECT_SESSION('ernie.us.oracle.com');

This disconnects sessions with service_name 'ernie.us.oracle.com'.


START_SERVICE Procedure

This procedure starts a service.

Syntax

DBMS_SERVICE.START_SERVICE(
   service_name  IN VARCHAR2, 
   instance_name IN VARCHAR2);

Parameters

Table 85-5  START_SERVICE Procedure Parameters
Parameter Description

service_name

The name of the service limited to 64 characters in the Data Dictionary.

instance_name

The name of the instance where the service should be activated (optional).

Examples

DBMS_SERVICE.START_SERVICE('ernie.us.oracle.com');

STOP_SERVICE Procedure

This procedure stops a service.

Syntax

DBMS_SERVICE.STOP_SERVICE(
   service_name   IN VARCHAR2, I
   instance_name  IN VARCHAR2);

Parameters

Table 85-6  STOP_SERVICE Procedure Parameters
Parameter Description

service_name

The name of the service limited to 64 characters in the Data Dictionary.

instance_name

The name of the instance where the service should be stopped (optional).

Examples

DBMS_SERVICE.STOP_SERVICE('ernie.us.oracle.com');