When you create and administer services, you are dividing the work that your database performs into manageable units. The goal of using services is to achieve optimal utilization of your database infrastructure. You can create and deploy services based on business requirements. Oracle Database can measure the performance for each service. Using the
DBMS_MONITOR package, you can define both the application modules within a service and the individual actions for a module and monitor thresholds for these actions, enabling you to manage workloads to deliver capacity on demand.
When you create new services for your database, you should define the automatic workload management characteristics for each service, as described in "Service Characteristics".
Oracle Database Quality of Service Management User's Guide if you are using Oracle Database QoS Management with your Oracle cluster for details on how to configure the database services
"Enabling Clients for Oracle RAC" for more details
In addition to creating services, you can:
Delete a service. You can delete services that you created. However, you cannot delete or modify the properties of the default database service that Oracle Database created.
Check the status of a service. A service can be assigned different roles among the available instances. In a complex database with many services, you may not remember the details of every service. Therefore, you may have to check the status on an instance or service basis. For example, you may have to know the status of a service for a particular instance before you make modifications to that instance or to the Oracle home from which it runs.
Start or stop a service for a database or an instance. A service must be started before it can be used for client connections to that instance. If you shut down your database, for example, by running the SRVCTL command
srvctl stop database -d
db_unique_name is the name of the database you want to stop, then Oracle Database stops all services for that database. Depending on the service management policy, you may have to manually restart the services when you start the database. Both the
srvctl stop database and
srvctl stop service commands accept the
-force option to forcibly disconnect connections. To drain sessions for planned outages do not use the
If Oracle Database QoS Management is enabled for the Oracle RAC database, then the services are automatically restarted after they are stopped.
Map a service to a consumer group. You can map services to Resource Manager Consumer groups to limit the amount of resources that services can use in an instance. You must create the consumer group and then map the service to the consumer group.
Oracle Database PL/SQL Packages and Types Reference for information about the
Enable or disable a service for a database or an instance. By default, Oracle Clusterware attempts to restart a service automatically after failures. You can prevent this behavior by disabling a service. Disabling a service is useful when you must perform database or instance maintenance, such as when you are performing an upgrade and you want to prevent connection requests from succeeding.
Relocate a service to a different instance. You can move a service from one instance to another instance to re-balance workloads, for example, after adding or deleting cluster nodes.
When you use services, do not set a value for the
SERVICE_NAMES parameter; Oracle Database controls the setting for this parameter for the services that you create and for the default database service. The service features that this chapter describes are not directly related to the features that Oracle Database provides when you set
SERVICE_NAMES. In addition, setting a value for this parameter may override some benefits of using services.
Service status information must be obtained from SRVCTL or from the service-related database views, such as
If you specify a service using the
DISPATCHERS initialization parameter, it overrides any service in the
SERVICE_NAMES parameter, and cannot be managed. (For example, stopping the service with a SRVCTL command does not stop users connecting with the service.)