Dataguard presentation


Published on

Dataguard Architecture and concepts

Published in: Education, Technology
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Dataguard presentation

  1. 1. Presented By :- Vimlendu Kumar <ul><li>Oracle Data Guard </li></ul>
  2. 2. Aganda <ul><li>Introduction to High Availability </li></ul><ul><li>Data Guard Concept </li></ul><ul><li>Data Guard Implementation </li></ul><ul><li>Data Guard Scenario </li></ul>
  3. 3. Introduction to High Availability <ul><li>Availability is the degree to which an application or server is accessible on demand. It is measured by the perception of an applications end user. </li></ul><ul><li>Characteristics of a high availability </li></ul><ul><ul><li>Reliability </li></ul></ul><ul><ul><li>Recoverability </li></ul></ul><ul><ul><li>Timely error detection </li></ul></ul><ul><ul><li>Continuous operation </li></ul></ul>
  4. 4. Why Data Guard ? <ul><li> UNPLANNED </li></ul><ul><li>Site Failure </li></ul><ul><li>Computer Failure </li></ul><ul><li>Storage Failure </li></ul><ul><li>Data Corruption </li></ul><ul><li>Human Error </li></ul><ul><li>Hang or Slowdown </li></ul><ul><li>PLANNED </li></ul><ul><li>System and Database Changes </li></ul><ul><li>Data Changes </li></ul><ul><li>Application Changes </li></ul>
  5. 5. Why Data Guard ? <ul><li>Data Guard helps you protect your Data. </li></ul><ul><ul><li>Takes your data and automatically puts it elsewhere </li></ul></ul><ul><ul><li>Makes it available for Failover in case of failure. </li></ul></ul><ul><li>The apply process also revalidates the log records to prevent application of any log corruptions </li></ul><ul><li>Geographically dispersed sites </li></ul><ul><li>Useful for logical data corruptions if lag behind used </li></ul><ul><li>Flexible configuration options for protection level </li></ul><ul><li>Reporting and backups can be diverted to standby </li></ul><ul><li>Automatic resync for failed primary </li></ul><ul><li>Switchover for Maintenance </li></ul>
  6. 6. What is Standby Data guard ? <ul><li>A copy of a production database that you can use for disaster protection. You can update the standby database with redo logs from the production database in order to keep it current. If a disaster destroys the production database, you can activate the standby database and make it the new production database. </li></ul><ul><li>You can maintain the standby data in one of the following modes: </li></ul><ul><ul><li>For physical standby databases </li></ul></ul><ul><ul><ul><li>Redo Apply </li></ul></ul></ul><ul><ul><li>For logical standby databases </li></ul></ul><ul><ul><ul><li>SQL Apply </li></ul></ul></ul><ul><li>A Standby Database is NOT Data Guard </li></ul>
  7. 7. Data Guard Concepts <ul><li>Oracle Data Guard provides the management, monitoring and automation software to create and maintain one or more standby databases to protect oracle data from failures, disasters, human error and data corruptions </li></ul><ul><li>A data guard configuration consists of one production and one or more standby databases. The databases in a data guard configuration may be dispersed geographically. </li></ul><ul><li>Managing primary and standby databases can be done using SQL command-line interfaces, Data guard broker interfaces or using a graphical users interface provided with oracle Enterprise Manager Grid Control. </li></ul>
  8. 8. Data Guard Concepts
  9. 9. Data Guard Concepts <ul><li>Types of Standby Databases : </li></ul><ul><ul><li>Physical Standby Database </li></ul></ul><ul><ul><ul><li>A physical standby database provides a physically identical copy of the primary database, with on-disk database structures that are identical to the primary database on a block-for-block basis. </li></ul></ul></ul><ul><ul><ul><li>The database schemas, including indexes are the same. </li></ul></ul></ul><ul><ul><ul><li>Synchronized through Redo Apply </li></ul></ul></ul><ul><ul><ul><li>The Redo Apply technology applies redoes data on the physical standby database using standard Oracle media recovery techniques.  </li></ul></ul></ul><ul><ul><li>Logical Standby Database </li></ul></ul><ul><ul><ul><li>Contains the same logical information as the production database although the physical organization and structure of the data can be different . </li></ul></ul></ul><ul><ul><ul><li>Logical standby database does not have to match the schema structure of the source database. </li></ul></ul></ul><ul><ul><ul><li>Synchronized through SQL apply. </li></ul></ul></ul>
  10. 10. Data Guard Concept <ul><li>Benefits of Standby Database </li></ul><ul><ul><li>Switchover and Failover </li></ul></ul><ul><ul><li>Reduce the amount of queries performed on the primary database </li></ul></ul><ul><ul><li>Can be used to upgrade oracle Database software and patch sets with almost no downtime. </li></ul></ul>
  12. 12. Data Guard Concept <ul><li>Services required on the primary database : </li></ul><ul><ul><li>Log Writer Process (LGWR) - Collects redo information and updates the online redo logs. It can also create local archived redo logs and transmit online redo to standby databases. </li></ul></ul><ul><ul><li>Archiver Process (ARCn) - One or more archiver processes make copies of online redo logs either locally or remotely for standby databases. </li></ul></ul><ul><ul><li>Fetch Archive Log (FAL) Server - Services requests for archive redo logs from FAL clients running on multiple standby databases. Multiple FAL servers can be run on a primary database, one for each FAL request </li></ul></ul><ul><li>Services required on the standby database : </li></ul><ul><ul><li>Fetch Archive Log (FAL) Client - Pulls archived redo log files from the primary site. Initiates transfer of archived redo logs when it detects a gap sequence. </li></ul></ul><ul><ul><li>Remote File Server (RFS) - Receives archived and/or standby redo logs from the primary database. </li></ul></ul><ul><ul><li>Archiver (ARCn) Processes - Archives the standby redo logs applied by the managed recovery process (MRP). </li></ul></ul><ul><ul><li>Managed Recovery Process (MRP) - Applies archive redo log information to the standby database </li></ul></ul>
  13. 13. Data Guard Concept Redo from primary database RFS ARC0 Standby redo logs Archived redo logs MRP/LSP Standby database
  14. 14. Real Time Apply <ul><li>Redo data is applied to the standby database as soon as it is received from the primary database </li></ul><ul><ul><ul><li>In Oracle9 i Data Guard this apply has to wait till an archivelog is created on the standby database </li></ul></ul></ul><ul><li>For Redo Apply: </li></ul><ul><ul><li>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE </li></ul></ul><ul><li>When real time apply is enabled , RECOVERY_MODE column in V$ARCHIVE_DEST_STATUS displays “ MANAGED REAL TIME APPLY ” </li></ul>
  15. 15. <ul><li>SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=tmstby </li></ul><ul><li>2> OPTIONAL LGWR SYNC AFFIRM </li></ul><ul><li>3> VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) </li></ul><ul><li>4> DB_UNIQUE_NAME=tmstby'; </li></ul><ul><li>SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(tmtst,tmstby)' </li></ul><ul><li>SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY; </li></ul><ul><li>SQL> SELECT PROTECTION_MODE, PROTECTION_LEVEL FROM V$DATABASE; </li></ul><ul><li>PROTECTION_MODE PROTECTION_LEVEL </li></ul><ul><li>--------------------- --------------------- </li></ul><ul><li>MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY </li></ul>
  16. 16. Real-Time Apply Architecture Physical Logical Standby Database MRP/ LSP RFS Standby Redo Logs ARCH Archived Redo Logs Archived Redo Logs Primary Database Transactions LGWR Online Redo Logs ARCH Oracle Net Real Time Apply
  17. 17. Real Time Apply Benefits <ul><li>Standby databases now more closely synchronized with the primary </li></ul><ul><ul><li>More up-to-date, real-time reporting </li></ul></ul><ul><ul><li>Faster switchover and failover times </li></ul></ul><ul><ul><ul><li>Reduces planned and unplanned downtime </li></ul></ul></ul><ul><ul><ul><li>Better Recovery Time Objective (RTO) for DR </li></ul></ul></ul>
  18. 18. Data Dictionary <ul><li>V$DATABASE </li></ul><ul><ul><li>DATABASE_ROLE: LOGICAL STANDBY, PHYSICAL STANDBY or PRIMARY </li></ul></ul><ul><ul><li>PROTECTION_LEVEL: current protection mode setting. </li></ul></ul><ul><ul><li>FS_FAILOVER_STATUS: synchronization status </li></ul></ul><ul><li>V$DATAGUARD_STATS </li></ul><ul><li>V$DATAGUARD_STATUS </li></ul><ul><li>V$LOG & V$STANDBY_LOG: Redo log changed. </li></ul><ul><li>V$MANAGED_STANDBY : Recovery progress </li></ul>
  19. 19. THANK YOU