Post on 20-Mar-2020
1
Oracle
<Insert Picture Here>
Architektur für maximale Hochverfügbarkeit
Sebastian.Solbach@oracle.com
BU DatenbankOracle Deutschland GmbH
2
Storage Failure Server Ausfall
Data Protection
Agenda
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
Storage Failure Server Ausfall
Data Protection
Absicherung Server
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
3
Real Application Cluster
• Aktiv-Aktiv Shared Disk Cluster
• Unlimitierte Skalierbarkeit (Test mit 100 Knoten)
• Performance-Optimierungen
• Parallelisierung, Ressourcemanager, Partitionierung
Oracle Real Application Cluster
Optimizing Availability Unplanned Outages Using Oracle Clusterware & RAC
Oracle Clusterware
Clusterware
Operating System
Group Membership (cssd)
High Availability (racg)Framework (crsd)
Process Monitor (oprocd)
Event Management (evmd)
VIP
4
Oracle Clusterware Lizenz: Fast immer dabei
http://www.oracle.com/technology/products/database/clusterware/index.html
Using Oracle Clusterware to Protect 3rd Party Applications
Storage Failure Server Ausfall
Data Protection
Absicherung Platten
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
5
• Der bevorzugte Storage Manager für Oracle
Datenbanken ( Striping / Mirroring )
• Einfache online Verwaltung
• Automatisches Repair & Rebalance
• Performance von Raw Volumes
• ASM Status
> 65% aller RAC-Installationen
> 25% aller 10g-Kunden
> 10TB auf ASM (VLDB)
Das „Filesystem“ Storage für Oracle Automatic Storage Management
http://www.oracle.com/technology/products/database/asm/index.html
Datenspiegelung mit ASM
• ASM spiegelt Daten über kostengünstige modulare Storage
Arrays
• Automatische Resynchronisation, wenn eine Platte oder ein
kompletter Spiegel ausfällt
• Automatische Reparatur von defekten Blöcken durch den
Spiegel
• Schnelle Resynchronisation mit Hilfe von Resilvering in 11g
• Rollendes Upgrade von ASM-Instanzen bei 11g
http://www.oracle.com/technology/products/database/asm/index.html
6
Stretched Cluster: Kein Desaster Recovery!
Cluster Interconnect
Write
Lost Write
Storage Failure Server Ausfall
Data Protection
Desaster Recovery
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
7
Oracle Data GuardStandby-Datenbanken
• Kostenfreier und Bestandteil der Oracle Enterprise Edition
• Standby-Seite muss lizenziert werden
• Physical Standby für Desaster Recovery
• Logical Standby für Rolling Upgrades und Reporting
Physikalische Standby Datenbank
ProduktionsDatenbank
Data Guard Redo Transport & Network Configuration
Oracle Data GuardZero Data Loss über lange Distanzen
• Die verwendete Netzwerkbandbreite von Data Guard Redo
Transport ist viel geringer, als bei System auf Basis reiner
Plattenspiegelung
150 km 450+ km
Data Guard: Synchrones Redo Shipping
Synchrone Plattenspiegelung
300 km
Data Guard DR Sweet Spot
• Weit genug weg für Regionales Desaster• Nah genug für Zero Data Loss
Data Guard Redo Apply & Media Recovery
8
Absicherung gegen Datenkorruptionen
• DB_ULTRA_SAFE Parameter (11g)
• Umfassendste Maßnahme um Datenkorruption zu erkennen und zu verhindern
• DB_BLOCK_CHECKING erkennt und verhindert
Blockkorruptionen
• DB_BLOCK_CHECKSUM erkennt und verhindert
Korruptionen in den Redologs (gilt nur für die Standby)
• DB_LOST_WRITE_PROTECT – Erkennt „Lost Writes“
Cluster Interconnect
Write
Lost Write
Cluster InterconnectCluster InterconnectCluster InterconnectCluster Interconnect
Write
Lost Write
http://www.oracle.com/technology/deploy/availability/htdocs/DataGuardRemoteMirroring.html
Oracle Data GuardFast Start Failover
• Observer sorgt für automatische Umschaltung
• User-defined Failover-Kriterien
LGWR ASYNC
Broker Agent
Broker Agent B
rokerAgent
BrokerAgent
Data Guard BrokerData Guard Broker
STANDBYPRODClients
Data Guard Fast-Start Failover
9
Nur Desaster Recovery?Active Data Guard 11g
• Entlastung der Primärdatenbank durch Auslagerung von Read-Only
Abfragen auf eine immer aktuelle Physikalische Standby
• Redologs werden unterdessen transportiert und sofort angewendet
• Alle Datentypen werden unterstützt
• Konsistente Leseergebnisse
Real-time
Queries
Physikalische Standby Datenbank
ProduktionsDatenbank
Laufender Redo Transport & Apply
Real-time Query
Schnelles Inkrementelles
Backup
Active Data Guard 11g Best Practices
Active Data Guard
• Vorgehensweise:
ALTER DATABASERECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASERECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN;ALTER DATABASE OPEN;
ALTER DATABASERECOVER MANAGED STANDBY DATABASEUSING CURRENT LOGFILE DISCONNECT;
ALTER DATABASERECOVER MANAGED STANDBY DATABASEUSING CURRENT LOGFILE DISCONNECT;
10
Redo Apply Performance
48 47 45
116112111
0
20
40
60
80
100
120
MB/sec
OLTP Batch
Mounted
Read-only
Read-only (RAC)
• Keine Signifikanten Auswirkungen!
Implementierung Active-Active Sites
• Oracle Data Guard• Einfaches, performantes DR
• Read-only
• Komplette Datenabischerung
• Alle Datentypen
• “Gleiches” OS
• Oracle Streams Replication• Flexibel
• Beide Seiten aktiv
• Teildaten
• Nicht alle Datentypen
• Alle OS
Updates Queries Updates Updates
Source Target Source Target
Oracle Streams Configuration & Performance Tuning Best Practices
11
Storage Failure Server Ausfall
Data Protection
Alternatives Backup
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
Recovery nach AnforderungObjekte – nicht Bits & Bytes
FlashbackDatabase
FlashbackTransaction
FlashbackTable
FlashbackDrop
FlashbackQuery
Continuous Data Protection (CDP) Built Within the Database
http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm
12
Storage Failure Server Ausfall
Data Protection
Backup & Restore
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
Falls gar nichts mehr geht:RMAN & Recovery Advisor
• Automatisches Disk-basiertes Backup
• Inkrementelles Backup
• Schnelles Inkrementelles Backup, indem nur die geänderten Blöcke gesichert werden (Block Change Tracking)
• Paralleles Backup & Recovery
• Trial Recovery
• Block-basierendes Recovery
• Point-in-time Tablespace Recovery
• Data Recovery Advisor
• Schnelle Backup Kompression
Using Recovery Manager (RMAN) with Oracle Data Guard in Oracle Database 10g
13
Storage Failure Server Ausfall
Data Protection
Wartung
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
Lösung I: Server VirtualisierungOracle VM
• Splitten eines physischen
Servers in mehrere
logische kleine Server
• Serverwartung
• Hardware:
Online Migration zu einem
anderen Server
• Zusätzlicher Nutzen:
• Granulare
Ressourcenzuordnung
• Einfaches Deployment
• Server Konsolidierung
Hardware Plattform
Virtualization Layer
Virtual Machines
http://www.oracle.com/technology/products/vm/index.html
14
Lösung II: Virtualisierung (Cluster)
• Zusammenfasses mehrerer
physischer Server zu einem
logischen großen
• Serverwartung
• Hardware:
Arbeit übernehmen andere
Knoten
• Betriebssysteme
• Zusätzlicher Nutzen:
• Ressourcenausnutzung
• Unlimitierte Skalierbarkeit
• Ungeplante Ausfallzeiten
Oracle VM erweitert das Gridkomplementäre Lösungen
Oracle VM Oracle VM Oracle VM
RAC
Node
RAC
Node
RAC
Node
Oracle
Application
Enterprise
Manager
high speed interconnect
Single
Instance
Database
• Einfache Pflege und Verwaltung
• Virtualisierung innerhalb und über Cluster hinweg
Oracle Real Application Clusters in Oracle VM Environments
15
Oracle RAC zertifiziert
Oracle Real Application Clusters (RAC)• Oracle 10gR2 (10.2.0.4 and up) RAC for Linux x86 certified on
Oracle VM 1
• Guest OS: OEL 5.1 (and above) RHEL 5.1 (and above) for Linux x86
• Paravirtualized (PV) mode only
• The following features are not supported:
• CPU overcommit: only one virtual CPU per core
• Dynamic resizing of guest virtual machine
• Live Migration
• Virtual Machine Pause/Restore
1 Only for x86 (32-bit). Other certifications of RAC on OracleVM is ongoing but not completed yet today (September 2008)
• Metalink Note: 464754.1 - Certified Software on Oracle VM
http://www.oracle.com/technology/products/database/clusterware/index.html
Patchen der Datenbank IRolling Patch Update mit RAC
• Oracle Patch
Upgrades
inklusive
Critical Patch
Updates
(CPUs)
• Betriebs-
system-
patches
• Hardware
Upgrades
Initiale RAC Konfiguration Clients auf A, Patch B
Upgrade Complete
Clients Clients
Clients on B, Patch A
Patch
1 2
34
A B A B
A BBA B
B
AAPatch
Optimizing Availability Planned Maintenance Using Oracle Clusterware & RAC
16
Patchen der Datenbank IIRolling Upgrades - Logical Standby
Logical Standby Konfiguration
ClientsRedo
10.2.0.3 10.2.0.3
1
LP
Switchover (Rollentausch)dann Upgrade L (Ex-P)
Redo
4
Upgrade
11.1.0.6
PL
"Misch-Betrieb" zum Testen
Redo
3
P L
Upgrade Knoten L auf 11g
Upgrade
Logs
Queue
10.2.0.3
2
11.1.0.6
P L
11.1.0.6 10.2.0.3 11.1.0.6
Rolling Database Upgrades Using Data Guard SQL Apply
Logical Standby Datentypen
SecureFile CLOB, NCLOB, BLOB
BFILE
ROWID
User-defined types
object types
REFs, varrays, nested tables
XMLType object relationally or binary
Any types, URI types, spatial types,
media types
http://www.oracle.com/technology/deploy/a
vailability/pdf/maa_edtsoverview.pdf
VARCHAR2, NVARCHAR2
NUMBER, FLOAT
LONG
DATE
BINARY_FLOAT&DOUBLE
TIMESTAMP
ZONE
INTERVAL
RAW
LONG RAW
CHAR, NCHAR
UROWID
CLOB, NCLOB, BLOB
XMLType stored as CLOB
Extended Datatype Support:Unterstützte Datentypen
Extended Datatype Support: SQL Apply and Streams
17
PhysicalPhysical
UpgradeUpgrade
LogicalLogical
Rolling Upgrades verbessert:Transient Logical Standby
Für Rolling Upgrades
• Transfer der Physical Standby
in eine Logical Standby
• Upgrade der Logical Standby
• Rücktransformation in eine
Physical Standby
PhysicalPhysical
Rolling Database Upgrades using Transient Logical Standby 11g
���������������� ��������������������
t t
�� ������ ���� �� ������ ����Übersicht
18
���������������� ���������������������� ����������� ������ ����������� ����
t t
�� ������ ���� �� ������ ������������
Übersicht
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ��������������������KEEP IDENTITY
t t
synchronize
�� ������ ���� �� ������ ������������
��������
Übersicht
19
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY
t t
synchronize
�� ������ ���� �� ������ ������� ! "��#������ ! "��#�����������
Übersicht
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY ����������������SWITCHOVER
t t
�������������������� synchronize
synchronize
�� ������ ���� �� ������ ������� ! "��#������ ! "��#���
��������
��������
Übersicht
20
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY ����������������SWITCHOVER�� ����������� ������ ����������� ����FLASHBACKDATABASE TO:
t t
�������������������� synchronize
synchronize
�� ������ ���� �� ������ ������� ! "��#������ ! "��#���
��������
Übersicht
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY ����������������SWITCHOVER�� ����������� ������ ����������� ����FLASHBACKDATABASE TO: ��� ! "��#������ ! "��#���
t t
����������������������������������������synchronize
synchronize
CONVERT TOPHYSICAL
�� ������ ���� �� ������ ������� ! "��#������ ! "��#���
��������
Übersicht
21
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY ����������������SWITCHOVER�� ����������� ������ ����������� ����FLASHBACKDATABASE TO: ��� ! "��#������ ! "��#���
t t
����������������������������������������synchronize
synchronize
CONVERT TOPHYSICAL
�� ������ ���� �� ������ ������� ! "��#������ ! "��#���
synchronize$���� ��" ��� ������� ��� ���%$���� ��" ��� ������� ��� ���%
Übersicht
���������������� ���������������������� ����������� ������ ����������� ���� ������������������������ ����������������������� ����� ��KEEP IDENTITY ����������������SWITCHOVER�� ����������� ������ ����������� ����FLASHBACKDATABASE TO:
������������������� ! "��#������ ! "��#���
t t
���������������������������������������� ��������������������synchronize
synchronize
CONVERT TOPHYSICAL
�� ������ ���� �� ������ ����
SWITCHOVER
��� ! "��#������ ! "��#���synchronize
$���� ��" ��� ������� ��� ���%$���� ��" ��� ������� ��� ���%��������
Übersicht
22
Storage Failure Server Ausfall
Data Protection
Maximale Ausfallsicherheit
Site Ausfall
BenutzerfehlerDaten Änderungen
System Änderungen
Storage Ausfall
Daten Absicherung
http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
Maximum Availability Architecturehttp://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm
23
MAA: Nahtloser Client Failover
• Ein Muss für Hochverfügbarkeit ist ein schnelles und transparentes Failover der Benutzer
• Verfügbarkeit wird auf Benutzer-Seite gemessen, nicht auf Datenbankebene
• Clients absichern für:
• Instanz Fehler
• Knotenausfall
• Netzwerk Ausfall
• Site Failure
• Clients sollten niemals auf TCP/IP Timeouts warten müssen
• Client Failover Whitepaper:
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_ClientFailoverBestPractices.pdf
Client Failover in Data Guard Configurations for Oracle Databases
AQ&Q U E S T I O N SQ U E S T I O N S
A N S W E R SA N S W E R S
Q&A
http://www.oracle.com/technology/products/database/clusterware/index.html
24