mike dietrich
play

Mike Dietrich BU Database Technologies ORACLE Deutschland GmbH - PDF document

IT-Symposium 2005 Mike Dietrich BU Database Technologies ORACLE Deutschland GmbH Page 1 www.decus.de 1 IT-Symposium 2005 Total synchron Daten retten ohne Downtime ?! Oracle DataGuard und Flashback Agenda Oracle Oracle DataGuard


  1. IT-Symposium 2005 Mike Dietrich BU Database Technologies ORACLE Deutschland GmbH Page 1 www.decus.de 1

  2. IT-Symposium 2005 Total synchron Daten retten ohne Downtime ?! Oracle DataGuard und Flashback Agenda Oracle Oracle DataGuard DataGuard Daten retten Daten retten ohne Downtime ohne Downtime Flashback Flashback Zusatznutzen Zusatznutzen Page 2 www.decus.de 2

  3. IT-Symposium 2005 Einführung Die Kardinal-Fragen: � Was kostet ein Ausfall pro Minute/Stunde/Tag ? – Was kostet Datenverlust ? – Wie sichtbar ist ein Ausfall ? – Wieviel Downtime ist gestattet ? – Wie stark sind die Nerven der DBA's ? – Einführung Wie ... ??? Batch-Job ... Daten gelöscht ... aus Versehen ... ?!? Page 3 www.decus.de 3

  4. IT-Symposium 2005 Agenda Oracle Oracle DataGuard DataGuard Daten retten Daten retten ohne Downtime ohne Downtime Flashback Flashback Zusatznutzen Zusatznutzen Oracle DataGuard � Desaster Recovery Lösung für Oracle DB's � Kostenfreies Feature der Oracle Enterprise Edition � Automatisiert das Anlegen und den Betrieb einer oder mehrerer Standby-Datenbanken � Ausfall der Produktionsdatenbank � Standby-Datenbank übernimmt � x 1000km Entfernung möglich Page 4 www.decus.de 4

  5. IT-Symposium 2005 Oracle DataGuard � Datenbank-Releases gleicher Release-Stand – gleiche Bit-ness – � Betriebssystem-Releases gleiches OS – unterschiedliche Bit-ness möglich, aber nicht empfohlen – unterschiedliche Release-Stände möglich, aber nicht empf. – � Empfehlung: identische Hardware, identische Betriebssysteme, identische – Patchlevel, identische Oracle-Patches Oracle DataGuard Clients Clients Primary Primary Standby Standby Site Site Site Site DIGITAL DATA STORAGE Backup Failover/Switchover Failover/Switchover Log Informationen Log Informationen Gap Detection Gap Detection No Data Loss No Data Loss Protection Modes Protection Modes Broker Agent Broker Agent Data Guard Broker Page 5 www.decus.de 5

  6. IT-Symposium 2005 ? Oracle DataGuard � 2 Typen von Standby-Datenbanken – Physical Standby � Redolog-Dateien werden recovert � Entweder Recovery Modus oder Read-Only � Blockidentische Kopie der Produktionsdatenbank � Desaster Recovery (Failover) – Logical Standby � Redolog-Dateien werden extrahiert � SQL-Statements werden auf die Standby angewendet � Logische Kopie der Produktionsdatenbank � Online Reporting, Rolling Upgrades Oracle DataGuard � 3 Möglichkeiten zur Administration – Pures SQL – DataGuard Broker und DGMGRL – DataGuard Broker und EM GridControl Page 6 www.decus.de 6

  7. IT-Symposium 2005 Oracle DataGuard - 10 g New Features � init-Parameter LOG_ARCHIVE_DEST_n : VALID_FOR -Attribute – erlaubt eine init.ora für alle Rollen – kein Tauschen der Init-Dateinen mehr nach Failover oder Switchover – Beispiel: *.log_archive_dest_2= 'SERVICE=phys LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=PHYS' Oracle DataGuard - 10 g New Features Clients Primary Primary Standby Standby Site Site Site Site REAL TIME APPLY REAL TIME APPLY • Redo-Records werden sofort angewendet • kein Warten auf ARCH Broker Agent Broker Agent Data Guard Broker Page 7 www.decus.de 7

  8. IT-Symposium 2005 Oracle DataGuard - 10 g New Features Oracle Net Transaktionen Up-to-date Standby DB LGWR MRP/ LSP RFS Standby Redo Logs Online Redo Real Time Logs Primär Apply ARCH Datenbank ARCH Archivierte Redo Logs Archivierte Redo Logs Oracle DataGuard - 10 g New Features � Engere Synchronisation der Standby mit der Poduktivdatenbank – Up-to-Date Echt-Zeit-Reporting – Schnelles Switchover und Failover � Verringert geplante und ungeplante Ausfallzeiten � Bessere Recovery Time Objective (RTO) beim Desaster Recovery � Kein Delay !!! � SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE Physical Standby USING CURRENT LOGFILE; � SQL> ALTER DATABASE START LOGICAL STANDBY APPLY Logical Standby IMMEDIATE; Page 8 www.decus.de 8

  9. IT-Symposium 2005 Agenda Oracle Oracle DataGuard DataGuard Daten retten Daten retten ohne Downtime ohne Downtime Flashback Flashback Zusatznutzen Zusatznutzen Flashback Logische Korruptionen, die durch Benutzerfehler entstehen, sind für Benutzer- ca. 40% aller Ausfälle Fehler verantwortlich !!! Andere Ursachen f ü r Ausf ä lle Page 9 www.decus.de 9

  10. IT-Symposium 2005 Flashback � Traditioneller Ansatz: Backup vom Tape einspielen � Recovery mit archivierten Logfiles + Online Redologs Fehler F e h l e r b e h e b u n g t � Mit Flashback: Einfach die Daten zum Zeitpunkt X aus dem Flashback-Log wiederherstellen - ein Kommando !!! Fehler Fehler- t behebung Flashback � 3 Ausprägungen von FLASHBACK – Flashback Query � Versions Query � Transaction Query � Undo Segmente – Flashback Table / Drop � Recycle Bin – Flashback Database � Point-In-Time-Recovery � Kein Restore des Backups � Flashback Logs � Nahtlose Integration in den RMAN Page 10 www.decus.de 10

  11. IT-Symposium 2005 Flashback Disk Write geänderter Blockinhalt - Block vorherige Versionen Flashback Log Rückspulknopf Enthält vorherige Blockinhalte in der Datenbank Flashback � Flashback Konfiguration: Flashback Log SQL> ALTER DATABASE Festlegen der FLASHBACK ON; Vorhaltezeit Flash Recovery Area � Initialisierungsparameter (init.ora / spfile) � db_recovery_file_dest � db_recovery_file_dest_size � db_flashback_retention_target [Default: 1440] Page 11 www.decus.de 11

  12. IT-Symposium 2005 Agenda Oracle Oracle DataGuard DataGuard Daten retten Daten retten ohne Downtime ohne Downtime Flashback Flashback Zusatznutzen Zusatznutzen DataGuard und Flashback Real Time Apply FLASHBACK ON FLASHBACK ON Page 12 www.decus.de 12

  13. IT-Symposium 2005 Szenarien DataGuard und Flashback I. Flashback auf PHYS Standby � Ziel: Wiederherstellen von Daten II. Flashback auf PROD � Ziel: PITR auf Produktion ohne Verlust der Standby III. Flashback nach Failover zu PHYS � Ziel: kein Neuaufbau der Standby nach Failover I. Flashback auf PHYS • Ausgangspunkt: TRUNCATE TABLE TRUNCATE TABLE • Ziel: Daten wiederherstellen, keine Downtime auf PROD • Vorgehensweise: 1) PHYS mit FLASHBACK STANDBY DATABASE zurückfahren 2) PHYS read-only öffnen 3) Benötigte Daten exportieren 4) Automatische Resynchronisation der Standby 5) Daten auf PROD wieder einspielen Page 13 www.decus.de 13

  14. IT-Symposium 2005 I. Flashback auf PHYS PHYS: PROD: PROD: PHYS: SQL> SQL> select select current_scn current_scn from from SQL> select select current_scn current_scn from from SQL> v$database; ; v$database SQL> truncate SQL> truncate table table scott.emp scott.emp; ; v$database; ; v$database SQL> truncate truncate table table scott.emp scott.emp; ; SQL> SQL> SQL> select select oldest_flashback_scn oldest_flashback_scn from from v$flashback_database_log v$flashback_database_log; ; SQL> select SQL> select oldest_flashback_scn oldest_flashback_scn SQL> shutdown shutdown immediate; immediate; SQL> SQL> startup SQL> startup mount mount; ; SQL> shutdown SQL> shutdown immediate; immediate; from v$flashback_database_log from v$flashback_database_log; ; SQL> SQL> flashback flashback standby standby database database SQL> startup startup mount mount; ; SQL> to scn scn <CURRENT_SCN von PROD>; <CURRENT_SCN von PROD>; to SQL> flashback SQL> flashback standby standby database database SQL> alter SQL> alter database database open open read read only only; ; $> exp $> exp scott scott/ /tiger tiger tables=emp tables=emp to scn to scn <CURRENT_SCN von PROD>; <CURRENT_SCN von PROD>; SQL> alter database database open open read read only only; ; SQL> alter SQL> shutdown shutdown immediate; immediate; SQL> $> exp exp scott scott/ /tiger tiger tables=emp tables=emp $> SQL> startup SQL> startup mount mount; ; SQL> shutdown shutdown immediate; immediate; SQL> SQL> alter SQL> alter database database recover recover managed managed standby database standby database using using current current SQL> startup startup mount mount; ; SQL> SQL> alter SQL> alter database database recover recover managed managed logfile logfile disconnect disconnect; ; ** automatische Synchronisation ** $> imp imp scott scott/ standby database /tiger tiger file=exp.dmp database using file=exp.dmp using current current $> standby $> imp imp scott scott/ /tiger tiger file=exp.dmp file=exp.dmp $> ** Daten stehen wieder zur Verfügung ** ** Daten stehen wieder zur Verfügung ** logfile disconnect disconnect; ; logfile ** Keine Downtime auf der PROD-DB ** ** Keine Downtime auf der PROD-DB ** ** automatische Synchronisation ** Agenda Oracle Oracle DataGuard DataGuard Daten retten Daten retten ohne Downtime ohne Downtime Flashback Flashback Zusatznutzen Zusatznutzen Page 14 www.decus.de 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend