High Availability for Databases Uwe Schulz SAP AG
Overview of HA Options One Database Two Databases Cluster Node Cluster Node shared storage Replication Standby Clustering alternatives: shared nothing vs. shared everything Replication on database level Replication on storage level Combination of the options SAP AG 2002, Title of Presentation, Speaker Name 2
Clustering Alternatives Shared nothing ( = fail-over cluster) Every node writes on its own disk set Fail over No load balancing IP Shared everything ( = parallel ) Every node can write on every disk simultaneously Fail over Load balancing Distributed lock management (DLM) IP SAP AG 2002, Title of Presentation, Speaker Name 3
Failover Cluster Host and standby host work in a cluster public network If host fails the standby host takes over its tasks: Boot Disk Cluster Node 1: Database Cluster Interconnect Boot Disk Cluster Node 2: Central Instance Adress/identity takeover File system reassignment Restart of the (with crash recovery) Logs Data Cluster Lock / Quorum SAP shared disk No replication of files Cluster software depends on OS platform common Disks Example for a SAP related HA scenario. SAP AG 2002, Title of Presentation, Speaker Name 4
Fail-over Cluster Product Examples Fujitsu Siemens: PRIMECLUSTER, ReliantCluster (Reliant, Solaris, Linux) HP MC/ServiceGuard (HP-UX), TruCluster (Tru64) IBM HACMP (AIX), System Automation (OS/390) IBM iasp (OS/400, Release V5R2 and newer) Microsoft Cluster Service (Windows) SteelEye LifeKeeper (Linux) Sun: Sun Cluster (Solaris) Veritas Cluster Server (several OS) + several other solutions Cluster software depends on the underlying OS. It can protect databases as well as other applications and resources. SAP AG 2002, Title of Presentation, Speaker Name 5
SAP: Reconnect after Switchover Application Server reconnect after successful switchover Standby Server connection lost Switchover try reconnect Server The SAP application server lets its workprocesses reconnect to the database after errors even in a failover case. SAP AG 2002, Title of Presentation, Speaker Name 6
Parallel Database One runs on several servers (replicated RMS) Scalability Client IP Node 1 Fault tolerance No failover to standby required Fast switch between nodes Node 2 Products (for SAP): IBM 2 Data Sharing with Parallel Sysplex Option (OS/390) Oracle 9i RAC SAP AG 2002, Title of Presentation, Speaker Name 7
IBM 2 Data Sharing with Parallel Sysplex Shared everything approach: multiple 2 subsystems belonging to one 2 data sharing group Coupling facilities used for communication, locking, caching Up to 32 cluster nodes (each max. 12 processors) Coupling Facility Data sharing Non-disruptive hardware changes 2 Subsystem IBM Sysplex Timer 2 Subsystem IBM Non-disruptive software changes Non-disruptive policy changes Scalability and high availability SAP AG 2002, Title of Presentation, Speaker Name 8
Oracle 9i Real Application Cluster Oracle9i provides a high availability architecture that provides transparent client fail-over capability Little or no user downtime Applications and users are automatically and transparently reconnected to another system Queries continue uninterrupted 2002: 2003: Pilot customers Step-by-step platform release planned If a node fails, users will be migrated. SAP AG 2002, Title of Presentation, Speaker Name 9
Fail-over Cluster vs. Parallel with one Cluster Node: running Cluster Node: idle storage + Solutions for all platforms + Good cache hit rate + No performance impact after failover (for N:N redundancy) - Fail-over requires restart/recovery - Long fail-over times - Efficiency: one idle cluster node - Only vertical scalability (bigger HW) + Fast, transparent fail-over + Horizontal scalability, start with smaller computers + Load balancing + Efficient HW usage - Solution only for two platforms - Overhead due to DLM SAP AG 2002, Title of Presentation, Speaker Name 10
Fail-over Cluster vs. Parallel with Several s Cluster Node: CRM Cluster Node: R/3 CRM R/3 MCOD extends the benefits of parallel to landscapes with several s. MCOD CRM R/3 + Solutions for all platforms + Good cache hit rate on every node + No performance impact after fail-over (for N:N redundancy) ( but expensive!!!) + Scalability/tuning per database + Fast, transparent fail-over + Horizontal scalability, start with smaller computers + Load balancing + Efficient HW usage - Fail-over requires restart/recovery - Long fail-over times - Efficiency: one idle cluster node (or severe performance impact after failover) - Only vertical scalability (bigger HW) - Federated databases - Solution only for two platforms - Overhead due to DLM - Cache hit rate might be not optimal SAP AG 2002, Title of Presentation, Speaker Name 11
Replication Replication Standby A copy of the database is maintained using replication technology This 2 nd database can be used in a 2 nd location for disaster recovery Standby database as basis for system copies or backups With asynchronous replication protection from logical errors Different products/solutions with different features for the particular platforms SAP AG 2002, Title of Presentation, Speaker Name 12
Features of Replication Solutions Transaction aware replication? (Replication on or storage level?) Yes: Replication on level (e.g. log shipping and forward recovery). Units of work supported by replication solution. No: Replication on storage level. Synchronous vs. asynchronous replication? Synchronous (Mirroring): Changes are applied in a lock step (synchronously) to the database and its replica. Asynchronous (Shadowing): Changes are applied asynchronously 1 st on the database, 2 nd on its replica with some delay. Simultaneous read access of replica? (e.g. for reporting) Replication selection granularity? Physical disk volume Logical volume Database, table space, table File SAP AG 2002, Title of Presentation, Speaker Name 13
Replication on Level Host constant remote copy (e.g. log file shipping) Standby Host Failover Replication of data to a standby with features Standby can be used in case of on error Dependent on platform Synchronous vs. asynchronous replication Protection against logical errors possible SAP AG 2002, Title of Presentation, Speaker Name 14
Level Replication: Log Shipping Host Standby Host Archive logs of are transported to standby host in recovery mode archive logs applied Standby Standby is in recovery mode, archive logs will be applied Archive Log log shipping Archive Log SAP AG 2002, Title of Presentation, Speaker Name 15
Replication on Level - Products SAP : Asynchronous, log-based replication (hot standby solution in preparation) Oracle Standby Database: Asynchronous log-based replication of a db to one site Symmetric replication from Oracle: Asynchronous and synchronous statement-based replication of data to one or more sites High-availability data replication (HDR) from Informix: Asynchronous and synchronous, log-based replication of data at the table level to one or more sites (limited usage) Microsoft SQL Server Standby Database: Asynchronous, log-based replication of a database Replicated standby database for 2 U: Asynchronous, log-based replication of a database Replicated standby database for 2 for OS/390: Synchronous and asynchronous replication of database Sychronous and asynchronous journal replication for 2 for OS/400: Lakeview, DataMirror or Vision Solutions + some 3rd party products (e.g. from Quest, Libelle, ) SAP AG 2002, Title of Presentation, Speaker Name 16
Replication on Storage Level Host write to both disks (transparently via mirroring) Standby Host Failover Replication of data to a standby on storage level Standby can only be used in case of on error Storage system enables synchronous writing on remote disks Can be used to create a disaster recovery site SAP AG 2002, Title of Presentation, Speaker Name 17
Replication on Storage Level Product Selection Compaq DRM EMC SRDF Hitachi HRC IBM PPRC HP Continuous Access XP Sun StorEdge Network Data Replicator Veritas Volume Replicator... etc. SAP AG 2002, Title of Presentation, Speaker Name 18
Clustering vs. Replication Cluster Node Cluster Node shared storage Replication Standby One database Simple solution for local failover With parallel transparent fail-over and good scalability Two databases Sophisticated solution enabling disaster recovery Protection from logical errors with asynchronous replication Using standby as basis for system copies (e.g. for test systems) or non-impact backup Combine the benefits of both technologies. SAP AG 2002, Title of Presentation, Speaker Name 19
Example: Combination Production Datacenter Disaster Recovery Datacenter parallel Standby (x hours behind) (Split) Test citywide Distances (Split) Backup Backup Prod. Prod. Mirror Storage System ESCON or other Storage System Prod. Failover Prod. Failover Mirror Parallel for fast and transparent local fail-over Disaster recovery site with synchronous storage replication Split-mirror copy for test systems Split-mirror copy for non-impact backup Standby via asynchronous replication (x hours behind) to protect from logical errors SAP AG 2002, Title of Presentation, Speaker Name 20
Copyright 2002 SAP AG. All Rights Reserved No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of Microsoft Corporation. IBM, 2, 2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iseries, pseries, xseries, zseries, z/os, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix and Informix Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries. ORACLE is a registered trademark of ORACLE Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, the Citrix logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. SAP, SAP Logo, R/2, R/3, mysap, mysap.com and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are trademarks of their respective companies. SAP AG 2002, Title of Presentation, Speaker Name 21
Copyright 2002 SAP AG. Alle Rechte vorbehalten Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden. Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten. Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint und SQL Server sind eingetragene Marken der Microsoft Corporation. IBM, 2, 2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iseries, pseries, xseries, zseries, z/os, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix und Informix Dynamic ServerTM sind Marken der IBM Corporation in den USA und/oder anderen Ländern. ORACLE ist eine eingetragene Marke der ORACLE Corporation. UNIX, X/Open, OSF/1 und Motif sind eingetragene Marken der Open Group. Citrix, das Citrix-Logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin und andere hier erwähnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc. HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA ist eine eingetragene Marke der Sun Microsystems, Inc. JAVASCRIPT ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie. MarketSet und Enterprise Buyer sind gemeinsame Marken von SAP AG und Commerce One. SAP, SAP Logo, R/2, R/3, mysap, mysap.com und weitere im Text erwähnte SAP-Produkte und -Dienst-leistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Ländern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen. SAP AG 2002, Title of Presentation, Speaker Name 22
Corporate Colors for PPT SAP Blue SAP Gold SAP Gray You can use these colors with gradations SAP AG 2002, Title of Presentation, Speaker Name 23