Oracle DBAs Deploying Highly Available SQL Server Systems

Slides:



Advertisements
Similar presentations
SQL Server Disaster Recovery Chris Shaw Sr. SQL Server DBA, Xtivia Inc.
Advertisements

Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
1EMC CONFIDENTIAL—INTERNAL USE ONLY Overview of SQL Server 2012 High Availability and Disaster Recovery (HADR) Wei Fan Technical Partner Management – Microsoft.
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
High Availability David Frommer Principal Architect Business Intelligence Microsoft Partner of the Year 2005 & 2007.
SQL Server Replication
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
June 23rd, 2009Inflectra Proprietary InformationPage: 1 SpiraTest/Plan/Team Deployment Considerations How to deploy for high-availability and strategies.
1 © Copyright 2010 EMC Corporation. All rights reserved. EMC RecoverPoint/Cluster Enabler for Microsoft Failover Cluster.
SQL Server Data Protection and High Availability Anil Desai.
Keith Burns Microsoft UK Mission Critical Database.
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
1© Copyright 2011 EMC Corporation. All rights reserved. EMC RECOVERPOINT/ CLUSTER ENABLER FOR MICROSOFT FAILOVER CLUSTER.
Meeting the Availability Challenge Don Vilen Program Manager SQL Server Microsoft Corporation.
SQL Server High Availability
High Availability options Explored with SQL Server
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
National Manager Database Services
11 SERVER CLUSTERING Chapter 6. Chapter 6: SERVER CLUSTERING2 OVERVIEW  List the types of server clusters.  Determine which type of cluster to use for.
1 Data Guard Basics Julian Dyke Independent Consultant Web Version - February 2008 juliandyke.com © 2008 Julian Dyke.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Implementing Database Snapshot & Database Mirroring in SQL Server 2005 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft.
High-Availability Methods Lesson 25. Skills Matrix.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Module 12: Designing High Availability in Windows Server ® 2008.
It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in It is a High Availability as well as Disaster recovery.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
11g(R1/R2) Data guard Enhancements Suresh Gandhi
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
Rajib Kundu Agenda Definitions Failover Cluster Database Snapshots Log shipping Database Mirroring.
1 Data Guard. 2 Data Guard Reasons for Deployment  Site Failures  Power failure  Air conditioning failure  Flooding  Fire  Storm damage  Hurricane.
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
Overview of high availability in Microsoft SQL Server Szymon Wójcik.
Module 13 Implementing Business Continuity. Module Overview Protecting and Recovering Content Working with Backup and Restore for Disaster Recovery Implementing.
11 CLUSTERING AND AVAILABILITY Chapter 11. Chapter 11: CLUSTERING AND AVAILABILITY2 OVERVIEW  Describe the clustering capabilities of Microsoft Windows.
Building Highly Available Systems with SQL Server™ 2005 Keith Burns Data Architect Microsoft Ltd.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
High Availability in DB2 Nishant Sinha
Ashish Prabhu Douglas Utzig High Availability Systems Group Server Technologies Oracle Corporation.
Enhancing Scalability and Availability of the Microsoft Application Platform Damir Bersinic Ruth Morton IT Pro Advisor Microsoft Canada
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Your Data Any Place, Any Time Always On Technologies.
1 Chapter Overview Using Standby Servers Using Failover Clustering.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
What HADR Option(s) Are Right For You?. Where’s The AlwaysOn?
SQL Server High Availability Introduction to SQL Server high availability solutions.
William Durkin A Gourmet Menu of SQL Server High Availability Options.
AlwaysOn In SQL Server 2012 Fadi Abdulwahab – SharePoint Administrator - 4/2013
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
Backups for Azure SQL Databases and SQL Server instances running on Azure Virtual Machines Session on backup to Azure feature (manual and managed) in SQL.
Sponsors.
ALWAYSON AVAILABILITY GROUPS
Navigating the options for Data Redundancy
Disaster Recovery Where to Begin
AlwaysOn Mirroring, Clustering
Maximum Availability Architecture Enterprise Technology Centre.
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
SQL Server High Availability Amit Vaid.
Your Data Any Place, Any Time
SpiraTest/Plan/Team Deployment Considerations
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Designing a Highly Available SQL Server Infrastructure
Designing Database Solutions for SQL Server
Presentation transcript:

