[Data Guard]Oracle10g Data Guard学习笔记(一)

1. Oracle Data Guard: Overview

Types of Standby Databases

Physical standby database block-for-block, redo apply

Logical standby database Shares the same schema definition, SQL apply

Types of Services

Redo transport services, Log apply services, Role-management services

Role Transitions

Switchover

Failover

Data Protection Modes

Maximum protectioncommit完成前保证redo已被写入主数据库和至少一个备数据库,备机若异常不能传输redo则主库自动下掉

Maximum availability:备机正常情况下同最大保护模式,异常情况下同最大性能模式

Maximum performanceredo异步传输,不影响主数据库性能

2. Understanding the Oracle Data Guard Architecture

Data Guard Operational Requirements: Hardware and Operating System

硬件配置可不同,操作系统版本可不同,操作系统和平台必须一致。如主备数据库在同一服务器,必须保持操作系统支持。

Data Guard Operational Requirements: Oracle Database Software

数据库版本一致,具有 sysdba权限,主备数据库有各自的控制文件,主数据库打开归档,enable forcing logging,如使用ASMOMF,则主备同时配置。

Primary Database Flow(process)

LGWR:同步方式下直接与RFS交互并等待确认,异步方式下直接提一个网络请求给LNSn

ARCn:也可与RFS交互进行redo的传输,同时对主备间的gap进行检查和处理

FAL:提供一种client/server的机制来处理主备间的gap,只要需要时启动进程。

Standby Database Flow(process)

RFS:负责接收redo,并将其写如standby redo log或直接写如archive log。与ARCnLNSn一一对应。

ARCn:负责将standby redo log归档

MRP:负责redo apply,只用与physical standby。使用alter database recover managed standby database则使用当前进程进行recovery。加上disconnect from session则起MRP后台进程。

LSP:对logical standbySQL apply操作进行控制

三种必须使用Standby Redo Logs的情况:

The maximum protection and maximum availability levels of data protection

Real-time apply

Cascaded redo log destinations

SQL Apply Process: Architecture

The reader process reads redo records from the archived redo log files.

The preparer processes convert the block changes into table changes or logical change records

(LCRs). At this point, the LCRs do not represent any specific transactions.

The builder process assembles completed transactions from the individual LCRs.

The analyzer process examines the records, possibly eliminating transactions and identifying

dependencies between the different transactions.

The coordinator process (LSP):

- Assigns transactions

- Monitors dependencies between transactions and coordinates scheduling

- Authorizes the commitment of changes to the logical standby database

The applier process:

- Applies the LCRs to the database

- Asks the coordinator process to approve transactions with unresolved dependencies (the

transactions are scheduled appropriately so that the dependencies are resolved)

- Commits the transactions

Real-Time Apply

普通方式下使用archive log进行redo applyreal-time方式下使用standby redo log进行apply

Start Real-Time Apply

Physical standby:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

Logical standby:

ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

Setting the DB_UNIQUE_NAME Parameter

Data guard使用db_unique_name参数来识别数据库,默认与db_name相同。使用EM配置DG时会自动为每个备库配置一个唯一的db_unique_name

Specifying Role-Based Destinations

可在log_archive_dest_n中配置valid项以使得数据库在不同的角色下使用不同的归档路径。

例如:LOG_ARCHIVE_DEST_2= location="/u01/app/oracle/oradata/orcldg2/arc",

valid_for=(STANDBY_LOGFILE,STANDBY_ROLE)

The RFS process writes to an archive redo log file if any of the following conditions are met:

There are no standby redo logs.

It cannot find the same size standby redo log as the incoming online redo log file.

All of the standby redo logs of the correct size have not yet been archived.

Standby Database Modes

physical standby: redo apply/open read-only

logical standby: open read/write

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8558093/viewspace-1014781/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8558093/viewspace-1014781/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值