1 / 68

Oracle Data Guard: Maximum Data Protection at Minimum Cost

Session Id: 40056. Oracle Data Guard: Maximum Data Protection at Minimum Cost. Ashish Ray Senior Product Manager Oracle Corporation. Darl Kuhn Senior DBA, Staff Engineer Sun Microsystems. Agenda. Oracle Data Guard – a Quick Introduction Data Guard Features in Oracle Database 10g

jaafar
Download Presentation

Oracle Data Guard: Maximum Data Protection at Minimum Cost

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session Id: 40056 Oracle Data Guard: Maximum Data Protection at Minimum Cost Ashish RaySenior Product Manager Oracle Corporation Darl KuhnSenior DBA, Staff Engineer Sun Microsystems

  2. Agenda • Oracle Data Guard – a Quick Introduction • Data Guard Features in Oracle Database 10g • Customer Success Story – Sun Microsystems • Summary & Q/A

  3. What is Oracle Data Guard? • Oracle’s disaster recovery solution for Oracle data • Feature of Oracle Database Enterprise Edition • 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

  4. All 3 are important! Oracle Data Guard Focus • Data Failures & Site Disasters: • Data Protection • Data Availability • Data Recovery • Data is the core asset of the enterprise! • Also addresses human errors & planned maintenances

  5. Production Database Network Broker Oracle Data Guard Architecture Physical Standby Database Sync or Async Redo Shipping Backup Redo Apply Logical Standby Database Transform Redo to SQL Open for Reports SQLApply Additional Indexes & MVs

  6. Data Guard Redo Apply Physical Standby Database Primary Database Data Guard Broker Redo Apply Backup Network Redo Shipment Standby Redo Logs • 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 be used for backups, offloading production database

  7. Data Guard SQL Apply Additional Indexes & Materialized Views Logical Standby Database Primary Database Data Guard Broker Transform Redo to SQL and Apply ContinuouslyOpen for Reports Network Redo Shipment Standby Redo Logs • 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

  8. Agenda • Oracle Data Guard – a Quick Introduction • Data Guard Features in Oracle Database 10g • Customer Success Story – Sun Microsystems • Summary & Q/A

  9. Oracle Data Guard 10g Objectives • Establish Data Guard as an extremely • easy-to-use • low-cost • comprehensive • reliable • Disaster Recovery solution for enterprise data

  10. Overview of Objectives • Ease of use – simplified SQL, easy to create, manage and administer standby databases, simplified GUI focused on best practices • Low cost – businesses can leverage existing resources to implement Data Guard, zero integration costs • Comprehensive – feature-rich and flexible • Reliable – a rock-solid solution for protection of mission critical business data

  11. Data Guard 10g New Features • General new features • Real Time Apply • Flashback Database Integration • SQL Apply new features • Zero Downtime Instantiation • Rolling Upgrades • Additional Datatypes • Data Guard Broker & Enterprise Manager new features • RAC integration • Simplified browser-based interface focused on best practices

  12. Real Time Apply • Redo data is applied to the standby database as soon as it is received from the primary database • In Oracle9i Data Guard this apply has to wait till an archivelog is created on the standby database • For Redo Apply: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE • For SQL Apply: ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE • When real time apply is enabled, RECOVERY_MODE column in V$ARCHIVE_DEST_STATUS displays “MANAGED REAL TIME APPLY”

  13. Real Time Apply Architecture An up-to-date Physical/Logical Standby Database Oracle Net Transactions LGWR MRP/ LSP RFS Standby Redo Logs Online Redo Logs Real Time Apply Primary Database ARCH ARCH Archived Redo Logs Archived Redo Logs

  14. Real Time Apply – Benefits • Standby databases now more closely synchronized with the primary • More up-to-date, real-time reporting • Faster switchover and failover times • Reduces planned and unplanned downtime • Better Recovery Time Objective (RTO) for DR

  15. Existing Site Recovery Tradeoffs Reporting on delayed data Primary Database Standby Database Redo Shipment Delayed Apply • Log apply may be delayed to protect from user errors but: • Switchover/Failover gets delayed • Reports run on old data • After failing over to standby, production DB must be rebuilt

  16. Flashback Database • A new strategy for point in time recovery • Eliminate the need to restore a whole database backup • Integrated seamlessly with RMAN • Think of it as a continuous backup • Restores just changed blocks • It’s fast - recover in minutes, not hours • It’s easy - single command restore RMAN> FLASHBACK DATABASE TIMESTAMP to_timestamp ('2003-08-15 16:00:00', 'YYYY-MM-DD HH24:MI:SS');

  17. Real Time Apply Primary Database Standby Database No Delay! Enhanced DR with Flashback Database Real TimeReporting Redo Shipment Flashback Log Flashback Log • Flashback DB removes the need to delay application of logs • Flashback DB removes the need to reinstantiate primary after failover • Real-time apply enables real-time reporting on standby Primary: No reinstantiation after failover!

  18. SQL Apply: Zero Downtime Instantiation • Logical standby database can now be created from an online backup of the primary database, without shutting down or quiescing the primary database • No shutdown implies no downtime of production system • No quiesce implies no wait on quiesce and no dependence on Resource Manager

  19. A A A B Upgrade B B A B Patch Set Upgrades Redo Clients Logs Queue Major Release Upgrades Version X Version X X X+1 1 2 Initial SQL Apply Config Upgrade node B to X+1 Cluster Software & Hardware Upgrades Redo Redo Upgrade X+1 X+1 X X+1 Switchover to B, upgrade A Run in mixed mode to test 4 3 Rolling Upgrades

  20. SQL Apply: Additional Data Types • SQL Apply now supports the following additional data types: • Multi-byte CLOB • NCLOB • LONG • LONG RAW • BINARY_FLOAT • BINARY_DOUBLE • IOT-s (without overflows and without LOB columns) • Allows logical standby databases to recover and protect a wider variety of data, thus increasing the overall database protection and recovery options for Data Guard

  21. Enterprise Manager New Features • Streamlined browser-based interface that enables complete standby database lifecycle management • Focus on: • Ease of use • Management based on best practices • Pre-built integration with other HA features

  22. RAC Support – Broker • Now possible to use the Broker to create and manage configurations that contain RAC primary and RAC standby databases • Data Guard Broker interfaces with Oracle Clusterware such that it has control over critical operations during specific Data Guard state transitions • Switchovers, failovers, protection mode changes, state changes

  23. RAC Primary Two standby dbs

  24. Instance specific

  25. Example – Ease of Use • Switchover using Enterprise Manager is now literally two mouse clicks

  26. Switched!

  27. Agenda • Oracle Data Guard – a Quick Introduction • Data Guard & Features in Oracle Database 10g • Customer Success Story – Sun Microsystems • Summary & Q/A

  28. Case Study • Oracle Data Guard at Sun Microsystems Darl Kuhn Senior DBA, Staff Engineer • Business decision considerations • Architecture • Implementation • Features we use

  29. Project Requirements • Patch and Knowledge databases for Sun Support Services • 7x24 High Availability • Minimize scheduled downtime • Minimize unscheduled downtime • Disaster Recovery (DR) protection • Do more with less resources • Minimize costs • Minimize complexity

  30. Solutions We Investigated • Backup the database, restore from tape • Operating System failover • Remote Mirroring • Quest’s SharePlex • Oracle Advanced Replication (OAR) • Oracle Real Application Clusters (RAC) • Oracle Data Guard (Standby)

  31. We Chose Data Guard • 7x24 DR protection • Simple to implement • Requires DBA with B&R skills • Didn’t need special System Administration skills or consultants • Low maintenance (do more w/less DBAs) • No extra licensing (built into Oracle9i)

  32. Implementation Decisions • Which data protection mode? • Maximum Protection • Maximum Availability • Maximum Performance • We chose Maximum Performance • Two identical servers • Directory structures the same • Database name the same • Introduce a delay in application of redo

  33. Maximum Performance Primary Database Production Site Standby Database Server . Copied Archive Redo Copied Archive Redo Users Remote File Server (RFS) Fetch ArchiveLog (FAL) Oracle Net Primary Database LGWR Managed Recovery Process (MRP) ARCn On-line Redo Online Redo Standby Database Local Archive Redo Local Archive Redo

  34. Database Architecture • 50M archive redo logs • 1 Gig of redo per day • Primary in Colorado • Standbys in North Carolina, Holland and Singapore • Database size currently 60 Gig • Hardware Sun 6500, 280R, 4500 • Storage T3 partner pair fiber channel

  35. Implementation of Physical Standby 1. Ensure primary database is in archive log mode Note: In Data Guard 10g, you also need to implement a password file for both Primary and Standby 2. Take backup of primary database datafiles – options: • RMAN • Hot • Cold • Do not backup controlfiles or online redo logs

  36. Using RMAN to Build Standby On Primary: • RMAN> backup database; • Copy backup pieces to Standby • Create a Standby controlfile and copy to Standby Then on Standby: • SQL> startup nomount; • SQL> alter database mount standby database; • RMAN> restore database; • SQL> alter database recover managed standby database disconnect;

  37. Implementation of Physical Standby 3. Copy backup datafiles to standby server 4. Create a standby controlfile 5. Copy the standby controlfile to standby server 6. Configure primary init.ora or spfile 7. Copy primary database init.ora file to standby server and make modifications for standby database 8. Configure Oracle Net

  38. Implementation of Physical Standby 9. Startup and mount standby database SQL> startup nomount; SQL> alter database mount standby database; • Startup syntax is simplified in Oracle Data Guard 10g SQL> startup mount; • In Data Guard 10g, the “startup” will put the Standby into read-only mode SQL> startup;

  39. Implementation of Physical Standby 10. Enable managed recovery mode on Standby SQL> alter database recover managed standby database disconnect; • Troubleshooting $ tail –f alert_BRDSTN.log • Almost all problems encountered were: • TNS set up incorrectly • Initialization parameters set wrong

  40. Preventing User Errors • Logs copied but not applied for 60 minutes • Used to have to manually script this SQL> alter database recover managed standby database delay 60 disconnect; • To disable delay: SQL> alter database recover managed standby database nodelay;

  41. Use of Read-Only Standby • 7x24 business requirement for knowledge reporting • Primary database batch loaded once a day • How do we ensure that there will always be a database available? • Create two (or more) Standby databases • Shut down one at a time, apply redo

  42. Use of Read-Only Standby Primary Database Production Site Two Separate Read-Only Standby Database Servers . Oracle Net l3srv1 Daily Batch Load Standby 1 brdstn Reports Primary Database ARCn l3srv2 Standby 2 brdstn

  43. Use of Read-Only Standby • Let Oracle Net connection figure out which read-only physical Standby database available brdstn= (DESCRIPTION = (LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=tcp)(HOST=l3srv1)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=l3srv2)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=brdstn)) )

  44. Disaster Happens… • Haven’t had a “complete disaster”… yet • We have had bad hardware cause failovers • We were able to easily failover to Standby SQL> alter database activate standby database; • In Data Guard 9i, we keep 9i Primary init.ora on Standby • In Data Guard 10g, VALID_FOR eliminates this need

More Related