7 managing Database Workload Using Services

Source: Internet
Author: User
Tags failover sessions

7 managing Database Workload Using Services
A database service can only is offered on a single network.

By default, the named user may create a server pool. To restrict the operating system users, which has this privilege, Oracle strongly recommends so you add specific users to The CRS Administrators list. See Oracle Clusterware Administration and Deployment Guide for more information on adding users to the CRS Administrato RS list.

You can define services for both policy-managed and administrator-managed databases.
You can define a policy-managed and administrator-managed managed database service at the same time.

Policy-managed Database:when You define services for a policy-managed database, you assign the service to a server pool W Here the database is running. You can define the service as either uniform (running on all instances in the server pool) or singleton (running on only O NE instance in the server pool).

Administrator-managed Database:when Define a service for an administrator-managed database, you define which instance s normally support the that service. These is known as the PREFERRED instances. You can also define other instances-to-support a service if the preferred instance fails. These is known as AVAILABLE instances.
-----If you select a database for administrator-managed, you can define a preferred (PREFERRED) instance, which can be transferred to another instance if the preferred instance fails.

About Service Failover in administrator-managed Databases
When you specify a preferred instance for a service, the service runs on that instance during normal operation. Oracle Clusterware attempts to ensure, the service always runs on all the preferred instances that has been configure D for a service. If The instance fails, then the service was relocated to an available instance. You can also manually relocate the service to an available instance.

If A service fails over to an available instance and then the service was not moved back to its preferred instance automatical Ly. However, you can automate the relocation of a service to its preferred instance by using a callout.

-----Note: If the service fails on the active instance, the service will not be able to automatically return to the previous preferred instance. However, you can use the fan callout to automatically switch services to his preferred instance!!!!

This is the service that you want to be able to switch automatically through scripting.

About FAN Callouts

FAN callouts is server-side executable files, Oracle RAC runs immediately when high availability events occur. A callout is essentially a shell script or precompiled executable written in any programming language. Some examples of how can I use FAN callouts to automate the actions performed when events occur in a cluster Configurati On is as follows:

Starting and stopping Server-side applications
Relocating low-priority services when High-priority services come online
Sending text or numeric messages to pagers
Executing shell scripts
The executable files for FAN callouts is stored in the Grid_home/racg/usrco subdirectory. If This subdirectory does isn't exist in your Grid home, then you must create this directory with the same permissions and O Wnership as the grid_home/racg/tmp subdirectory.
the script for-----FAN callout is placed under Grid_home/racg/usrco. If the subdirectory does not exist, you must create an identical permission and belong to the same group as the grid_home/racg/tmp.

About Connection Load balancing
When the client connects to the cluster database using a service, you can use the Oracle Net Connection load Balancing FEA Ture to spread user connections across all the instances that is supporting that service. There is types of load balancing that can implement:client-side and server-side load balancing. In a Oracle RAC database, client connections should use both types of connection load balancing. When you create an Oracle RAC database using Oracle database Configuration Assistant (DBCA), DBCA configures and enables S Erver-side load balancing by default.
------If you use the service name to connect to the RAC database, you can use the Connection replication equalization feature. There are two types of load balancing: Client-side and Server-side. In a RAC database, client connections should use two types
Connection load Balancing. When you use DBCA to create an Oracle database, DBCA automatically configures and enables Server-side load balancing by default.

About Client-side Load balancing
Client-side Load Balancing balances the connection requests across the listeners. When the listener receives the connection request, the listener connects the user to a instance that the listener knows P Rovides the requested service.

Client-side load balancing is defined in your client connection definition by setting the parameter Load_balance=yes in th e Tnsnames.ora file. When you set this parameter to Yes, the Oracle client randomly selects a address from the address list, and connects to T Hat node ' s listener. This balances client connections across the available listeners in the cluster.

When you create an Oracle RAC database using DBCA, the assistant creates a sample load balancing connection definition in The Tnsnames.ora file.
----When you create a RAC database using DBCA, DBCA automatically defines an example of load balancing in Tnsnames.ora.
Client-side load Balancing includes connection failover. With connection failover, if a error is returned from the chosen address, then Oracle Net Services tries the next address In the address list until either a successful connection are made or it has exhausted all the addresses in the list.
-----client-side Load Balancer contains the failover of the connection.

About Server-side Load balancing

With Server-side load balancing, the listener directs a connection request to the best instance currently providing the SE Rvice by using information from the Load balancing advisory.

For each service, you can define the method the listener uses for load balancing by setting the connection load balancing Goal. You can use a goal of either long or short for connection load balancing. These goals has the following characteristics:

Short-connections is distributed across instances based on the amount of time the service is used. Use the short connection load balancing goal for applications that has connections of brief duration.

Long-connections is distributed across instances based on the number of sessions in each instance, for each instance that Supports the service. Use the long connection load balancing goal for applications that has connections of long duration. This is typical for connection pools and sql*forms sessions. Long is the default connection load balancing goal.

Any services created by using DBCA, the Long connection load balancing goal by default.
By default, any default service created through DBCA uses a long connection load balancer

If you do not use a DBCA to create your database, or if you is using listener ports other than the default of 1521 and then Y OU must configure the Local_listener and Remote_listener database initialization parameters for your cluster database to P Oint to Scan:port.

Note: If you are not using DBCA to build the library or the listening port is not the default port (1521), you must configure the Local_listener,remote_listener parameter.

7 managing Database Workload Using Services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.