• subscribe
October 06, 2010 10:17 AM

SQL Server Virtualization and Availability

SQL Server Pro
InstantDoc ID #125845

Virtualization can make your IT Infrastructure more efficient and flexible. One of the most common uses for virtualization is in the area of server consolidation. Virtualization lets you run multiple server instances on a single hardware platform, making more efficient use of your existing servers. This results in higher hardware resource utilization, lower power requirements, and fewer operational requirements. However, virtualization has other benefits beyond server consolidation—it can also improve the availability of your servers. In this article you'll learn about some of the ways that virtualization can be used to improve the availability of the SQL Server systems in the areas of disaster recovery, planned downtime, and dynamic resource management. I'll focus on the options that are available through the Microsoft technology stack, but similar options are available from VMware.

Backing Up Virtual Machines for Disaster Recovery

One of the most basic ways that virtualization can improve SQL Server availability is in the area of disaster recovery. Virtualization abstracts the server OS from the underlying hardware. This separation provides a lot of flexibility in how you can back up and restore a server in the event of a hardware failure or site outage.

There are two basic options for backing up Hyper-V virtual machines (VMs). You can perform the backup at the Hyper-V virtualization host level or the Windows Server guest OS level. (It's important to remember that these system backup aren't any kind of substitute for your regular database backups.) Backing up a VM at the guest level is essentially the same as performing a normal backup of a physical server. Windows Server backup is able to use Volume Shadow Copy Services to take live backups of SQL Server. You select to restore either at the volume level or at the individual file level.

You can back up at the guest level, but virtualization also lets you perform VM backups at the host level. Windows Server's VSS enables you to back up running VMs with no downtime. One of the big advantages of backing up at the virtualization host level is the fact that the saved VMs can be quickly restored to another Hyper-V host. There's no need for bare metal restores or reinstalls of the OS or SQL Server or its databases—the VM backup contains all of these. SQL Server and its databases can be available as quickly as the VM restore can be completed and attached to another Hyper-V host.

To take advantage of online host backups, the VM host OS needs to be VSS aware and the Hyper-V Integration Services must be installed in the VM. Windows Server 2008 R2, Server 2008, Server 2003 R2, and Server 2003 all support VSS backups. VMs running guest OSs that don't have support for VSS Backups, such as Windows 2000 Server or VMs without Integration Services installed, will save their state when the VSS snapshot is taken. The state will be restored after the snapshot is complete.

Hyper-V is VSS aware, but VSS compatibility for Hyper-V isn't enabled by default. For Windows Server Backup to be able to back up a Hyper-V VM using VSS, you need to add the registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}.

After adding the key, you need to create the following string value under it.

Name: Application Identifier
Type: REG_SZ
Value: Hyper-V

For more information about enabling Hyper-V and Windows Server Backup integration, refer to the Microsoft article "How to Back Up Hyper-V Virtual Machines from the Parent Partition on a Windows Server 2008-Based Computer by Using Windows Server Backup."

For disaster recovery purposes, you'd typically set up a process to move the VM backup to a disaster recovery site. You can do this manually or by using File Replication Services, Distributed File Services Replication, or even scripted FTP transfers. For more information about using DFS for disaster recovery, refer to "Disaster Recovery with DFS."



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here