Real Application Clusters

Transcription

Real Application Clusters
Hochverfügbarkeit
mit
Oracle 9i
UNBREAKABLE
Claudia Hüffer
Senior Sales Consultant
Server Technologies
Competence Center Nord
(STCC Nord)
Agenda
Ÿ Einleitung
Ÿ Hochverfügbarkeits-Merkmale von
Oracle9i
Ÿ Maximum Availability Architecture
(MAA)
High Availability is …
Kosten von Ausfallzeiten ?
Downtime Per Year (=8760h)
Percentage
Availability
Days
Hours
Minutes
95%
18
6
0
99%
3
15
36
99.9%
0
8
46
99.99%
0
0
53
99.999%
0
0
5
99.9999%
0
0
1
“…even 99.9% data availability can cost a company
nearly $5m a year”
- The Standish Group 2001
Gründe für ungeplante Ausfallzeiten
Hardware & System Error
49%
Human Error
Computer Viruses
36%
7%
Software Corruption
4%
Natural Disasters
3%
- The Disaster Recovery Journal 2001
Ursachen für Ausfallzeiten
Unscheduled
Outages
System Faults
and Crashes
Data Center
Disasters
Human
Error
Scheduled
Outages
Data and
Media Failures
Inadequate System
Design, Testing & Process
Maintenance &
Continuous
Operations
Maximum Availability Architecture
Oracle9iAS
Oracle9iAS
WAN Traffic Manager
Dedicated Network
RAC
Primary Site
Data Guard
RAC
Secondary Site
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMinor
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Fast-Start Fault Recovery
Ÿ Fast-Start Recovery continuously
advances the recovery point as the
database is updated
–
–
Recovery time is controlled by
MTTR_Target dynamic
parameter
Cost of achieving recovery time is
tracked and reported by MTTR
advisory
Ÿ Roll back is done in background
–
–
Fast-start make it simple to control
Mean Time To Recover (MTTR)
–
New work begins immediately
after roll forward completes
New transactions will roll back
changes to rows they access that
are locked by dead transactions
Long running transactions have
zero effect on recovery time
Minimal I/O Recovery
Ÿ Viele Service Level Agreements beinhalten eine Grenze
bezüglich der Mean Time To Recover (MTTR).
Ÿ Der DBA muß zuverlässig in der Lage sein, einen Grenzwert
für die Zeit des Recovery zu setzen:
Ÿ FAST_START_MTTR_TARGET (in Sekunden)
Intern wird dies in entspr. Werte für die folgenden beiden
init.ora Parameter umgesetzt :
FAST_START_IO_TARGET
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT (gleiches Verh. wie vorher)
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMiner
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Real Application Clusters
Users
Cache Fusion
ch e
Shared Ca
Ÿ Scales off-the-shelf
applications with no changes
Ÿ World’s best Availability with
Fast-Start Fault Recovery
–
–
The Ultimate Parallel
Architecture
When a node crashes the
database keeps running on the
remaining nodes
Recovery time is independent
of workload or database size
Highly Available Database
Real Application Clusters
Ÿ Fast Failover
–
–
–
Protection from local site system failures
Faster than cold cluster failover solution
Fast-start fault recovery (instance failure
MTTR)
Ÿ Availability and Accessibility
–
Allows for scheduled outages
Ÿ Add and remove nodes transparently
–
Transparent Application Failover (TAF)
provides uninterrupted service
Highly Available Database
Real Application Clusters
Ÿ Higher Scalability
–
–
–
All system resources from all nodes are leveraged
Cache fusion eliminates need to partition data or
modify the application – fully application transparent
Connection load balancing distributes connection
requests from application tier
Ÿ Manageability
–
Provides a single image of the database to manage
Oracle ist Oracle ist Oracle!
Real Application Clusters ist eine Option für Oracle9i
Ÿ Eine Codebasis; Alle Oracle9i Funktionalitäten
Ÿ Identische Schnittstellen
Ÿ Identische Tools-Infrastruktur
–
–
–
–
Oracle Universal Installer (OUI)
Enterprise Manager (EM)
Database Configuration Assistant (DBCA)
Recovery Manager (RMAN)
Ÿ Applikationen brauchen für RAC nicht angepasst zu
werden
Oracle9i RAC für alle Applikationen und Plattformen
- Sicherheit und Skalierbarkeit auch im Commodity Hardware Umfeld
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMiner
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Recovery Manager (RMAN)
Recovery
Catalog
Enterprise
Manager
Recovery
Manager
Ÿ Oracle provides integrated,
automated, databasemanaged backups through
RMAN
Ÿ RMAN features:
–
Disk
Disk
Disk
Disk
–
Media Management Layer
Network
–
–
–
Managing the backup, restore,
and recovery process
Backup at database, tablespace,
or datafile level
Block-level media recovery
Optimizations for improved
availability and performance
Integration with Oracle
Enterprise Manager and several
3rd party tools
Oracle 9i Data Guard Konzept
Physical
Standby
Database
Backup
DIGITAL DATA STORAGE
Production
Database
Network
on/
r
h
c
Syn
r on
h
c
n
Asy
Broker
Synchro
n/
Asynch
r on
DIGITAL DATA STORAGE
Delay/
REDO
No Delay Apply
Logical
Standby
Database
Delay/
No Delay
SQL
Apply
Continuously
Open for Reports
Data Guard Voraussetzungen
Ÿ Gleiche Datenbank-Version (auch Patchlevel) auf
Primary und Standby-Site
Ÿ Gleiches Betriebssystem auf beiden Seiten
–
Laut Doku sind unterschiedliche BetriebssystemVersionen erlaubt
Ÿ Gleiche Hardware/Betriebssystem Software
Architektur (d.h. 32/32-bit, 64/64-bit)
Ÿ Anzahl CPUs, Memory und Verzeichnis-Strukturen
dürfen unterschiedlich sein
Ÿ RAC kann mit RAC oder Single-Instance kombiniert
werden, bei RAC nur manuelle Konfiguration
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMiner
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Oracle9i LogMiner
Sicht auf alle Datenbank-Änderungen
Ÿ Inhalte der Redo Logs mit SQL abfragen
Ÿ GUI (LogMiner Viewer) oder
Command Line Interface
Ÿ Query by value und Undo jeder Änderung
Ÿ Supported DDL, chained rows, primary keys and
Direct Path
Benutzerfehler korrigieren
Oracle9i LogMiner Viewer
Flashback Query
Oracle Invents
Time Machine
A Time Machine for
Ÿ Flashback Query allows viewing
Your Data
data as it existed in the past
Before
–
Now
–
Query at a time of your choosing
Use standard SQL for corrections
Ÿ Revolutionary advance in recovery
–
Mistake
Delete from Emp
where
Ename=‘Smith’;
Enormously simpler and faster than
traditional recovery from backups
Correction
Insert into Emp select * from emp
AS OF yesterday
where Ename=‘Smith’;
Oracle Flashback
Ÿ System Managed Undo (SMU) Mode muss aktiviert
sein
Ÿ Setzen von Undo Retention (Zeit in Sekunden)
Alter system set undo_retention = 1800;
ermöglicht FlashBack Snapshots bis zu 30 Minuten
Rechenbeispiel für den Platzbedarf:
–
–
–
Blockgrösse = 8 KB
Transaktionsrate = 20 Undo-Blöcke/s
undo_retention = 1800
ergibt (1800 * 200 * 8 KB) = 270 MB
“Before Oracle 9i’s
Flashback query, a restore
was required to recover lost
data. Now, using the
Flashback option, human
error can be easily undone.”
- Tim Donar, Acxiom
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMiner
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Dynamic Reconfiguration
Ÿ Oracle dynamically adjusts to
hardware changes
– Dynamically add and subtract
CPUs to SMP
Ÿ Proven scalability to 72 CPU
SMP
Dynamically grow and shrink
shared memory and buffer
cache
– Dynamically add and remove
nodes in a cluster
Capacity on Demand
Ÿ No data movement needed
Ÿ No Reboot required
–
Oracle9i – Hochverfügbarkeit allgemein
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMiner
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Online Redefinition
Ÿ Online schema redefinition
–
–
add, modify, drop, rename table columns
Rename constraints
Ÿ Online Index Operationen
–
create, recreate
Ÿ Online analyze und validate
Ÿ Updates & queries laufen weiter
Geplante „Downtimes“ verringern!
Online Redefinition
Ÿ All indexing operations can be done online
–
Create new index, move index, defragment index
Ÿ Tables can be Reorganized & Redefined online
–
–
Table contents are copied to a new table
Ÿ Defragments and allows changing location, table type,
partitioning
Contents can be transformed as they are copied
Ÿ Can change columns, types, sizes - specified using SQL
“Select”
Source
Table
Continuous
Queries &
Updates
Copy
Table
Update
Tracking
Transform
Result
Table
Store
Updates
Transform
Updates
GUI
interface
to make it
Simple
Oracle eliminiert viele der geplanten
Ausfallzeiten
Ÿ 24 Stunden Betrieb mit Online Backup ohne
Beeinträchtigung der Benutzeraktivitäten
Ÿ Read Consistency - Lockingverhalten
–
–
Schreibende Benutzer warten nie auf lesende
Lesende Benutzer warten nie auf schreibende
Ÿ Event Monitoring im Enterprise Manager
–
Proaktives Erkennen von möglichen Problemsituationen
Ÿ Transparente Übernahme von Diensten bei
Wartungsarbeiten in einer Clusterumgebung
(shutdown transactional + TAF)
Kein Reorg in Oracle9i
Ÿ
Ÿ
Ÿ
Bei großen Datenmengen nehmen
Reorgs beim Mitbewerb viel Zeit in
Anspruch
Tabellenreorgs sind unter Oracle8i /
Oracle9i generell nicht nötig !
Spacemanagement
–
–
Ÿ
Ÿ
Unlimited extents
Locally managed tablespaces
Online Index Rebuild
Unterstützung bei
Datenmodelländerungen durch das
Change Management Pack
Oracle9i Partitioning
partition
table
“Orders
by Month”
Frühere
Monate
“read-only”
Partitionierung nach
Ÿ Range
Ÿ List
Ÿ Hash
Ÿ Composite
Orders
Table
Ermöglicht extrem schnelle und effiziente Rolling window Operationen
Oracle9i: Partitionierung
Ÿ Range Partitionierung
–
Daten basierend auf Partition-Key Werten in Partitionen
mappen
Ÿ Hash Partitionierung
–
Daten basierend auf einem Hash-Algorithmus in Partitionen
mappen
Ÿ List Partitionierung (DEFAULT Partition)
–
Diskrete Werte einer Partition zuordnen
Ÿ Composite Range-Hash Partitionierung
–
Kombiniert Range und Hash Partitionierung
Ÿ Composite Range-List Partitionierung
–
Kombiniert Range und List Partitionierung
Oracle9i R2:
Composite Range-List Partitionierung
Ÿ Composite Range List
Partitionierung
–
–
Range partitioniert die
Daten für einfache
rolling Window Data
Loads
z.B. nach Monat
Sub List-Partition z.B
nach Region
JAN
FEB
OCT
NOV
DEC
Ost
West Nord
Süd
Mitte
Hochverfügbarkeit mit Oracle 9i
War das „schon“ alles?
Nein ... !
New Oracle9i High Availability Features
Ÿ Data Recovery
–
–
–
–
–
–
–
Ÿ Online Operations
Block level media
recovery
Trial Recovery
Tolerate corrupt redo logs
Self-describing backups
Policy based automated
backup and recovery
Stored backup
configurations
Resumable backup and
restore
–
–
–
–
–
Ÿ Self-Service Correction
– Flashback Query
Unlimited online
indexing
– Row level change history
operations
Online table
redefinition and
Ÿ Miscellaneous
reorganization
– Quiesce DB for
Dynamic buffer
maintenance
cache/shared pool
resizing
– Online add column/site for
replication groups
Online ANALYZE
VALIDATE
– Offline Diagnostics
Online add and
remove CPU
New Oracle9i High Availability Features
Ÿ Fast Fault Recovery
–
–
–
Ÿ Data Protection
Minimal I/O crash
recovery
Time-based limit on crash
recovery
Resumable space
allocation
–
–
–
–
–
Ÿ Log Analysis
–
–
LogMiner
Query by content of
change
–
–
Ÿ Cluster Recovery
Zero data loss standby
Logical standby
Push-Button standby
automation
Delayed apply standby
Network outage
tolerance
Near real-time reporting
Tolerate corrupt logs
Non-disruptive
cluster
reconfiguration
– Disk heartbeat
validates network
heartbeat
– Integrated Oracle
Parallel Fail Safe
– Multi-node Fail Safe
for Windows 2000
–
Hochverfügbarkeit mit Oracle 9i
Was spielt sonst noch eine Rolle?
• Security
Je besser und feiner der DBA den Zugriff
verwalten und monitoren kann, umso
weniger Schaden kann angerichtet
werden.
• Manageability
Je leichter die Administration und das
Monitoring, umso höher die Verfügbarkeit.
Oracle9i – Hochverfügbarkeit
Ÿ
Oracle9i verhindert oder minimiert Ausfallzeiten
System
Failures
Unplanned
Downtime
Planned
Downtime
• Automatic Crash Recovery
• Real Application Clusters
• RAC Guard
Data Failures &
Disasters
• Data Guard
• Recovery Manager
Human Errors
• FlashBack Query
• LogMinor
Routine Admin
• Dynamic Reconfiguration
Maintenance
• Online Redefinition
Maximum Availability Architecture
Oracle9iAS
Oracle9iAS
WAN Traffic Manager
Dedicated Network
RAC
Primary Site
Data Guard
RAC
Secondary Site
Maximum Availability Architecture
Ÿ Best Oracle High Availability Architecture
Ÿ
What to use
Ÿ Best Practices
Ÿ
Ÿ
Ÿ
How to build it
How to manage it
How to fix it
High Availability Goal
Ÿ Design and validate the best, integrated High
Availability solution
–
–
–
Unbreakable Architecture
Ÿ Handle all outages at all tiers
Best Practices
Ÿ Cookbook for prevention, avoidance, mitigation, and
recovery
Ÿ Configuration, operational, outage solutions, restore fault
tolerance
Complete out-of-the-box high availability
Ÿ Tested and validated solution
Unbreakable Architecture + Best Practices = Maximum Availability
Maximum Availability Architecture
Ÿ Best Oracle High Availability Architecture
–
–
–
Blueprint for Database and Oracle9iAS
Guidelines for hardware and non-Oracle software
but platform, OS, storage, network, … independent
Evolves with new Oracle versions and features
Ÿ Best Practices
–
–
–
Configuration and operational
Outages and detailed solutions
Restoring fault tolerance after an outage
MAA Information Sources
Ÿ Oracle Technology Network
–
High Availability Collateral section
Ÿ Maximum Availability Architecture - Overview
Ÿ Maximum Availability Architecture – The
Details
http://otn.oracle.com/deploy/availability/techlisting.h
tml
Ÿ Oracle Consulting – Advanced
Technologies Solutions (ATS) Group
http://otn.oracle.com/consulting/9iServices/content.
html
F R A G EN
A N T W O R T E N
[email protected]