Database Reference
In-Depth Information
In practice, application affinity and workload distribution coexist. Some application components use application
affinity to improve performance, and a few application components use workload distribution.
In addition to administrator-managed databases, you can also use policy-managed databases for workload
management. Oracle 11gR2 introduces policy-managed databases and Oracle version 12c enhances policy-managed
databases for dynamic policy management. Policy-managed databases are discussed later in this chapter.
Services
A service is a logical abstraction designed to group application components for optimal workload management.
By implementing a service-based connection design, the application workload can be affinitized, distributed, or
both. A database connection string specifies a service as a connection property, and the cluster processes distribute
new connections to an instance depending on the workload specification of the service. The performance metrics
of a service are also used by the listener processes to redirect the connection. Further, database processes calculate,
maintain, and propagate service metrics to facilitate workload distribution and failover techniques.
A typical database connection using a service is done according to the following steps:
1.
Application process sends a connection request specifying a service_name to the SCAN
(Single Client Access Name) listener.
2.
SCAN listener identifies the instance that can provide the best quality of service.
3.
SCAN listener redirects the connection to the VIP (virtual IP address) listener listening
locally for that instance.
4.
VIP listener creates a database connection process, and the application continues
processing the data by communicating to the connection process.
By default, every database has some default services created, as shown in the following query output. Default
services are marked as preferred in all instances; therefore, default services are not useful for workload management.
For example, a service SOLRAC matching the database name (db_name initialization parameter) is created, and that
service is preferred in all instances of the database. So, workload distribution among the instances of the database is
not effective using the SOLRAC service since connecting through that service can connect to any instance.
SQL> select name, goal from v$active_services
NAME GOAL
------------------------------ ------------
SOLRAC NONE
SYS$BACKGROUND NONE
SYS$USERS NONE
You need to create a new service to implement workload management properly. Only a service created by you
can be used effectively for workload management. There are many ways to create a service, such as using the srvctl
command, the dbms_service package call, or Oracle Enterprise Manager (OEM). In a single-instance database, you
can use the dbms_service package to create and manipulate a service. In RAC, you should not use the dbms_service
package call. Instead, it is better to use the srvctl command to create a service. The srvctl command creates a cluster
resource in Clusterware, in addition to creating a service in the database. This cluster resource for a service is
monitored for availability, and the resource is failed over in cases of instance failure.
 
Search WWH ::




Custom Search