Sie sind auf Seite 1von 40

WHAT IS DATA GUARD

Oracles disaster recovery solution for Oracle data; Feature of Oracle Database Enterprise Edition (EE);

Automates the creation and maintenance of one or more transactionally consistent copies (standby) of the production (or primary) database;


If the primary database becomes unavailable (disasters, maintenance), a standby database can be activated and assume the primary role.


SIMPLY PUT
Data Guard helps you protect your Data.
 

Takes your data and automatically puts it elsewhere Makes it available for Failover in case of failure.

The other capabilities are.


   

Switchover for Maintenance Reporting Off-loading Queries Backups

ARCHITECTURE
Transactions

Oracle Net

Physical/Logi cal Standby Database RFS MRP/ LSP

LGWR

Online Redo Logs

Primary Database

FAL

Standby Redo Logs

Backu p/ Report s

ARCH ARCH
Archived Redo Logs Archived Redo Logs

ARCHITECTURE CONTINUES
Primary Database: A Data Guard configuration contains one production database, also referred to as the primary database that functions in the primary role.
 

The primary database can be either a single-instance Oracle database or an Oracle Real Application Clusters database. LGWR / ARCH Process

Collects Redo data from Primary and ship that to Standby .

Fetch Archive Log (FAL) Process Provides client-server mechanism for shipping archived logs to the Standby.  For automatic gap resolution and resynchronization.


ARCHITECTURE CONTINUES
Standby Database: A standby database is a transactionally consistent copy of the primary database.


Data Guard automatically maintains each standby database by transmitting redo data from the primary database and then applying the redo to the standby database.


Physical standby database


Physical Standby Technology introduced in Oracle 7.2 Marketed as Data Guard in Oracle 8.1.7 and above Standby is identical copy of primary database

  

Redo changes transported from primary to standby applied on standby (Redo Apply)

 

Can switch operations to standby Failover time deplaned (switchover / switchback) Unplanned (failover)

 

pendent on various factors Rate of redo generation / size of redo logs Redo transport / apply configuration

 

ARCHITECTURE CONTINUES
Logical standby database
     

Introduced in Oracle 9.2 Subset of database objects Redo copied from primary to standby Changes converted into logical change records (LCR) Logical change records applied on standby (SQL Apply) Standby database can be opened for updates Can modify propagated objects Can create new indexes for propagated objects

May need larger system for logical standby LCR apply can be less efficient than redo apply Array updates on primary become single row updates on

standby

ARCHITECTURE CONTINUES
Processes Involved in Standby Recovery phase: Remote File Server (RFS)


Receives Redo records from the Primary Database.

Managed Recovery Process (MRP)




Apply Redo information to the Physical Standby.

Logical Standby Process (LSP)




Apply SQL translated Redo information to the Logical standby.

MEDIA RECOVERY PROCESS (MRP) REDO APPLY

LOGICAL STANDBY PROCESS (LSP) SQL APPLY

LSP Continues
SQL Apply uses a collection of parallel execution servers and background processes.


Reader process Reads redo records from the archived logs;

Preparer process Covert the block changes into table changes, Logical Change Records (LCRs);


Builder Process Assembles completed transactions from the individual LCRs.




Analyzer Process Examines the completed transactions, identifying dependencies between the different transactions.


Coordinator Process Assigns transactions to the Applier process, monitor dependencies between the transactions and authorize the commit of changes to the logical standby database.
 

Applier Process Apply the changes into the database and commit the transactions.

PROTECTION LEVELS

The Protection Levels define how the Primary functions in the standby configuration. They are:


Maximize Protection Maximize Availability Maximize Performance




Each one has a defined set of rules.

PROTECTION MODES
Protection Mode Maximum Protection Zero Data Loss Failure Protection Protects Against Primary and Network Failure Redo Shipping LGWR using SYNC and SRL

Maximum Availability Zero Data Loss

Protects Against Primary Failure

LGWR using SYNC

Maximum Performance

Best Effort Against Primary Failure

ARCH or LGWR using ASYNC

MAXIMUM PROTECTION MODE


Protection Mode Maximum Protection Zero Data Loss
Zero

Failure Protection Protects Against Primary and Network Failure

Redo Shipping LGWR using SYNC and SRL

Data Loss! ; Highest Level of Protection; Configuration: LGWR SYNC, SRLs; Enforces protection of every transaction; If last standby is unavailable, processing stops at primary; Good for financial systems where no data loss is acceptable;

ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;

MAXIMUM AVAILABILITY MODE


Protection Mode Failure Protection Redo Shipping LGWR using SYNC and SRL Maximum Availability Protects Against Primary Zero Data Loss Failure
Zero

