microsoft sql server ha and dr with datrium dvx · clustering with microsoft sql server clustering,...

11
Microsoſt SQL Server HA and DR with Datrium DVX WHITEPAPER

Upload: others

Post on 10-Jul-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

Microsoft SQL Server HA and DR with Datrium DVX

WHITEPAPER

Page 2: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

2© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Contents

Introduction 3

Microsoft SQL Server HA and DR Solutions 3

Database Mirroring 4Peer-to-Peer Replication 4Transaction Log Shipping 4Clustering 4Availabilty Groups 4DB Backups 4

Microsoft SQL Server HA and DR with DVX 5Application-Consistent Snapshots with DVX VSS Provider 6Single Site Microsoft SQL Server HA and DR 6Multi-Site Microsoft SQL Server HA and DR 8SQL Server VM Restore 9SQL Server Virtual Disk Restore 9SQL Server VM Clone 10SQL Server Virtual Disk Clone 10

Recovery Site Options 11

Conclusion 11

Page 3: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

3© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Microsoft SQL Server HA and DR SolutionsMicrosoft SQL Server is one of the most popular database management systems. It's a relational database that's designed for scale-out transaction processing and data warehousing. With support for both Windows and Linux guest deployments, Microsoft SQL Server is a perfect application for virtualization on VMware.

Natively, Microsoft SQL Server has built-in high availability (HA) and disaster recovery (DR) solutions. These HA and DR solutions include:

• Database mirroring

• Peer-to-peer replication

• Transaction log shipping

• Clustering (Failover Clustered Instance is not supported with DVX)

• Availability Groups

• SQL DB Backups

Virtualized Microsoft SQL Servers can also leverage third-party data protection solutions for backup and restore operations. DVX is built with virtualized applications in mind, including SQL Server. The key benefits of these solutions are listed below. We're also including things you should consider when configuring your SQL Server and our recommendations for how to optimize your deployment with DVX.

Figure 1 – DVX – basic DHCI (Host and Data) architecture

IntroductionDatrium introduced the next wave of technical innovation for virtual machine (VM) infrastructure with the release of Automatrix. Datrium DVX, the market leading DHCI solution, is part of the Automatrix platform, and it allows you to start small and scale-out as your business needs grow. You get performance scalability by adding more virtualization hosts to your configuration. Running DVX software and leveraging local flash storage leads to lower latencies and better application performance. You can use your existing servers configured with flash SSDs to simplify the deployment, management, and scaling of VM infrastructure. You can also add new servers, either preconfigured DVX Hosts or any third-party servers with appropriate flash SSDs. Figure 1 shows the basic DHCI (Host and Data) architecture of DVX, which can scale up to 128 Hosts for maximum scalability.

With DVX, application data resides on the server – close to the running applications. This approach provides the following benefits:

• Fast – Virtualized application reads are host-local. Reads are served from flash for improved performance and lower latencies.

• Flexible – With broader server choices, you can leverage your existing server resources or buy new servers for compute and performance.

• Efficient – Lower your TCO. Use server-based flash with DVX and leverage the built-in global deduplication for storage efficiency.

• Predictable – No more guesswork for compute and storage requirements. DVX’s built-in VM-level awareness lets you monitor more predictable resource utilization with VM-level analytics.

• Simple – Easy to set up, manage, and monitor. Configuring DVX with your hypervisor is intuitive and wizard-based. You can manage DVX natively from vCenter.

• Safe - Critical business data is protected on resilient storage, efficiently replicated offsite, and recovered instantly from human error, disasters, and ransomware.

Read our whitepaper to get a deep dive into the DVX architecture.

Page 4: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

4© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Database MirroringDatabase mirroring increases your SQL Server database availability. The solution is granular, as mirroring is on a per-database basis. It improves data protection by providing redundancy of your data. However, your SQL Server database must be using Full Recovery Model. It's in your best interest to consider other solutions because SQL Server database mirroring will be removed in a future version of Microsoft SQL Server.

Peer-to-Peer ReplicationWith peer-to-peer replication, copies of data are maintained across multiple server instances. Read performance can be improved because you can spread out your read SQL queries across SQL Server nodes. Microsoft recommends that write operations for each row be performed at only one node because data corruption could result from undetected conflicts. You should also enable conflict detection to help avoid data corruption issues. Additionally, all participating databases must have identical schema and data.

Transaction Log ShippingWith SQL Server transaction log shipping, you can send a copy of the transaction log backups from the primary server instance to one or more secondary databases – on separate secondary server instances. However, transaction log shipping could result in corrupted data restored to your secondary servers. To prevent data corruption on your secondary databases, Microsoft recommends using user-specified delay for transaction log shipping, so you can retrieve unchanged data from your secondary database and restore to your primary server instance.

ClusteringWith Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server Failover Clustering (WSFC) to ensure HA and provide for DR to SQL Server instance failures. SQL Server FCI protects your SQL Server databases against OS failures, but it requires shared disks. SQL Server Failover Cluster Instances require access to block-based storage devices. Due to this requirement, SQL Server FCIs are not supported in DVX. We recommend you use Microsoft SQL Server Availability Groups with DVX.

Availability GroupsMicrosoft SQL Server Availability Groups are the current way to get high availability as well as increased performance and flexibility in your databases. You can have up to eight secondary replicas (introduced in SQL Server 2012 (11.x)). Additionally, the SQL Server DB administrators can leverage a SQL Server Availability Group Listener for read-only routing.

This feature allows you to leverage your secondary replicas for read I/O to increase the performance of your SQL queries. That's an added benefit over some other HA and DR solutions because your read replicas don't have to sit idle waiting for a DR event before they're useful.

SQL Server Availability Groups also allow you to group your databases for protection with availability databases. An additional benefit of Availability Groups includes dynamic failover. Databases in an availability group will dynamically fail over to a secondary replica if the primary becomes unavailable. Review our Microsoft SQL Solution Brief for additional benefits of Microsoft SQL Server Always-On Availability Groups (AOAGs) with DVX.

DB BackupsAs an SQL Server database administrator, you can choose to use Microsoft SQL Server native backup or third-party data protection solutions. DVX can coexist with third-party data protection solutions such as Veeam, Rubrik, etc. It doesn't matter which backup solution you choose; an SQL Server backup ensures that your data is protected locally, offsite, and on multiple media, as needed. As a Microsoft SQL Server database administrator, you should consider using Microsoft SQL Server native backup to automate and schedule your backups. That gives you a solution – at the database level – to protect your data, your way.

For Microsoft SQL Server HA and DR, you could consider and implement each of the available solutions we've discussed. However, as you scale your private cloud, SQL Server HA and DR can become complex to manage with multiple SQL Server instances and TBs of data (see figure 2).

Page 5: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

5© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Figure 2 – SQL Server Native HA and DR Solutions

Microsoft SQL Server HA and DR with DVXAs part of the Automatrix platform, you get built-in Snapshot, Clone, and Elastic Replication functionality for backup and DR. DVX Snapshots are space-efficient, and there's no impact to your live VMs and virtualized applications. With Automatrix, backups and restores can be at the VM, virtual disk, and even at the datastore file level. Figure 3 shows the foundation of Automatrix data protection.

Protection Groups (PGs)• Arbitrary sets of VMs - App

• Policies tailored to App: Timing, Retention, Repl Sites

• Consistency

Snapshots• P-I-T Copies of PG

Fingerprints

• Held in DVX Snapstore

• RoW: no impact on live VMs

Snapstore• VM Backup Catalog

• Non-mountable DVX namespace

• At Repl Source/Destination

Clones• New Datastore Copy of PG

• From Datastore or Snapstore

• VAAI offloads to Clone of DVX Datastore VM

Figure 3 – Automatrix data protection

With DVX, managing and scaling your virtualized Microsoft SQL Servers is simplified. Storage management tasks around LUNs or RAIDs and special configuration or tuning are eliminated, and the focus is shifted to managing virtual disks within your virtualization environment. We'll discuss how to simplify HA and DR workflows for SQL Server with DVX and show you how to leverage Automatrix with SQL Server Availability Groups for HA and DR.

When you enable Blanket Encryption, your data will also be encrypted in-use, in-flight, and at-rest. With Blanket Encryption, your data is protected end-to-end.

For Microsoft SQL Servers deployed with AOAGs, each DVX Host server with your Availability Replicas keeps the same deduplicated and compressed data in its local flash – through your typical SQL Server Always-On activities. If your primary SQL server fails or goes into maintenance mode on a DVX Host, your SQL server secondary replica – on another DVX Host – will pick up immediately to take over your

Page 6: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

6© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

SQL services and provide the same level of performance and efficiency. That's because DVX is built on a foundation of ensuring your virtualized applications are highly available, and all reads are from the local flash of your DVX Hosts. Review our Microsoft Solution Brief for additional information on DVX’s key benefits for virtualized applications such as Microsoft SQL Server.

An additional benefit of SQL Server with Automatrix is Elastic Replication, which you can leverage to achieve high availability and improve business continuity across multiple sites and to the cloud with VMware Cloud on AWS. Learn more about Automatrix Elastic Replication.

Application-Consistent Snapshots with DVX VSS ProviderAutomatrix supports application-consistent snapshots using DVX VSS provider. There's no VM stun for application-consistent snapshots, and any impact to the application is constrained to under 10 seconds when DVX VSS is used. Application-consistent snapshots using DVX VSS provider requires that you install DVX VSS Agent on the virtualized application guest VM.

Also, the virtualized application guest VM must be powered on for application-aware processing. You can review the DVX VSS provider usage guide and updates by logging in to the Support portal and reviewing the DVX Command Line Interface doc.

DVX VSS Provider for application-consistent snapshots enables IT administrators to roll back a virtualized application server to the latest application-consistent image in a DR scenario. We recommend you use Microsoft SQL Server native backups or third-party data protection solutions with DVX VSS provider for point-in-time granular application recovery.

Single Site Microsoft SQL Server HA and DRCombining a couple of native SQL Server methods with DVX capabilities, you get a robust yet straightforward HA and DR solution.

With Availability Groups, you can create multiple secondary replicas to ensure that your production databases are highly available. You don't have to mix and match different HA and DR solutions for every SQL Server instance and database within your virtualized data center. Figure 4 shows Microsoft SQL Server HA and DR with DVX.

Figure 4 – Virtualized Microsoft SQL Server HA and DR with DVX

You can use SQL Server native backups to an SMB share on a Windows VM for onsite data protection of your SQL Servers. Every VM and virtualized application on DVX leverages DVXs’ built-in global deduplication and compression for space efficiency. Figure 5 shows a successful SQL Server database backup to an SMB share on a Windows VM resident in a DVX.

Page 7: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

7© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Figure 5 – SQL Server backup to an SMB share on a Windows VM in DVX

When you use SQL Server native backups to SMB shares on a Windows VM, you will get space-efficient and consistent point-in-time backups.

Combining live SQL Server instances and their associated native backups into Protection Group policy-driven snapshots that can be cloned – in minutes – for Dev/Test and DR in your primary data center can extend the benefits of traditional HA and DR administrative tasks. Figure 6 shows the data protection workflow for virtualized SQL Servers with DVX.

Figure 6 – Data Protection workflow for virtualized SQL Servers with DVX

DVX can coexist with other third-party data protection solutions such as Veeam, Rubrik, Cohesity, etc. If you currently have third-party data protection solutions as part of your existing infrastructure, you can continue to leverage your existing solution and add Automatrix for additional protection. The choice is yours to protect your data the way it should be protected and not based on a cookie-cutter process.

Page 8: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

8© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Multi-Site Microsoft SQL Server HA and DRFor environments with multiple sites running DVX, your Microsoft SQL Server Availability Groups and your SQL Server native backups can be protected offsite with Automatrix Elastic Replication. Figure 7 shows an example of using DVX bi-directional replication to protect your Microsoft SQL Server AOAGs between two data centers. We recommend balancing your SQL Server nodes across DVX Hosts to ensure your SQL Server Availability Group is highly available at the application layer even if a DVX Host becomes unavailable, such as during ESXi host maintenance.

Private Cloud Site A

Automatrix Protection Group

SQL ServerAvailability Group 1

SQL Server APrimary

VM

SQL Server BSecondary

VM

Windows VMSMB Share

\\VM1\SQLBackup.bak

Private Cloud Site B

Automatrix Protection Group

SQL ServerAvailability Group 2

SQL Server APrimary

VM

SQL Server BSecondary

VM

Windows VMSMB Share

\\VM1\SQLBackup.bak

AUTOMATRIXELASTIC REPLICATION

Figure 7 – SQL Server Always-On Availability Groups with DVX

Regardless of the site topology, Microsoft SQL Server recovery with DVX is straightforward and intuitive. With DVX, you have the following options:

1. Restore your original VM or just virtual disk(s) to your original VM

2. Clone your original VM or only virtual disk(s) from your original VM

Figure 8 – Microsoft SQL Server Recovery Workflows with DVX

Page 9: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

9© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

SQL Server VM Restore If your SQL Server VM is corrupted at the OS level, power off the original VM and perform a "Restore VM from snapshot" on DVX (see figure 9). The VM will be restored within minutes. Power on your SQL Server VM after the restore is successful.

Figure 9 – Restore VM from Snapshot on DVX

To add the SQL Server VM to Availability Replicas, you can use the Join only option. Validate that your databases in the Availability Groups are synchronized.

SQL Server Virtual Disk RestoreIf you decide to restore at the database level, we recommend you power off your SQL Server VM. Select the virtual disks and perform a "Restore file from snapshot." Figure 10 shows a "Restore file from snapshot" operation that will restore a virtual disk that contains the MDF file.

Figure 10 – Restore file from snapshot on DVX

You must restore the virtual disks that contain the MDF file and the LDF file of the corresponding database before you power on your SQL Server VM. If the databases are part of your SQL Server Availability Groups, validate that your databases are synchronized.

Page 10: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

10© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

SQL Server VM CloneDVX also allows you to clone an entire VM in minutes (see figure 11). The SQL Server DB administrator can clone an SQL Server VM at the primary or DR site for use cases such as Dev/Test, DR testing, and compliance. DVX allows you to create a single gold image that can be sanitized and deployed to your Dev/Test engineers within minutes and across multiple sites using Automatrix Elastic Replication.

Figure 11 – Clone VM from snapshot on DVX

When the SQL Server VM is successfully cloned, you must add the VM to your hypervisor inventory. Power on your VM to bring your SQL Server online. We also recommend restoring your databases from the latest SQL Server DB backups.

SQL Server Virtual Disk CloneAnother useful feature of DVX is "Clone file from snapshot." This feature is very useful with SQL Server AOAGs. You can clone and replicate at the VM virtual disk level. That means you have better granular control for Dev/Test and DR testing. Using "Clone file from snapshot", you don't have to power off your SQL server VM. You can easily SCSI HotAdd SQL Server databases to any virtual SQL Server in your data center within minutes – regardless of the size of the database. Figure 12 shows an example of "Clone file from snapshot" on DVX.

Figure 12 – Clone file from snapshot on DVX

For "Clone file from snapshot" operations with SQL Server databases, we recommend you restore your databases from the latest SQL Server DB backups.

Page 11: Microsoft SQL Server HA and DR with Datrium DVX · Clustering With Microsoft SQL Server clustering, you can leverage SQL Server Failover Cluster Instances (FCI) with Windows Server

11© 2019 Datrium, Inc. All rights reserved Datrium | 385 Moffett Park Dr. Sunnyvale, CA 94089 | 844-478-8349 | www.Datrium.com

MICROSOFT SQL SERVER HA AND DR WITH DATRIUM DVXWHITEPAPER

Recovery Site OptionsWith Automatrix capabilities, HA/DR actions can be achieved at the primary DVX site, alternate DVX sites, or even in the cloud with VMware Cloud on AWS. Building from DVX Protection Groups, Microsoft SQL Server VMs can be protected and efficiently replicated to alternate sites. With ControlShift DR plans, the process of failing over applications to the right site, on the right resources, with the desired recovery points becomes more easily automated and failproof with the one-click, instant RTO SaaS capabilities of ControlShift.

Using Datrium DRaaS with VMware Cloud on AWS, customers can even fail over on-premises virtualized SQL applications to the cloud and run in a native VMware configuration maintaining operational consistency during critical recovery situations. If customers choose to use VMware Cloud on AWS resources on demand, they can reduce DR costs up to 10x and leverage S3 for cost-effective forever-incremental native backups.

ConclusionDVX is VM-aware. That means you're managing your resources at the VM level rather than at the storage level. This approach provides you with granularity to snap, clone, and replicate at the VM and file level with Automatrix. Using SQL Server Availability Groups and DVX, your SLAs for HA and DR are in minutes rather than days or hours.