Oracle DBAs Deploying Highly Available SQL Server Systems Joe Yong Chief Architect Scalability Experts Inc. jyong@scalabilityexperts.com

About This Session Goals Non-goals Pre-requisites Overview of SQL Server 2005 High Availability features Drilldown on HA implementation strategies Non-goals Deep dive into SQL Server Chest thumping Make you a HA expert Pre-requisites Experience as an Oracle DBA, Architect or Developer DBA Basic experience in designing, deployment and managing database systems that require medium to high levels of availability

Agenda What is High Availability SQL Server 2005 HA overview Solutions to common scenarios Case study Summary

What is High Availability Uninterrupted usability A running server is not necessarily available Is a factor of technology, people and processes Often measured as a percentage in “uptime” over 1 year Eg. 99.999% uptime = 5.25 minutes downtime a year Should includes both planned and unplanned downtime but many only measure unplanned You may not own every part of the equation but if you have to specify your SLA Example Online ordering system requires orders to be confirmed in 30 seconds Availability is impacted by application scalability, network and database Don’t forget security impact on HA

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Microsoft Failover Clustering Overview * Inst1 Microsoft Failover Clustering Overview Hot Standby – Automatic failover Protects against local, limited disasters Built on Microsoft Server Clusters (MSCS) Multiple nodes provide availability, transparent to client Supports 2, 4, or 8 nodes depending on OS edition Automatic detection and failover Requires cluster certified hardware; see Windows Catalog: Clustered Supports many scenarios: Multiple Active Instances, N+1, N+I Up to 25 SQL Server instances per cluster NOT a load balancing solution Multiple Active Instances N+1: N Active, 1 Inactive Instances Inst2 * * Inst1 N+I: N Active, I Inactive Instances * Inst1 Inst3 * Inst2 *

Microsoft Failover Clustering Detail

Geographically Dispersed Clusters Same functionality and behavior as “standard” failover cluster Protects against local, total and extended disasters Requires specially certified cluster hardware from qualified vendors Requires guaranteed 500ms maximum round trip latency between nodes SQL Server does not differentiate between standard and geo-cluster Mirror Network N1 N4 N3 N2 D3 D1 Storage Controller S1 D2 D4 Storage Controller S2 Site 1 Site 2

High Availability Toolbox Disaster Recovery Features Failover Clustering Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover Failure detection Automatic switchover Specialized hardware Secondary workload on standby (reporting)  Meta data support Performance impact None Protect against storage failure Locations

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Database Mirroring Overview Hot Standby Provides a fault-tolerant database Building block for complex topologies Database Failover Very fast failover Less than five seconds in most cases Zero data loss Automatic or manual failover Automatic re-sync after failover Automatic, transparent client redirect Works with standard certified servers, storage and networks No location limitations No shared components; two separate copies of data

Database Mirroring How does it work? 4/25/2017 6:08 PM Database Mirroring How does it work? Mirror is always redoing – it remains current Application Witness (optional) Commit 1 5 Principal Mirror 2 SQL Server SQL Server 4 2 >2 3 >3 Log Data Log Data

Database Mirroring Witness Only required for automatic failover; Just another instance of SQL Server 2005 Can serve multiple sessions Prevents “split brain” scenario If partners do not see each other, is it due to network failure or server failure? To become Principal automatically, a server must talk to at least one other server Witness ONLY answers the question “Who do you see?”, does not promote a server to be Principal

Database Mirroring High Availability mode Safety Full; synchronous operation Commit when logged on Mirror Allows automatic failover No data loss Database available whenever quorum exists Formed by any two servers from the three; Principal, Mirror, Witness Witness is present – automatic Failover

Database Mirroring Transparent Client Redirect SQLConnection object that targets a mirrored database No application code change required Client automatically redirected if session is dropped Client library is aware of Principal and Mirror servers Upon initial connect to Principal, library caches Mirror name When client attempts to reconnect If Principal is available, connects If not, client library automatically redirects connection to Mirror If Principal is down upon first connect attempt, connection fails Workaround via explicit coding or NLB type solution Supports .NET and SNAC providers

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover Failure detection Automatic switchover Specialized hardware  Secondary workload on standby (reporting) With DB snapshot Meta data support User DB only Performance impact None Minimal ~ low Protect against storage failure Locations Unrestricted

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Database Mirroring High Protection mode Safety Full; synchronous operation Commit when logged on Mirror No automatic failover; manual failover only Database quorum formed by Principal and Mirror If Principal loses quorum, it stops servicing the database Ensures high protection; database is never in ‘exposed’ state No Witness present – no automatic failover

Database Mirroring High Performance mode Safety Off; asynchronous operation Commit when logged on Principal No automatic failover; manual failover only Possible data loss If Mirror becomes unavailable; Principal continues working If Principal becomes unavailable; Mirror can assume workload Manual failover to Mirror is required No Witness present; no automatic failover

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Database Mirroring – H P/P mode Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover Failure detection Automatic switchover  Specialized hardware Secondary workload on standby (reporting) With DB snapshot Meta data support User DB only Performance impact None Minimal ~ low Minimal Protect against storage failure Locations Unrestricted

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Transactional Replication Requires consideration at design time; cannot just “flip the switch” High performance – latency measured in seconds Some (minimal) load on the server Can be implemented at database or table level Failover possible; custom designed solution Two types Standard transactional replication Easy to design, setup & manage Subscriber (standby) can be used for reporting Peer-to-peer transactional replication Multi-master model; schema is identical on all sites Supports distributed applications with data partitioning; enables load balancing Does not handle conflicts; design to avoid/prevent conflicts

Peer-To-Peer Transactional Replication How does it work? 4/25/2017 6:08 PM Peer-To-Peer Transactional Replication How does it work? “West” “East” Distribution Agent Dist DB Logreader Distribution Agent Dist DB Logreader “South” Distribution Agent Dist DB Logreader

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Database Mirroring – H P/P mode Transactional Replication Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover  Failure detection  Can automate in application Automatic switchover Specialized hardware Secondary workload on standby (reporting) With DB snapshot Meta data support User DB only Some Performance impact None Minimal ~ low Minimal Low Protect against storage failure Locations Unrestricted

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Log Shipping Backup transaction log, copy to secondary server, restore transaction log backup Failover is manual Meta data management may be necessary Read operations on secondary is permitted Users are disconnected when log restore occurs Can maintain multiple secondary servers Optional Monitor server Records history and status of backup/restore jobs May be setup to raise alerts when jobs fail

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Database Mirroring – H P/P mode Transactional Replication Log Shipping Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover  Failure detection  Can automate in application Automatic switchover Specialized hardware Secondary workload on standby (reporting) With DB snapshot  With limitations Meta data support User DB only Some Performance impact None Minimal ~ low Minimal Low Protect against storage failure Locations Unrestricted

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Backup and Restore Slowest recovery (but also simplest) Recommended as secondary or tertiary protection layer Manual failure detection and switchover Data loss possible Recommend maintaining active backups on disk; duplicate, archive and offsite backups on tape Various levels Database – full, differential, partial, differential partial, copy-only File & filegroups – “full”, differential Transaction log

Backup and Restore RESTORE VERIFY ONLY Backup media mirroring Backup and database page checksums Fine grained online repair Online restore Piecemeal restore Page-level restore Database backup does not block Log backup Backup/restore includes FullText data Copy-only – via T-SQL only

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Database Mirroring – H P/P mode Transactional Replication Log Shipping Backup / Restore Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover  Failure detection  Can automate in application Automatic switchover Specialized hardware Secondary workload on standby (reporting) With DB snapshot  With limitations Meta data support User DB only Some Performance impact None Minimal ~ low Minimal Low Protect against storage failure Locations Unrestricted

Agenda What is High Availability SQL Server 2005 HA technologies Hot Standby Failover Clustering Database Mirroring – High Availability mode Warm Standby Database Mirroring – High Protection / Performance mode Replication Log Shipping Database Snapshot Cold Standby Backup/restore Online operations Solutions to common scenarios Case study Summary

Online Operations Backup/restore Indexing Memory allocations Full online backup Online piecemeal restore; undamaged data remains available Indexing Allows create, drop and alter while users continue to access data LOB datatype indexes not supported for online Memory allocations CPU affinity settings Database snapshots

Database Snapshot Not originally designed as a specific HA solution but works great in some situations Turning a Database Mirroring mirror into a reporting server Isolated historical data for report generation Protection in case of administrative, developer or user error; classic “Oops!” scenario Uses copy-on-write technique to reduce disk space consumption

Database Snapshot How does it work? 4/25/2017 6:08 PM Database Snapshot How does it work? CREATE DATABASE mydbSnap AS SNAPSHOT OF mydb USE mydb UPDATE (pages 4, 9, 10) mydb – Database Page 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 3 4 4 5 6 7 8 9 9 10 10 11 12 13 14 15 16 mydbSnap – Read-Only Database Snapshot USE mydbSnap SELECT (pages 4, 6, 9, 10, 14)

Agenda What is High Availability SQL Server 2005 HA technologies Solutions to common scenarios Case study Summary

Rolling Upgrades In three steps 4/25/2017 6:08 PM Rolling Upgrades In three steps Perform upgrades on the mirror, secondary, or subscriber Switch roles Database Mirroring Failover to the mirror Log Shipping Replication Redirect clients to subscriber Perform upgrades on the original database server Optional: Switch roles again Backup principal log with no-recovery Recover secondary Re-direct clients to secondary

Site Disaster Protection 4/25/2017 6:08 PM Site Disaster Protection Example Scenarios Earthquake, fire, or flood causes datacenter outage Solutions Database Mirroring to a secondary site Optimized solution - Allows very fast failover times to the secondary site Optionally add log shipping for additional site protection Log Shipping to one or more secondary sites Basic solution – requires additional effort for failover Third-party geo-clustering solutions for data center storage level redundancy Find SQL Server Always On reviewed solutions at the Microsoft Always On website: www.microsoft.com/SQL/AlwaysOn

Database Mirroring Configuration In three steps 4/25/2017 6:08 PM Database Mirroring Configuration In three steps Step 1: Restore database copy to mirror site with no-recovery option Step 2: Configure communication endpoints Step 3: Set the data protection level and Start Mirroring

Database Query Workload Scale Out With Redundancy 4/25/2017 6:08 PM Database Query Workload Scale Out With Redundancy Scenario Need for near real time reporting on a second server that can also be used for disaster recovery Need for a tier of identical databases for scaling out application queries with ability to use any one of the database copies for disaster recovery Solutions Transactional Replication Peer-to-Peer Replication

Putting It All Together 4/25/2017 6:08 PM Putting It All Together Failover Clustering Local server redundancy Full server/instance protection Database Mirroring Primary disaster site for databases Reporting with Snapshot Log Shipping Additional disaster sites for databases Logical recovery (with delay) Replication Database reporting and read scale out with redundancy Database Scale Out For Queries Replication Hot Standby Database Mirroring Production Database Failover Clustering Log Shipping Warm Standby Log Shipping With Restore Delay Logical Recovery Standby

Agenda What is High Availability SQL Server 2005 HA technologies Solutions to common scenarios Summary

Summary <<WiP>>

Resources www.microsoft.com/sql/ msdn.microsoft.com/sqlserver/ www.microsoft.com/technet/ www.scalabilityexperts.com www.sqldev.net www.sqlservercentral.com/

High Availability Toolbox Disaster Recovery Features Failover Clustering Database Mirroring – HA mode Database Mirroring – H P/P mode Transactional Replication Log Shipping Backup / Restore Local limited disasters  Local disasters With geo-clusters Extended disasters Limited Rapid failover  Failure detection  Can automate in application Automatic switchover Specialized hardware Secondary workload on standby (reporting) With DB snapshot  With limitations Meta data support User DB only Some Performance impact None Minimal ~ low Minimal Low Protect against storage failure Locations Unrestricted