Microsoft SQL Server HA and DR with Datrium DVX Whitepaper


With Open Convergence, Datrium introduces the next wave of technical innovation for virtual machine storage – Datrium DVX. A Datrium DVX allows you to start small and scale out. Use your existing x86 servers with any commodity flash SSDs to simplify the deployment, management, and scaling of virtual machine storage. Add new preconfigured Datrium Compute Nodes or your choice of third party x86 servers with commodity flash SSDs into your virtualized infrastructure as you grow and create your own private cloud. Figure 1 shows the basic dual node (Compute and Data) architecture of Datrium DVX solution which can scale up to 32 hosts for scale out.


Figure 1 – Datrium DVX


Datrium believes that application data should be stored in 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.
  • Flexible – With Datrium DVX, the server choice is yours. You can leverage your existing x86 server resources or buy new x86 servers for compute and performance.
  • Efficient – Lower your TCO. Use commodity flash with Datrium DVX and leverage the solution’s built-in global deduplication for storage efficiency.
  • Predictable – No more guess work for compute and storage requirements. Datrium’s built-in VM level awareness means you get predictable resource utilization with VM level analytics.
  • Simple – It is easy to setup, manage and monitor. Configuration of a Datrium DVX with your hypervisor is intuitive and wizard based. You can manage your Datrium DVX, natively, from the vSphere web client.

For a deep dive into the Datrium DVX Architecture, we recommend reviewing our Datrium Technical Report


Microsoft SQL Server HA and DR

Microsoft SQL Server is ranked third in the DB-Engines Ranking of the most popular database management systems. It is a relational database that is designed for scale out transaction processing and data warehousing. As a matter of fact, Microsoft has put its corporate resources into SQL Server, open source, and cloud development by announcing support for SQL Server on Linux.

Natively, Microsoft SQL Server has built-in HA and DR solutions. These HA and DR solutions are (not in any order of importance):

  • Database mirroring
  • Peer-to-peer replication
  • Transaction log shipping
  • Clustering (Failover Clustered Instance is not supported with Datrium DVX)
  • Availability Groups
  • SQL DB Backups

Virtualized Microsoft SQL Servers could also leverage third-party data protection solutions for backups and restore operations. However, not all solutions are created equal. Datrium DVX is built with virtualized applications such as SQL Server in mind. We will review and consider some of the benefits of these solutions and seek to optimize our Microsoft SQL Server HA and DR with Datrium DVX. 

Database Mirroring Considerations

Database mirroring increases your SQL Server database availability. The solution is granular, as mirroring is on a per-database basis. It increases data protection as it provides redundancy of your data. However, your SQL Server database must be using full recovery model. It is 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 Replication Considerations

With 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 Shipping Considerations

With 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 that you can retrieve unchanged data from your secondary database and restore to your primary server instance.

Clustering Considerations

With 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 requires access to block based storage devices. Due to this requirement, SQL Server FCI are not supported with Datrium DVX. It is recommended to use Microsoft SQL Server Availability Groups with Datrium DVX.

Availability Groups Considerations

Microsoft SQL Server Availability Groups are the newest way to provide high availability as well as increased performance and flexibility of your databases. You can have up to eight secondary replicas (SQL Server 2014 and SQL Server 2016). 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 IO to increase performance for your SQL queries. This is an added benefit over some of the other HA and DR solutions because your read replicas do not have to sit idle waiting for DR to be useful.

SQL Server Availability Groups also allows 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 failover 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 with Datrium DVX.

DB Backups Considerations

As a SQL Server database administrator, you can choose to use Microsoft SQL Server native backup or third-party data protection solutions. Datrium DVX supports third-party data protection solutions such as Veeam, Rubrik, etc. It does not matter which backup solution you choose; a SQL Server backup ensures that your data is protected locally, off-site 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. This provides 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 have discussed. However, as you scale and move into 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).


Figure 2 – SQL Server Native HA and DR Solutions



Microsoft SQL Server HA and DR with Datrium DVX

Datrium Data Cloud Foundation is built-in with every Datrium DVX. This means you can use our built-in snapshot, clone and elastic replication for backup and DR. Datrium DVX snapshots are space-efficient and there is no impact to your live virtual machines and virtualized applications. With Datrium Data Cloud, backups and restores can be at the VM, virtual disk and even at the datastore file level. Figure 3 shows the foundation of Datrium Data Cloud.


Figure 3 – Datrium Data Cloud Foundation


With Datrium DVX, managing and scaling your virtualized Microsoft SQL Servers is simplified. Storage management tasks around LUNs or RAID and special configuration or tuning are eliminated and the focus is shifted to managing virtual disks within your virtualization environment. In the following sections, we will discuss how to simplify HA and DR workflows for SQL Server with Datrium DVX and see how you can leverage Datrium Data Cloud with SQL Server Availability Groups for HA and DR.

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

For Microsoft SQL Servers deployed with Always On Availability Groups, each Datrium host server with your Availability Replicas will keep 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 Datrium host, your SQL server secondary replica – on another Datrium host – will pick up immediately to take over your SQL services and provide the same level of performance and efficiency. This is because Datrium DVX is built on a foundation of ensuring your virtualized applications are highly available and all reads will be from the local flash of your Datrium hosts. Review our Microsoft Solution Brief for additional information on Datrium’s key benefits for virtualized applications such as Microsoft SQL Server.

An additional benefit of SQL Server with Datrium DVX is elastic replication. You can leverage Datrium elastic replication to achieve high availability and improve business continuity. Learn more about Datrium elastic replication here.


Application Consistent Snapshots with Datrium VSS Provider

Datrium DVX 3.0 and later supports application consistent snapshots using Datrium VSS provider. There is no VM stun for application consistent snapshots and any impact to the application is contained to under 10 seconds when Datrium VSS is used. Application consistent snapshots using Datrium VSS provider requires the installation of Datrium’s VSS Agent on the virtualized application server.

Additionally, the virtualized application server must be powered on for application aware processing. It is recommended to review Datrium’s latest product documents for Datrium VSS provider usage and updates.

Datrium VSS Provider for application consistent snapshots will allow IT administrators to rollback a virtualized application server to the latest application consistent image in a DR scenario. It is Datrium’s recommendation to use Microsoft SQL Server native backups or third party data protection solutions with Datrium VSS Provider for point-in-time granular application recovery.  


Single Site Microsoft SQL Server HA and DR

Combining a couple of native SQL Server methods along with Datrium capabilities you can get a robust yet simple HA and DR solution.
With Availability Groups, you can create multiple secondary replicas to ensure that your production databases are highly available. You do not have to mix and match different HA and DR solutions for every SQL server instances and databases within your virtualized data center. Figure 4 shows Microsoft SQL Server HA and DR with Datrium DVX.

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


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

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


When you use SQL Server native backups to SMB shares on a Windows virtual machine, you will get space-efficient and consistent PIT backups in Datrium Data Cloud.

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 you can extend the benefits of traditional HA and DR administrative tasks.
Figure 6 shows the data protection workflow for virtualized SQL Servers with Datrium DVX. For more information about Datrium Protection Groups, click here.

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

Datrium DVX also works 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 Datrium Data Cloud for additional protection. The choice is yours – to protect your data the way it should be protected and not base on any cookie cutter process.

Multi-Site Microsoft SQL Server HA and DR

For environments with multiple sites running Datrium DVX, your Microsoft SQL Server Availability Groups and your SQL Server native backups can be protected off-site with Datrium Data Cloud Elastic Replication. Figure 7 shows an example of using Datrium Data Cloud bi-directional replication to protect your Microsoft SQL Server Always On Availability Groups between two data centers. Datrium recommends balancing your SQL Server nodes across Datrium hosts to ensure your SQL Server Availability Group is highly available at the application layer even if a Datrium host becomes unavailable (i.e. ESXi host maintenance).

Figure 7 – SQL Server Always On Availability Groups with Datrium Data Cloud


Regardless of the site topology, Microsoft SQL Server recovery with Datrium DVX is simple and intuitive. With Datrium 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 just virtual disks(s) from your original VM


Figure 8 – Microsoft SQL Server Recovery Workflows with Datrium DVX

SQL Server VM Restore

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

Figure 9 – Restore VM from snapshot


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

SQL Server Virtual Disk Restore

If you decide to restore at the database level, it is recommended to power off your SQL Server virtual machine. 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

You must restore the virtual disks that contains the mdf file and the ldf file of the corresponding database before you power on your SQL Server virtual machine. If the databases are part of your SQL Server Availability Groups, validate that your databases are synchronized. 

SQL Server VM Clone

Datrium Data Cloud also allows you to clone an entire virtual machine in minutes (see figure 11). The SQL Server DB administrator can clone a SQL Server virtual machine at the primary or DR site for use cases such as Dev/Test, DR testing, and compliance. Datrium 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 Datrium Data Cloud Elastic Replication.

Figure 11 – Clone VM from snapshot

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

SQL Server Virtual Disk Clone

Another useful feature of Datrium DVX is our Clone file from snapshot. This Datrium Data Cloud feature is very useful with SQL Server Always On Availability Groups. You can clone and replicate at the virtual disk level. This means you have better granular control for Dev/Test and DR testing. With our Clone file from snapshot feature, you do not have to power off your SQL server virtual machine. 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.

Figure 12 – Clone file from snapshot

For Clone file from snapshot operations with SQL Server databases, it is recommended to restore your databases from the latest SQL Server DB backups. 


Datrium DVX is VM aware. This means you are managing your resources at the virtual machine level rather than at the storage level. This approach provides you with granularity to snap, clone and replicate at the virtual machine and file level with Datrium Data Cloud. With SQL Server Availability Groups and Datrium DVX, your SLAs for HA and DR are in minutes rather than days or hours. 


About the Author

Dominic Cheah is a Technical Marketing Engineer on the Solutions and Alliances group at Datrium, Inc. In his role, Dominic focuses on business-critical applications, DevOps, databases, and data protection.


Download the SQL Server HA and DR with Datrium DVX Whitepaper