OracleHA high availability (II. In-depth analysis of TAF and HA Framework)

Source: Internet
Author: User
Tags taf

OracleHA high availability (II. In-depth analysis of TAF and HA Framework)

Oracle HA high availability (one, client, server service details): http://write.blog.csdn.net/postedit

We have seen that the Oracle session of TAF can be automatically reconnected. It must be noted that this capability is based on OCI and is a function of OCI, and JDBC Thin Driver is invalid, because this driver is not built on the OCI library.

Although this function was initiated by RAC, TAF is not limited to RAC, and can be enjoyed by single instances and DG environments. Oralce claims that its TAF can ensure that user sessions are automatically transferred to another instance. This is true, but it has moisture. In order to gain a deeper understanding of TAF, we will conduct a more detailed experiment.

1. TAF and transactions

In the RAC environment, you can migrate a user session to another instance in three ways, including altersystem disconnect from session, shutdown, and dbms_service packages, these three methods have the same background mechanism and effect. These three methods can migrate a session transparently or elegantly from one instance to another. For this session, I don't even feel this kind of migration. In this experiment, we will use the alter system method. The syntax of this command is as follows:

Altersystem disconnect session [post_transaction | immediate];

This command has the following options:

Post_transaction: disconnect an existing connection after the transaction is committed;

Immediate: disconnect immediately;

Oracle cluster HA framework terminology

(1) Resource)

The Resource must be managed by CRS. Generally speaking, it refers to a group of processes with fire.

(2) Resource Dependency (Resource Dependency)

Different resources have dependencies. For example, if you use ASM as the storage database, the database instance depends on the ASM instance. This dependency is reflected in that the ASM instance must be started before the database instance, and can be closed only after the database instance is closed. Resource Dependency is used to describe this relationship, which is defined by the REQUIRED_RESOURCES parameter.

(3) Application Profile (Application description file)

Application Profile is a file used to tell CRS how to manage applications. This file describes the attributes of an application in the format of "property = value", such as resource scripts, resource dependencies, and resource inspection frequency. When using Oraclecluster HA, the first step is to create this file, but this file is a transitional file, and the content of the file is finally registered to OCR.

(4) Action Program

Action Program is an executable file that enables binary files and SHELL scripts. The Oracle Cluster HA architecture uses this script to start, close, check, and transfer resources. This script must be able to process the start, stop, and check parameters.

(5) OCR

When configuring the HA cluster of a third-party Application, the content of Application Profile must be registered to OCR. Oracle Cluster reads the configuration content from OCR rather than Application Profile when working.

Configuration command

(1) crs_profile

There are two files to be created during configuration: Application Profile and ActionProfile. The former is a configuration file and the latter is a SHELL script. However, you do not need to create these two files manually. You can use this command to create them automatically. You only need to modify the files.

[Root @ felix1bin] #./crs_profile-h

Usage: crs_profile-create resource_name-t application

[-Dir directory_path] [-a action_script] [-B binary_pathname]

[-D description] [-h hosting_members] [-r required_resources]

[-L optional_resources] [-p placement_policy]

[-O as = auto_start, ci = check_interval, ft = failure_threshold,

Fi = failure_interval, ra = restart_attempts, fd = failover_delay,

St = script_timeout, ap = active_placement,

Ut = uptime_threshold, rt = start_timeout, pt = stop_timeout] [-f] [-q]

Crs_profile-create resource_name-I template_file [-dir directory_path] [-f] [-q]

Crs_profile-delete resource_name [-dir directory_path] [-q]

Crs_profile-print [resource_name [...] [-dir directory_path] [-q]

Crs_profile-template resource_name [-dir directory_path] [-Otemplate_file]

Crs_profile-template-t application [-O template_file]

Crs_profile-update resource_name [-dir directory_path] [option...] [-ooption,...] [-q]

Crs_profile-validate resource_name [-dir directory_path] [-q]

[Root @ felix1 bin] #

Related Article

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.