Data Loss! as long as the network stays up!; Configuration: LGWR SYNC, SRLs; Enforces protection of every transaction; If last standby is unavailable, processing continues at primary;  When the standby becomes available again, synchronization with the primary is automatic ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY;

MAXIMUM PERFORMANCE MODE


Protection Mode Maximum Performance
Highest

Failure Protection Best Effort Against Primary Failure

Redo Shipping ARCH or LGWR using ASYNC

Level of Performance; Configuration: LGWR ASYNC or ARCH; Protects from failure of any single component; Least impact on production system; Useful for applications that can tolerate some data loss.

ALTER DATABASE SET STANDBY TO MAXIMIZE PERFORMANCE;

DATA GUARD SERVICES


Redo Transport Services Control the automated transfer of redo data from the production database to one or more archival destinations


Log Apply Services


 Redo data would be applied either from archived redo log files, or, if real-time apply is enabled, directly from the standby redo log files as they are being filled, without requiring the redo data to be archived first at the standby database.

Role Transitions Switchover


 Role reversal between the primary database and one of its standby databases. This is typically done for planned maintenance of the primary system  During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role.

Failover


Occurs, when the primary database is unavailable.

Failover is performed only in the event of a catastrophic failure of the primary database, and the failover results in a transition of a standby database to the primary.


HIGH LEVEL
Broader perspective, Data Guard comprises of two parts: REDO APPLY (DR) Maintains a physical, block for block copy of the Production (also called Primary) database.


SQL APPLY (Reporting)




Maintains a logical, transaction for transaction copy of the Production database.

DATA GUARD REDO APPLY: BEST FOR DR


Data Guard Broker Primary Database Optional Delay Network Sync or Async Sync or Async Redo Shipping Redo Shipping Physical Standby Database

Redo Apply Redo Apply


DIGITAL DATA STORAGE

Backup
    

Physical Standby Database is a block-for-block copy of the primary database Uses the database recovery functionality to apply changes Can be opened in read-only mode for reporting/queries Can also perform backup, offloading production database The best solution for DR

DATA GUARD SQL APPLY


Data Guard Broker Primary Database Optional Delay Network Sync or Async Redo Shipping
Continuously Open for Reports
      

Additional Indexes & Materialized Views

Logical Standby Database

Logical Standby Database is an open, independent, active database Contains the same logical information (rows) as the production database Physical organization and structure can be very different Can host multiple schemas Can be queried for reports while logs are being applied via SQL Can create additional indexes and materialized views for better query performance Not all Data Types supported (See the manual for a list)

REDO DATA TRANSMISSION HOW?


Redo data could transferred from Primary to Standby by any one of the following way:
 

Using Archiver Processes (ARCn) to Archive Redo Data.

Using the Log Writer Process (LGWR) to Archive Redo Data.

By default, redo transport services use ARCn processes to archive the online redo log files on the primary database.


ARCn archival processing supports only the maximum performance level of data protection in Data Guard configurations.
 

LGWR process would be used to transmit redo data to standby locations that operate in other data protection modes.

DATA GUARD ARCH REDO TRANSMISSION


Primary Database Standby Database

Primary Database

LGWR

RFS

MRP LSP

Standby Database

Online Redo Log

Standby Redo Log

ARC0 LOG_ARCHIVE_DEST_1

ARC1

ARCn

Archived Redo Logs

Archived Redo Logs

DATA GUARD LGWR (ASYNC) REDO TRANSMISSION


Primary Database Standby Database

Primary Database

LGWR

RFS

MRP LSP

Standby Database

Online Redo Log

LNSn

Standby Redo Log

ARCn LOG_ARCHIVE_DEST_1 Archived Redo Logs

ARCn

Archived Redo Logs

DATA GUARD LGWR (SYNC) REDO TRANSMISSION


Primary Database Standby Database

Primary Database

LGWR

LNSn

RFS

MRP LSP

Standby Database

Online Redo Log

Standby Redo Log

ARCn LOG_ARCHIVE_DEST_1 Archived Redo Logs

ARCn

Archived Redo Logs

DATA GUARD ROLE TRANSITIONS


There are two types of role transition Switchover
   

Planned failover to standby database Original primary becomes new standby Original standby becomes new primary No data loss switchback at any time

Can

Failover
   

Unplanned failover to standby database Original standby becomes new primary Original primary may need to be rebuilt Possible data loss

DATA GUARD SWITCHOVER


Before Switchover Site1 Primary Instance Redo Site2 Physical Standby Instance Site1 Physical Standby Instance Redo After Switchover Site2 Primary Instance

