WinInfo Daily News   |   Windows IT Pro
in
Microsoft Technet

IT Pro Tips


SQL Server 2008: Database Mirroring

By Ron Barrett

We have reached a point in business where recovery from failures needs to happen in seconds not minutes. When I was an IT Director for a Financial Services firm in NYC, partners would remind me daily that every time the databases for our CRM, Financial Applications or Time and Billing system where down that we would be losing tens of thousands of dollars an hour. I mention this because it has been my experience that the idea of highly available systems only now seems to be taking hold in the SMB market.

Many enterprises know and acknowledge the need for availability. Sadly even some of these networks run with little or no thought of what happens if the system simply stops working. The nature of today’s business makes it vital to ensure that you can not only continue business, but continue with little to no interruption to the end users.

Although SQL Server 2008 provides several methods of meeting this goal, Database Mirroring, provides a solution that is easily managed and responds fast to a failover, with zero loss of committed data.

The Microsoft SQL Server TechNet Virtual Lab: Database Mirroring takes us through the process in two steps:

1. Establishing the Mirror

2. Simulating a Failover

Unlike some labcasts this lab does not give an overview of the tools you will work with, rather it allows the user to jump right in and begin working. By default it opens the “Database Engine” for “SQL08DEMO”. However, it is important to be sure you’re working on the correct Server Type and Server Name before clicking Connect.

Once the SQL Server Management Studio is launched, users are faced with three panes: the Object Explorer, Object Explorer Details pane and the Solution Explorer. Resizing the Object Explorer allows for better views of the scripts to be run in the Object Explorer Details pane.

The lab next takes you through the process of opening and executing the 5 preset scripts. These scripts will setup the Primary, Secondary, and a third “Witness” server to act as a mediator in case of failure to ensure a quick failover response.

TIP: Script number 4 and 5 will show an error after they are executed.  This is because the Adventureworks database has not been refreshed yet. 

Next you’ll run through setting up the mirror server instance and adding it to the object explorer.

TIP: The lab tells you to go to the registered servers view to find SQL08DEMO\MIRROR.  You will first need to add the registered server before it appears in the registered servers. 

Finally you need to check that the Secondary database has been created in the mirror database before moving on to the SQL Server Failover Test.

In the failover test the lab simulates both the failure and failback. The performance monitor shows the simulated load on the systems.

This lab, Database Mirroring, was a quick and fun way to get a grasp on how to prepare your database for high availability. As I said before SQL Server 2008 has several high availability options but as you will learn in this lab, Database Mirroring can be set if needed by a newcomer to SQL Server. There you go; no more excuses for database downtime.

Comments

No Comments
Acceptable Use Policy

SPONSORED LINKS FEATURED LINKS

Calculate your savings nowSee how SAN is 57% cheaper than DAS over three years Free CDs Offer Fundamental Content for IT ProsAre you up to speed on the latest technologies and solutions? Don't miss out on your chance to get up to speed quickly on fundamental, in-depth information on some of the hottest topics in our library of content. Let Your Users Reset Their Own Passwords: Free Download Try a 30 day free trial of Desktop Authority Password Self-Service – it provides an easy-to-use, robust system for allowing users to reset their own forgotten passwords or locked accounts. Exchange Server 2010: Deploying Unified Communications - Virtual conferenceDecember 1, 2009 - Free Registration. Build your Unified Communications future on a strong Exchange Server 2010 foundation. Get Windows IT Pro & Mark Minasi’s Favorite Power Tools GuideOrder Windows IT Pro now and get "More of Mark Minasi's Favorite Power Tools"--a in-depth guide to the most useful Windows commands --FREE with your paid order! Subscribe today, and save 58% off the cover price! Migration, Virtualization, Availability, and Desktop ManagementRealize the importance of a workload optimization strategy...it can affect your bottom line! Deep Dive into VMware vSphere, eLearning SeriesJoin John Savill to explore the major functionality capabilities of the vSphere virtualization platform, including identification of the changes from ESX 3.5.
Windows IT Pro |  Subscribe |  Register |  FAQ for Windows |  Media Kit |  WinInfo News |  Europe Edition |  About Us |  Contact Us/Customer Service |  Affiliates/Licensing
SQL Server Magazine |  Office & SharePoint Pro |  WinDevPro |  asp.netPRO |  IT Library |  Technology Resource Directory |  ITTV |  IT Job Hound

© 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing