Oracle_Data_Guard-Oracle_Data_Guard_11g_Release_2

Document Sample
Oracle_Data_Guard-Oracle_Data_Guard_11g_Release_2 Powered By Docstoc
					1
Oracle Data Guard 11g Release 2:
High Availability to Protect Your Business
Larry M. Carpenter
Distinguished Product Manager, Oracle America
Who Am I?


 That Crazy man
   a.k.a. Murphy or Dr. Paranoid.
 I equate HA with DR
   The Database is down? It‟s a disaster.
 I abhor Complexity in DR solutions
   Unless absolutely necessary
 I really don‟t believe in Data Loss
   It is more trouble than people realize
 I am not here to tell you what to do
   I am here to help you get all the information you need to make
   an informed decision concerning Disaster Recovery


                                                                    3
Where did Data Guard come from?


 A long time ago on a database not so far, far away
   Ok, a bit corny, but it got your attention!
     At least the Star Wars Geeks amongst us got it
 In 1994 Oracle bought Rdb from Digital Equipment
 Rdb had already implemented „Hot Standby‟
   We perfected it around 1997
 Oracle users had been doing „Standbys‟ since 7.3.
 Data Guard started its life in Oracle8i
   The same Rdb Engineers decided Oracle customers needed
   the same kind of protection
 So how has Data Guard grown over the years?

                                                            4
Jurassic Period


 Oracle Version 7.3 custom Standby Database
 Oracle8i Automated Standby
   R/O standby, Managed recovery, Remote archiving
   Data Guard (Script based)
     Automation - single command switchover and failover
     Oracle Parallel Server and OPFS support
 Oracle9i Data Guard
   Release 1
     Physical Standby, Zero Data Loss, Switchover, Failover
   Release 2
     Logical Standby, Data Guard Broker and OEM GUI
Ancient Times


 Oracle Database10g Release 1
   Real-Time Apply
   Recovery Through Open Resetlogs
   Flashback Database Support
   Improved Redo Data Transmission Security
   Logical Standby Databases New Features
      Zero Downtime Instantiation
      Rolling Database Upgrades with SQL Apply
      Support for Additional Datatypes
   Broker supports Real Application Clusters
Middle Ages


 Oracle Database10g Release 2
   Fast-start failover (Automatic Controlled Failover)
   Flashback Database across Data Guard switchovers
   New Asynchronous Redo Transmission
   Parallel ARCH redo shipping
   Manually convert a physical standby database to a read write
   database and back again
   Logical Standby
      Additional data type support for Index Organized Tables
      Automatic deletion of applied archived redo log files
Modern Era


 Oracle Database11g Release 1
   Active Data Guard
   Snapshot Standby
   Faster ASYNC redo transport
   Advanced Compression for ASYNC and Gap Transport
   Lost-write protection
   ASYNC Fast-Start Failover
   Transient Logical Standby Upgrades
   Complete RMAN Integration
   Enhanced Security Integration with ASO
Current Events


 Oracle Database11g Release 2
   Active Data Guard Improvements
      Automatic Block Repair for corrupted blocks
      Schema Redirect for Writes
      Query SLA
   Faster SYNC redo transport
   Advanced Compression for SYNC Transport
   Broker and Oracle Restart integrated
      Role Based Services – RAC or Single Instance
     Data Guard 11g New Features Summary
Data Guard 11g Release 1                        Data Guard 11g Release 2
• Real-time Query                               • Automatic Block Repair
• Block change tracking on Active standby       • Active Data Guard Query SLA
• Snapshot Standby                              • Primary with 30 standbys
• Fast-Start Failover supports ASYNC            • Parallel local & remote SYNC transport
• ASYNC redo transport enhancements             • Retrieve redo from primary at failover
• Redo transport compression for gaps           • Improved client failover automation
• 100% increase in apply performance               • Role-based services
• Data Guard broker enhancements                   • Broker support for ONS
• Rolling upgrades for physical standbys           • Support auto-client failover for logical
• More mixed primary/standby configurations           standby for JDBC, OCI, ODP.Net
• Lost-write protection                         • No shutdown of RAC instances in physical
• SSL authentication in lieu of password file     standby for switchover
• SQL Apply switchover - no prior shutdown of   • No shutdown to move from Max Availability to
  any RAC instances                               Max Protection
• SQL Apply supports XMLType (stored as         • SQL Apply support of OLTP Compression,
  CLOB), Transparent Data Encryption,             SecureFiles, XA in RAC, Online Redefinition &
  DBMS_FGA (Fine Grained Auditing),               Edition-based Redefinition
  DBMS_RLS (Virtual Private Database)
Program


 Traditional approach to HA   <Insert Picture Here>

 The ultimate HA solution
 Active Data Guard 11.2
 Implementation
 Resources




                                                 11
Buy Components That Never Fail




                                 12
Deploy HA Clusters That Never Fail


(to compensate for components that fail)




                                           13
Hire People That Never Make Mistakes


  (to manage HA clusters that never fail)




                                            14
Never Say Never Again!




                         15
Three Production Examples
   (that never said never)




                             16
Oracle - 90,000 Users
Beehive Office Applications

                              Beehive – Oracle‟s unified
                              collaboration solution
                                 Email, instant messaging,
                                 conferencing, collaboration,
                                 calendar…
                                 Oracle Database 11.1.0.7
                                 16 node RAC clusters
                                 98 Exadata storage cells / site
                                 Data Guard
                                    Local standby for HA
                                        Offload read-only workload
                                        Offload backups
                                    Remote standby for DR
                                        Dual purpose as test system


                                                                      17
 Major Credit Card Issuer
 Website Authentication and Authorization


                            Local standby
           Data Guard       database for HA
             SYNC




                                 SAN mirroring - ASYNC   Remote Mirror
                                                         Disaster Recovery
Primary Database
Oracle 10g - RAC


 Single-Sign-On Application
    Internal and external website authentication and
    authorization, including web access to personal accounts




                                                                       18
MorphoTrak
Aris Prassinos - Distinguished Member of Technical Staff


 US subsidiary of Sagem Sécurité, SAFRAN Group

 Innovators in multi-modal Biometric Identification and Verification
    Fingerprint, palmprint, iris, facial
    Printrak Biometrics Identification Solution

 Government and Commercial customers
    Law enforcement, border management, civil identification
    Secure travel documents, e-passports, drivers‟ licenses, smart cards
    Facility / IT access control

 Recently chosen by the FBI as Biometric Provider for their
 Next Generation Identification Program
 http://www.sagem-securite.com/eng/site.php?spage=04010847


                                                                           19
    MorphoTrak
    Printrak Biometrics Identification Solution


       Goal – high availability and disaster recovery at minimal cost
Read-write transactions                                         Read-only transactions




                 Data Guard Maximum Availability - SYNC
                                                                                    Active Data Guard
                    continuous redo shipping, validation and apply
                    (up to 10ms network latency - approx 60 miles)




  Oracle 11.1.0.7                                         Automatic database failover (Fast-Start Failover)
  Oracle RAC, XML DB, SecureFiles, ASM                         Complements RAC HA
  15TB, 2MB/sec redo rate                                      Remote location provides DR
  Mixed OLTP – read intensive                             Off-load read-only transactions to active standby
  At 10ms network latency, SYNC has 5% -                       Full utilization reduces acquisition cost
  10% impact on primary throughput                             Simpler deployment reduces admin cost


                                                         MorphTrak - Open World 2009 Session 307560           20
Program


 Traditional approach to HA   <Insert Picture Here>

 The ultimate HA solution
 Active Data Guard 11.2
 Implementation
 Resources




                                                21
High Availability Attributes



Attribute                      Why Important


1. Redundancy with isolation   No single point of failure, failures stay put


2. Zero data loss              Complete protection, no recovery concerns


3. Extreme performance         Deploy for any application


4. Automatic failover          Fast, predictable


5. Full systems utilization    Fast recovery, high return on investment


6. Management simplicity       Reliable, reduced administrative costs




                                                                               22
Cluster




                               Production
                               Database




   Redundancy with isolation                Automatic failover

   Zero data loss                           Full systems utilization

   Extreme performance                      Management simplicity



                                                                       23
Cluster with Remote DR Site


       Primary Site                                  Remote Site
                                                  Disaster Recovery
                                  SAN
                                Mirroring
                                 ASYNC


                                                              ?
            Primary
           Database




    Redundancy with isolation            Automatic failover

   Zero data loss                        Full systems utilization

   Extreme performance                   Management simplicity



                                                                      24
Cluster with Remote DR Site


       Primary Site                                   Remote Site
                                                   Disaster Recovery
                                Data Guard
                                  ASYNC




            Primary                                          Remote
           Database                                         Standby
                                                            Database



    Redundancy with isolation             Automatic failover

   Zero data loss                         Full systems utilization

   Extreme performance                    Management simplicity



                                                                       25
Cluster with Data Guard Local and Remote Standby


       Primary Site                                        Remote Site
                                                        Disaster Recovery
                                     Data Guard
                                       ASYNC
                          SYNC


   Primary
                                                                  Remote
  Database
                                Local                            Standby
                                Standby                          Database
                                Database


    Redundancy with isolation                  Automatic failover

    Zero data loss                             Full systems utilization

    Extreme performance                        Management simplicity



                                                                            26
Cluster with Data Guard Local and Remote Standby


      Primary Site                                      Remote Site
                                                     Disaster Recovery


                                    Data Guard
                                    ASYNC



                                                               Remote
                               Primary                        Standby
                               Database                       Database



   Redundancy with isolation                Automatic failover

   Zero data loss                           Full systems utilization

   Extreme performance                      Management simplicity



                                                                         27
Program


 Traditional approach to HA   <Insert Picture Here>

 The ultimate HA solution
 Active Data Guard 11.2
 Implementation
 Resources




                                                28
What is Active Data Guard?


       Primary Site                      Active Standby Site




                         Data Guard
                                                         Physical Standby
 Primary                                                    Database
Database                                                 Open Read-Only




Data availability and data protection for the Oracle Database
Up to thirty standby databases in a single configuration
Physical standby used for queries, reports, test, or backups


                                                                            29
High Availability Attributes
How Does Active Data Guard Stack Up?



Attribute                      Why Important


1. Redundancy with isolation   No single point of failure, failures stay put


2. Zero data loss              Complete protection, no recovery concerns


3. Extreme performance         Deploy for any application


4. Automatic failover          Fast, predictable


5. Full systems utilization    Fast recovery, high return on investment


6. Management simplicity       Reliable, reduced administrative costs




                                                                               30
     HA Attribute: Redundancy with Isolation
     Data Guard Transport and Apply



     Primary Database                                           Standby Database
                               1   SYNC or ASYNC
       Oracle Instance                                             Oracle Instance

 3                                                                         2



Oracle Data files                                                        Oracle Data files
                               Automatic outage resolution
                    Recovery                                 Recovery
                      data                                     data
                                   4




                                                                                             31
HA Attribute: Redundancy with Isolation
Data Integrity


 Primary changes transmitted directly from SGA
    Isolates standby from I/O corruptions
 Software code path on standby different than primary
    Isolates standby from firmware and software errors
 Multiple Oracle corruption detection checks
    Data applied to the standby is logically and physically consistent
 Standby detects silent corruptions that occur at primary
    Hardware errors and data transfer faults that occur after Oracle
    receives acknowledgment of write-complete
 Known-state of standby database
    Oracle is open, ready for failover if needed


                                                                         32
                HA Attribute: Zero Data Loss
                Synchronous redo transport

 User Transactions
Queries, Updates, DDL
       Commit




                                                                          Active
                                   Primary
                                   Online
                                                                         Standby
                                   Redo Logs                             Database
                  SGA
                          LGWR
                                                     Standby
                                                     Redo
                 Redo                                Logs
                 Buffer
                          NSA                  RFS               MRP
                                 Oracle Net
   Primary
  Database

                                                                        Queries, Reports
  Maximum Availability Protection Mode                                 Testing & Backups
   - Controlled by NET_TIMEOUT parameter of LOG_ARCHIVE_DEST_n
   - Default value 30 seconds in Data Guard 11g


                                                                                     33
 HA Attribute: Automatic Failover
 Database


                                  Data Guard Fast-Start Failover
                                     Automatic failover
            Observer
                                        Database down
                                        Designated health-check
                                        conditions
                                        Or at request of an application
                                     Failed primary automatically
                                     reinstated as standby
                                     database
                                     All other standby‟s
                                     automatically synchronize
 Primary
 Standby                Primary
                       Standby
Database
Database               Database      with the new primary



                                                                          34
    HA Attribute: Automatic Failover
    Applications

    Primary Database                                    Standby Database
                                                     3 FAN breaks clients out
                        Application Tier - Oracle      of TCP timeout.
                       Application Server Clusters
                                                       TAF/FCF automatically
                                                       reconnects applications
                                                       to new primary

                                                                2   Role
                                                                    specific
                         Database Tier- Oracle
                                                                    database
                        Real Application Clusters                   services start
                                                                    automatically
Database                    Data Guard
                         1 Data Guard
Services                    Automatic                           Standby
                         RedoFailover
                              Transport                             Standby
                                                                becomes
                                                                   Database
Primary                                                         primary
Database                                                        database




                                                                                     35
HA Attribute: Extreme Performance
Primary Database



                           • Data Guard 11.2 SYNC
                              • Redo shipped in parallel
                                  with LGWR write to local
                                  online log file
                           • Little to no impact on
                             response time when using
                             SYNC in low latency
                             network
                              • 40% improvement over
                                  11.1 on low latency LAN


   network latency



                                                             36
      HA Attribute: Extreme Performance
      Standby Database


          Redo Apply Rates           • Data Guard 11.2 Redo Apply
             in MB/sec                  • Across the board
700                                       increase in apply rates
                     615
600                                     • High query load on active
500                                       standby does not impact
400                                       apply
300                          OLTP       • Redo Apply is optimized
                  200                     to utilize Exadata I/O
200                          Batch
100          80                           bandwidth
        30
 0                                      • Improved “Apply Lag” stat
        Trad.  Exadata V2                 allows for finer grained
      Hardware                            monitoring of standby
                                          progress

                                                                      37
   HA Attribute: Full Systems Utilization
   Active Data Guard

            Read-write
            Workload                             Real-time
Real-time                                        Reporting
                                                        Real-time
Reporting                                                Queries


                                Fast
                            Incremental                                 Fast
                              Backups                               Incremental
                                                                      Backups
                              Continuous redo
                         shipping, validation & apply

       Production                                  Active Standby
        Database                                      Database

 Offload read-only queries to an up-to-date physical standby
 Use fast incremental backups on a physical standby – up to 20x faster

                                                                                  38
                     Standby is used as Production System


                     3000
                                                      2,610
                                                              More scalable
                     2500
                                                              Better performance
Transactions / sec




                                                                Eliminate contention between
                     2000
                                                                read-wite and read-only
                                      1,530                     workload
                     1500
                                                                Simplify performance tuning
                     1000
                                                630            + 117% Read-write service
                      500       290                             + 70%   Read-only service

                       0
                              All services     Read-only
                            run on primary    offloaded to
                               database         standby


                                                                                               39
Standby is used to Reduce Planned Downtime


 Database rolling upgrades
   Transient Logical Standby
 Migrations to ASM and/or RAC
 Technology refresh – servers and storage
 Windows/Linux migrations *
 32bit/64bit migrations*
 Implement major database changes in rolling fashion
   e.g. ASSM, initrans, blocksize
 Implement new database features in rolling fashion
   e.g. Advanced Compression, SecureFiles, Exadata Storage
                                     * see Metalink Note 413484.1


                                                                    40
  Standby is used to Eliminate Risk
  Data Guard Snapshot Standby – Ideal for Testing




   Updates                               Queries
                                        Updates

                                          redo       Replay
                                          data
                                                     workload
                                                     using
   Primary                         Active Standby
                                    Active Standby
                                  SnapshotStandby    Real
   Database                            Database
                                      Database       Application
                                                     Testing



DGMGRL> convert database <name> to snapshot standby;
DGMGRL> convert database <name> to physical standby;


                                                              41
HA Attribute: Simple to Manage



Active Data Guard
 All data types
 All storage attributes
 All DDL
 Fewest moving parts
 Based on media recovery – mature technology
 Highest performance
 Guaranteed EXACT replica of production




                                               42
HA Attribute: Simple to Manage




                                 43
Program


 Traditional approach to HA   <Insert Picture Here>

 The ultimate HA solution
 Active Data Guard 11.2
 Implementation
 Resources




                                                44
Adding a Local Data Guard Standby Database




       Primary Site                           Remote Site
                                           Disaster Recovery
                              Data Guard
                                ASYNC
                      SYNC


   Primary
                                                 Remote
  Database
                         Local                  Standby
                         Standby                Database
                         Database




                                                               45
Key Components


 Local physical standby – Maximum Availability
 Active Data Guard
 Data Guard Broker
 Data Guard Observer and Fast-Start Failover
 Flashback Database
 Fast Application Notification
 Transparent Application Failover – OCI clients
 Fast Connection Failover – JDBC clients




                                                  46
Implementation Considerations
Data Guard Transport Tuning and Configuration


 Remote Standby
     High network latency
     Maximum Availability Mode with ASYNC transport
     Potentially increase log_buffer to ensure LNS reads from memory
     instead of disk
     Tune TCP socket buffer sizes and device queues
       Value is a function of bandwidth and latency
       See HA Best Practices
 Local Standby
     Low latency network (ideally less than 5ms)
     Maximum Availability Mode with SYNC transport
     Set NET_TIMEOUT to 10 seconds from default of 30
     Standby redo logs on fast storage


                                                                       47
Implementation Considerations
Basic Configuration


 Flashback Database
    Configure on all databases in the configuration
    Appropriately size Flash Recovery Area
    FLASHBACK_RETENTION_PERIOD minimum of 60 minutes
    See MetaLink Note 565535.1 for performance best practices
 Data Guard Broker
    Required for Fast-Start Failover
    Required for auto-restart of role specific database services (11.2)
    Required for Fast Application Notification
    Close integration with RAC (ie apply instance failover)
    Simplified role transitions when using multiple standbys
    Check MetaLink for Data Guard Broker bundled patch
       E.g. 10.2.0.4 bundle has backports of several Broker 11.1
       features



                                                                          48
Implementation Considerations
Fast-Start Failover


 Data Guard Observer
    Local standby is the Fast-Start Failover Target
    Deploy Observer on 3rd host, independent of primary/standby
    Set FastStartFailoverThreshold
      10 seconds for single instance databases
      20 seconds plus time for node eviction for Oracle RAC
    Use Oracle Enterprise Manager for Observer HA
      Auto restart of Observer on new host




                                                                  49
Implementation Considerations
Automating Client Failover


 High level steps to achieve fast, transparent application failover
    Role based services (11.2)
    Application notification
    Efficient reconnect
 Requirements
    Grid Infrastructure must be installed, both RAC and single
    instance configurations (11.2)
    Failover must be performed by the Data Guard broker
       Either manual broker commands or Fast-Start Failover
    Application must meet FAN requirements
       JDBC application must enable Fast Connection Failover
       OCI application need events_mode enabled and libthread


                                                                      50
  Implementation Considerations
  Configuring Client Failover


    Create role based serviced to be used by the application for
    connections (11.2)

srvctl add service -d <db_unique_name> -s <service_name>
[-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY]
    [,SNAPSHOT_STANDBY]]
[-y {AUTOMATIC | MANUAL}]


    For OCI application also configure service to have TAF enabled as
    well as AQ_HA_NOTIFICATIONS
    Configure Oracle Net alias or JDBC URL to have an address with
    both primary and standby hosts in the address_list.
    Pre Data Guard 11.2 please refer to Client Failover Best Practices
    http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_ClientFailoverBestPractices.pdf




                                                                                                            51
                 The Result
An HA architecture built on the assumption that
        eventually something will fail




                                                  52
Ultimate High Availability




       Primary Site                           Remote Site
                                           Disaster Recovery
                              Data Guard
                                ASYNC
                      SYNC


   Primary
                                                 Remote
  Database
                         Local                  Standby
                         Standby                Database
                         Database




                                                               53
Ultimate High Availability


       Primary Site                                       Remote Site
                                                       Disaster Recovery

                                     Data Guard
                                      ASYNC



                                                                 Remote
                                Primary                         Standby
                                Database                        Database



    Redundancy with isolation                 Automatic failover

    Zero data loss                            Full systems utilization

    Extreme performance                       Management simplicity



                                                                           54
Start Here


       Primary Site                                        Remote Site
                                                        Disaster Recovery
                                     Data Guard
                                       ASYNC
                     SYNC



     Primary
                                                                  Remote
    Database
                                Standby                          Standby
                                Database                         Database



    Redundancy with isolation                  Automatic failover

    Zero data loss                             Full systems utilization

    Extreme performance                        Management simplicity



                                                                            55
A Final Thought


 I am usually referred to as the guy who says
   TANSTAAFL
     There Ain‟t No Such Thing As A Free Lunch
 And that is still a true statement
 But the real message is this:
   You have to trust your DR solution.
      If you don‟t trust it, what is the point of having it?
   You have to be ready to fail over at a moments notice.
   Or accept the downtime.




                                                               56
Key Best Practices Documentation

 HA Best Practices
 http://www.oracle.com/pls/db111/portal.portal_db?selected=14&frame=
 Active Data Guard and Redo Apply
 http://www.oracle.com/technology/deploy/availability/pdf/maa_wp_11gr1_activedataguard.pdf
 Data Guard Redo Transport
 http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_DataGuardNetwo
 rkBestPractices.pdf
 Data Guard Fast-Start Failover
 http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_FastStartFailover
 BestPractices.pdf
 Automating Client Failover (Data Guard 10g and 11gR1)
 http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_ClientFailoverBes
 tPractices.pdf
 Managing Data Guard Configurations with Multiple Standby Databases
 http://www.oracle.com/technology/deploy/availability/pdf/maa10gr2multiplestandbybp.pdf
 Using your Data Guard Standby for Real Application Testing
 http://www.oracle.com/technology/deploy/availability/pdf/oracle-openworld-2008/298770.pdf
 S307560 Active / Active Configurations with Oracle Active Data Guard
 http://www.oracle.com/technology/deploy/availability/pdf/oracle-openworld-2009/307560.pdf



                                                                                             57
For More Information




             search.oracle.com
                  data guard


                       or
               oracle.com/ha




                                 58
59
60

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:6/22/2012
language:English
pages:60