Database

Database

Database

Database

Primary Database

Standby Database

Standby Database

Primary Database

DATA GUARD FAILOVER


Before Failover After Failover

Site1 Primary Instance Redo

Site2 Physical Standby Instance

Site1 Primary Instance Redo

Site2 Site2 Primary Physical Standby Instanc

Instance

Database

Database

Database

Database Database

Primary Database

Standby Database

Unavailable

Primary Standby Database

Databas

REDO APPLY OR SQL APPLY..?


Redo Apply a physical, block-forblock copy of the primary. Can be open for read-only queries.
 Maintains 

SQL Apply Maintains a logical, transaction-for-transaction copy of the primary. Allows creation of additional objects, modification of objects. Possible to skip apply on certain objects. Can be used as a good reporting solution supports real-time reporting in 10g. Has data type restrictions.

At role transition, offers the assurance that the standby database chosen to be the new primary has not been changed compared to the old primary.
  

Can be used for backups




Faster, since it bypasses the SQL transformation layer.

PHYSICAL STANDBY - CONFIGURATION


Step Up Overview:
     

Step 1 - Prepare the Primary for Standby Step 2 - Copy the necessary files to standby system Step 3 - Configure the Standby Parameters Step 4 - Configure OracleNet Step 5 - Startup the Standby Site Step 6 - Begin Shipping and Applying Redo

CONFIGURATION
Attached the document which has Step-by-Step configuration of Physical Standby Database.

Microsoft Office Word Document

LOGICAL STANDBY - CONFIGURATION


Step Up Overview:
     

Step 1 - Prepare the Primary for Standby Step 2 - Copy the necessary files to standby system Step 3 - Configure the Standby Parameters Step 4 - Configure OracleNet Step 5 - Startup the Standby Site Step 6 - Begin Shipping and Applying Redo

CONFIGURATION
Attached the document which has Step-by-Step configuration of Logical Standby Database.

Microsoft Office Word Document

ROLE TRANSITION - SWITCHOVER INVOLVES PHYSICAL STANDBY DATABASE


Step Up Overview:
   

Step 1 Resolve the archived log Gaps. Step 2 Verify the status of the databases to Switchover. Step 3 Adjust the initialization parameters. Step 4 Perform the switchover.

SWITCHOVER INVOLVES PHYSICAL STANDBY DATABASE .


Attached the document which has Step-by-Step configuration to perform switchover with Physical Standby Database.

Microsoft Office Word Document

ROLE TRANSITION - SWITCHOVER INVOLVES LOGICAL STANDBY DATABASE


Step Up Overview:
   

Step 1 Resolve the archived log Gaps. Step 2 Verify the status of the databases to Switchover. Step 3 Adjust the initialization parameters. Step 4 Perform the switchover.

SWITCHOVER INVOLVES LOGICAL STANDBY DATABASE .


Attached the document which has Step-by-Step configuration to perform switchover with Logical Standby Database.

Microsoft Office Word Document

ROLE TRANSITION - FAILOVER INVOLVES PHYSICAL STANDBY DATABASE


Step Up Overview:
     

Step 1 Resolve the archived log Gaps. Step 2 Adjust the initialization parameters. Step 3 Initiate the Failover. Step 4 Covert the Database Roles. Step 5 Backup the new Primary Database. Step 6 Optionally, Restore the failed Primary Database.

FAILOVER INVOLVES STANDBY DATABASE

PHYSICAL .

Attached the document which has Step-by-Step configuration to perform failover with Physical Standby Database.

Microsoft Office Word Document

ROLE TRANSITION - FAILOVER INVOLVES LOGICAL STANDBY DATABASE


Step Up Overview:
      

Step 1 Resolve the archived log Gaps. Step 2 Adjust the initialization parameters. Step 3 Initiate the Failover. Step 4 Covert the Database Roles. Step 5 Recover the other Standby Databases. Step 6 Backup the new Primary Database. Step 7 Optionally, Restore the failed Primary Database.

FAILOVER INVOLVES DATABASE .

LOGICAL STANDBY

Attached the document which has Step-by-Step configuration to perform failover with Logical Standby Database.

Microsoft Office Word Document

SUMMARY.!!!
Data Guard provides an automated standby database which can essentially eliminate downtime of your production data.
 

Setup is easy and fairly straightforward. Maintenance is minimal. Switchovers and failovers can be done within a few minutes.

Reporting can be offloaded to the standby to ease the workload on the primary. And It's Free! (Included with Enterprise Edition)

Das könnte Ihnen auch gefallen