<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SQL Server AlwaysOn Team Blog</title><link>http://blogs.msdn.com/b/sqlalwayson/</link><description>The official SQL Server AlwaysOn team blog.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Connecting to Availability Group Listener in Hybrid IT</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2013/02/14/connecting-to-availability-group-listener-in-hybrid-it.aspx</link><pubDate>Thu, 14 Feb 2013 18:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10393768</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10393768</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2013/02/14/connecting-to-availability-group-listener-in-hybrid-it.aspx#comments</comments><description>&lt;p&gt;In this blog, I'd like to explore client connectivity strategy when you have an availability group that spans both your on-premise servers and Windows Azure VMs. From the outset, I should clarify that the availability group listener is not supported in Windows Azure at the moment, which contributes to the interesting scenario in hybrid IT where the availability group listener is useful part of the time (i.e. when an on-premise replica is the primary replica). In a simple scenario, you have a primary replica and synchronous secondary replica running in your on-premise network for high availability. You then have an asynchronous secondary replica running in a Windows Azure VM for disaster recovery. The Windows Azure virtual network is connected to your on-premise network through a site-to-site VPN tunnel.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6114.021413_5F00_1852_5F00_Connectingt1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If you configure an availability group listener for this hybrid-IT scenario, as a matter of course you will specify two IP addresses for the listener's network name, one for your on-premise subnet and one for the Windows Azure subnet. Purely as a behavior of AlwaysOn Availability Groups, the multi-subnet cluster will always assign the listener IP for the availability group to be the one with same subnet mask as the primary replica. For example, if you create a listener called AG1 with the IP addresses 10.1.1.111/10.2.2.222 for the respective subnets, as shown below, the listener IP address 10.1.1.111 is active because the primary replica is in the 10.1.1.0/24 subnet.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0815.021413_5F00_1852_5F00_Connectingt2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The IP address 10.1.1.111 will be the active IP as long as the availability group fails over between the two on-premise replicas. Clients can connect to the listener name AG1 and be automatically redirected to the correct primary replica. However, when the availability group fails over to the asynchronous secondary in Windows Azure, the listener IP 10.2.2.222 becomes active instead. You can observe this in Failover Cluster Manager, where 10.1.1.111 is brought offline and 10.2.2.222 is brought online during the failover. At this point, if clients are configured to connect to the listener name AG1, the IP address resolves to 10.2.2.222 but the clients cannot connect to that IP address (again, because the listener is not supported in Windows Azure). Failover Cluster Manager may indicate that 10.2.2.222 is online, but actually no traffic can be routed to it in Windows Azure.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5618.021413_5F00_1852_5F00_Connectingt3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;While you cannot connect to the availability group listener (yet), you can still connect directly to the SQL Server instance on the Windows Azure VM. So whenever you perform a failover from an on-premise replica to a Windows Azure replica, you must also change the client connection strings to connect directly to the Windows Azure VM. In a production environment, a failover to the Windows Azure VM should only happen in a disaster recovery scenario, and you should have a disaster recovery plan that is fully tested. As part of your disaster recovery procedure you want to do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;bring the cluster back online by forcing quorum on the Windows Azure VM,&lt;/li&gt;
&lt;li&gt;perform a forced failover with data loss,&lt;/li&gt;
&lt;li&gt;change the client applications (e.g. SharePoint) to connect to the Windows Azure VM directly,&lt;/li&gt;
&lt;li&gt;recover your on-premise network/servers,&lt;/li&gt;
&lt;li&gt;fail over back to one of the on-premise replicas,&lt;/li&gt;
&lt;li&gt;change the client database connection to use the availability group listener again.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Simplifying Client Connectivity During Disaster Recovery&lt;/h2&gt;
&lt;p&gt;Reconfiguring client applications during disaster recovery is a complex process that can be simplified by creating dedicated DNS records. In the example above, you can create an A record that points to 10.1.1.111 or a CNAME record that points to AG1, then point the client applications to use this DNS record to connect to the availability database. Your disaster recovery procedure then may look as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;bring the cluster back online by forcing quorum on the Windows Azure VM,&lt;/li&gt;
&lt;li&gt;perform a forced failover with data loss,&lt;/li&gt;
&lt;li&gt;change the DNS record to point to the Windows Azure VM (if an A record, it's the VM's IP address; if a CNAME record, it's the VM's hostname),&lt;/li&gt;
&lt;li&gt;recover your on-premise network/servers,&lt;/li&gt;
&lt;li&gt;fail over back to one of the on-premise replicas,&lt;/li&gt;
&lt;li&gt;change the DNS record to point to the availability group listener again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This technique is particularly helpful if you have multiple clients that point to the same availability group. Instead of reconfiguring client applications, you only need to make sure that the one DNS record points to the proper IP address (A record) or network name (CNAME record).&lt;/p&gt;
&lt;h3&gt;When Replicas are in Named Instances with Different Names&lt;/h3&gt;
&lt;p&gt;If the replicas in your availability group are located in named instances that do not have the same instance names, you can still use the same technique, but you must make sure that the named instance on the Windows Azure VM listens on the same static port that the availability group listener is configured with and that client applications connect directly to the server name and port number. In other words, the availability group listener and the named instance on the Windows Azure VM need to be configured such that clients can use the same connection string to connect to either of them, as long as the DNS record points to the correct network name. In the example below, you can configure &lt;strong&gt;AG1&lt;/strong&gt; and &lt;strong&gt;NamedInst&lt;/strong&gt; both to use port number 10000. The port numbers for the on-premise replicas can remain dynamically allocated because you can the availability databases through the listener.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1882.021413_5F00_1852_5F00_Connectingt4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Once you have configured your solution as shown above, configure all client applications to AG-VNN and port number 10000. For example: "&lt;strong&gt;Data Source=AG-VNN,10000;Network Library=dbmssocn;Initial Catalog=MyDataBaseName;Integrated Security=SSPI&lt;/strong&gt;". This way, the on-premise.&lt;/p&gt;
&lt;p&gt;For information on specifying a static port number for a named SQL Server instance, see &lt;a href="http://msdn.microsoft.com/en-us/library/ms177440.aspx"&gt;Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10393768" width="1" height="1"&gt;</description></item><item><title>Test Lab: Create an AlwaysOn Availability Group in Windows Azure End-to-End</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2013/01/23/test-lab-create-an-alwayson-availability-group-in-windows-azure-end-to-end.aspx</link><pubDate>Wed, 23 Jan 2013 19:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10387693</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10387693</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2013/01/23/test-lab-create-an-alwayson-availability-group-in-windows-azure-end-to-end.aspx#comments</comments><description>&lt;p&gt;In this blog, you will learn how to configure AlwaysOn Availability Groups end-to-end using Windows Azure VMs. The steps here are the GUI near-equivalent of the script-based tutorial, which has been published at &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj870963.aspx"&gt;Tutorial: AlwaysOn Availability Groups in Windows Azure&lt;/a&gt;. The end-to-end test lab is designed to help you go through all the basic paces of deploying an end-to-end AlwaysOn scenario in Windows Azure VMs. There are some notable differences between on-premise HADR SQL Server deployments and Windows Azure VM deployments, which I have written in detail at &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj870962.aspx"&gt;SQL Server High Availability and Disaster Recovery in Windows Azure Virtual Machines&lt;/a&gt;. Hopefully, walking through the steps can help you identify these differences and avoid potential pitfalls.&lt;/p&gt;
&lt;p&gt;Briefly, the steps in this blog demonstrate how to create an AlwaysOn Availability Groups deployment in Windows Azure VMs with the following characteristics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Four VMs are deployed in the same affinity group, virtual network, and cloud service and use the same storage account.&lt;/li&gt;
&lt;li&gt;One VM is the domain controller (DC) server.&lt;/li&gt;
&lt;li&gt;The remaining three VMs form a three-node Windows Server Failover Clustering (WSFC) cluster and are deployed in the same subnet and availability set.&lt;/li&gt;
&lt;li&gt;Two of the WSFC nodes contain SQL Server instances and host an availability group with an availability database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The figure below is a graphical representation of the solution.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5165.050113_5F00_0001_5F00_TestLabCrea1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Below is the outline of the steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#Create_Domain_Controller_Server"&gt;Create Domain Controller Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Create_and_Prepare_WSFC_Nodes"&gt;Create and Prepare WSFC Nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Create_WSFC_Cluster"&gt;Create WSFC Cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Prepare_SQL_Server_Instances_for_Availability_Group"&gt;Prepare SQL Server Instances for Availability Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Create_Availability_Group"&gt;Create Availability Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Create_Public_Endpoints_for_Remote_Clients"&gt;Create Public Endpoints for Remote Clients&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Create_Domain_Controller_Server"&gt;&lt;/a&gt;Create Domain Controller Server&lt;/h2&gt;
&lt;p&gt;You begin with a new Windows Azure trial account with the Virtual Machine preview enabled. Once you have finished your account and preview feature sign-up, your Windows Azure portal should look similar to the following screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0066.050113_5F00_0001_5F00_TestLabCrea2.png" alt="" /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Click the &lt;strong&gt;New&lt;/strong&gt; button at the lower-left corner of the page.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0844.050113_5F00_0001_5F00_TestLabCrea3.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click &lt;strong&gt;Network&lt;/strong&gt;, then click &lt;strong&gt;Virtual Network&lt;/strong&gt;, and then click &lt;strong&gt;Custom Create&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2526.050113_5F00_0001_5F00_TestLabCrea4.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Virtual Network Details&lt;/strong&gt;, specify &lt;strong&gt;Name&lt;/strong&gt;, &lt;strong&gt;Region&lt;/strong&gt;, and &lt;strong&gt;Affinity Group Name&lt;/strong&gt; as shown below. Then, click the right arrow at the bottom-right corner.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0028.050113_5F00_0001_5F00_TestLabCrea5.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;DNS Servers and VPN Connectivity&lt;/strong&gt;, do not change anything and click the right arrow at the bottom-right corner.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Address Space and Subnets&lt;/strong&gt;, specify &lt;strong&gt;Address Space&lt;/strong&gt; and &lt;strong&gt;Subnets&lt;/strong&gt; as shown below in CIDR format. Then, click the check mark at the bottom-right corner.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2273.050113_5F00_0001_5F00_TestLabCrea6.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;When virtual network creation is complete, your Windows Azure portal will look similar to the following figure.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3175.050113_5F00_0001_5F00_TestLabCrea7.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you create a new storage account you will use to store the VHD files of the VMs. Click &lt;strong&gt;New&lt;/strong&gt; again, then &lt;strong&gt;Data Services&lt;/strong&gt;, then &lt;strong&gt;Storage&lt;/strong&gt;, and then &lt;strong&gt;Quick Create&lt;/strong&gt;. Specify &lt;strong&gt;URL&lt;/strong&gt; and &lt;strong&gt;Region/Affinity Group&lt;/strong&gt; as shown below and click &lt;strong&gt;Create Storage Account&lt;/strong&gt;. You must specify a unique URL for your storage account.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6305.050113_5F00_0001_5F00_TestLabCrea8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;It may take some time for the storage account to be created. When the storage account is created, your Windows Azure portal will look similar to below:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0844.050113_5F00_0001_5F00_TestLabCrea9.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you create the VM you will use as the domain controller (DC). Click &lt;strong&gt;New&lt;/strong&gt; again, then &lt;strong&gt;Compute&lt;/strong&gt;, then &lt;strong&gt;Virtual Machine&lt;/strong&gt;, and then &lt;strong&gt;From Gallery&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1018.050113_5F00_0001_5F00_TestLabCrea10.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Virtual machine operating system selection&lt;/strong&gt;, select &lt;strong&gt;Windows Server 2008 R2 SP1&lt;/strong&gt;. Then, click the right arrow.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2677.050113_5F00_0001_5F00_TestLabCrea11.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Virtual machine configuration&lt;/strong&gt;, specify &lt;strong&gt;Virtual Machine Name&lt;/strong&gt;, &lt;strong&gt;Size&lt;/strong&gt;, &lt;strong&gt;New User Name&lt;/strong&gt;, &lt;strong&gt;New Password&lt;/strong&gt;, and&amp;nbsp;&lt;strong&gt;Confirm&lt;/strong&gt; as shown below. Then, click the right arrow.&lt;/div&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36/1385.blog1.PNG"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36/1385.blog1.PNG" alt="" width="620" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Virtual machine mode&lt;/strong&gt;, specify &lt;strong&gt;DNS Name&lt;/strong&gt;, &lt;strong&gt;Storage Account&lt;/strong&gt;, &lt;strong&gt;Region/Affinity Group/Virtual Network&lt;/strong&gt;, and &lt;strong&gt;Virtual Network Subnets&lt;/strong&gt; as shown below. Then, click the right arrow.&lt;/div&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36/3108.blog2.PNG"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36/3108.blog2.PNG" alt="" width="620" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Virtual machine options&lt;/strong&gt;, click the check mark to finish configuring the new VM and wait for the VM to be provisioned. This process takes a while to complete, and if you click to the &lt;strong&gt;Virtual Machine&lt;/strong&gt; tab in the Windows Azure portal, you can see &lt;strong&gt;ContosoDC&lt;/strong&gt; cycling states from &lt;strong&gt;Starting (Provisioning)&lt;/strong&gt; to &lt;strong&gt;Stopped&lt;/strong&gt;, &lt;strong&gt;Starting&lt;/strong&gt;, &lt;strong&gt;Running (Provisioning)&lt;/strong&gt;, and finally &lt;strong&gt;Running&lt;/strong&gt;. Once &lt;strong&gt;ContosoDC&lt;/strong&gt; is provisioned, click the &lt;strong&gt;Connect&lt;/strong&gt; button to download the remote desktop (RDP) file to your local directory.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6886.050113_5F00_0001_5F00_TestLabCrea14.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you configure &lt;strong&gt;ContosoDC&lt;/strong&gt; as a DC server for &lt;strong&gt;corp.contoso.com&lt;/strong&gt;. Launch the RDP file for &lt;strong&gt;ContosoDC&lt;/strong&gt; and log in using your configured administrator account (&lt;strong&gt;ContosoAdmin&lt;/strong&gt;). After you log in, run &lt;strong&gt;dcpromo&lt;/strong&gt; from the Start menu.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1104.050113_5F00_0001_5F00_TestLabCrea15.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the wizard, select &lt;strong&gt;Use advanced mode installation&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Choose a Deployment Configuration&lt;/strong&gt;, select &lt;strong&gt;Create a new domain in a new forest&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2577.050113_5F00_0001_5F00_TestLabCrea16.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Name the Forest Root Domain&lt;/strong&gt;, type &lt;strong&gt;corp.contoso.com&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5707.050113_5F00_0001_5F00_TestLabCrea17.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Static IP Assignment&lt;/strong&gt; warning window, click &lt;strong&gt;Yes, the computer will use an IP address automatically assigned by a DHCP server (not recommended)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Additional Domain Controller Options&lt;/strong&gt;, accept the default &lt;strong&gt;DNS server&lt;/strong&gt; selection and click &lt;strong&gt;Next&lt;/strong&gt;. In the pop-up window, click &lt;strong&gt;Yes&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2642.050113_5F00_0001_5F00_TestLabCrea18.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt; again, then specify and confirm the administrator password and click &lt;strong&gt;Next&lt;/strong&gt;, and then click &lt;strong&gt;Next&lt;/strong&gt; again to finish configuring the DC server. After the DC server is provisioned, the VM restarts automatically.&lt;/li&gt;
&lt;li&gt;Next, you configure Active Directory (AD) with the accounts you will use later. Launch the RDP file for &lt;strong&gt;ContosoDC&lt;/strong&gt; again using the default domain administrator credentials (&lt;strong&gt;CORP\Administrator&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Once you log in, open &lt;strong&gt;Active Directory Users and Computers&lt;/strong&gt; from the &lt;strong&gt;Start&lt;/strong&gt; menu.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4621.050113_5F00_0001_5F00_TestLabCrea19.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Expand &lt;strong&gt;corp.contoso.com&lt;/strong&gt;, then right-click &lt;strong&gt;Users&lt;/strong&gt;, then point to &lt;strong&gt;New&lt;/strong&gt;, then click &lt;strong&gt;User&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5707.050113_5F00_0001_5F00_TestLabCrea20.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Specify a user named &lt;strong&gt;Install&lt;/strong&gt; as shown below and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0181.050113_5F00_0001_5F00_TestLabCrea21.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Specify and confirm the account password, then select the check boxes as shown below, and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/8816.050113_5F00_0001_5F00_TestLabCrea22.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Finish&lt;/strong&gt;. You have now created &lt;strong&gt;CORP\Install&lt;/strong&gt; in AD. You will use this account to configure the failover cluster and the availability group.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Following the same steps, create two additional accounts: &lt;strong&gt;CORP\SQLSvc1&lt;/strong&gt; and &lt;strong&gt;CORP\SQLSvc2&lt;/strong&gt;. You will use them as service accounts for the SQL Server instances.&lt;/div&gt;
&lt;p&gt;Next, you need to give &lt;strong&gt;CORP\Install&lt;/strong&gt; the necessary permissions for configuring Windows Service Failover Clustering (WSFC).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;View&lt;/strong&gt; menu, click &lt;strong&gt;Advanced Features&lt;/strong&gt;. This action lets you see all the hidden containers, as well as hidden tabs in the properties windows for AD objects.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2146.050113_5F00_0001_5F00_TestLabCrea23.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Right-click &lt;strong&gt;corp.contoso.com&lt;/strong&gt; and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3704.050113_5F00_0001_5F00_TestLabCrea24.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;corp.contos.com Properties&lt;/strong&gt;, select the &lt;strong&gt;Security&lt;/strong&gt; tab, then click the &lt;strong&gt;Advanced&lt;/strong&gt; button.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6763.050113_5F00_0001_5F00_TestLabCrea25.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Advanced Security Settings for corp&lt;/strong&gt;, click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7002.050113_5F00_0001_5F00_TestLabCrea26.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Type &lt;strong&gt;CORP\Install&lt;/strong&gt; in the text box and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0564.050113_5F00_0001_5F00_TestLabCrea27.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Allow&lt;/strong&gt; for &lt;strong&gt;Read all properties&lt;/strong&gt; and &lt;strong&gt;Create Computer objects&lt;/strong&gt;,&lt;strong&gt; &lt;/strong&gt;then click &lt;strong&gt;OK&lt;/strong&gt; three times to exit &lt;strong&gt;corp.contoso.com Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6431.050113_5F00_0001_5F00_TestLabCrea28.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Next, you create the three VMs you will use which includes a WSFC cluster node and two SQL Server VMs. To create each of the VMs, go back to the Windows Azure portal, then click &lt;strong&gt;New&lt;/strong&gt;, then &lt;strong&gt;Compute&lt;/strong&gt;, then &lt;strong&gt;Virtual Machine&lt;/strong&gt;, and then &lt;strong&gt;From Gallery&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Create_and_Prepare_WSFC_Nodes"&gt;&lt;/a&gt;Create and Prepare WSFC Nodes&lt;/h2&gt;
&lt;p&gt;In this section, you will create three more VMs in Windows Azure.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Use the following table to help you configure the three VMs.
&lt;div style="margin-left: 36pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 138px;" /&gt;&lt;col style="width: 152px;" /&gt;&lt;col style="width: 143px;" /&gt;&lt;col style="width: 143px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;VM1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;VM2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;VM3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Operating system selection&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Windows Server 2008 R2 SP1, December 2012&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Microsoft SQL Server 2012 Evaluation Edition&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Microsoft SQL Server 2012 Evaluation Edition&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Virtual Machine Name&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoWSFCNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoSQL1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoSQL2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Size&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Medium&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Large&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Large&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;New User Name&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoAdmin&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoAdmin&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;ContosoAdmin&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Connected to an existing virtual machine&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Selected (ContosoDC)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Selected (ContosoDC)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Selected (ContosoDC)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Storage Account&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;contososa2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;contososa2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;contososa2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Virtual Network Subnets&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Back (10.10.2.0/24)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Back (10.10.2.0/24)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Back (10.10.2.0/24)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Availability Set&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Create availability set (SQLHADR)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;SQLHADR&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;SQLHADR&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;When you select &lt;strong&gt;Connect to an existing virtual machine&lt;/strong&gt; and select &lt;strong&gt;ContosoDC&lt;/strong&gt; (the only choice), it is the same as telling Windows Azure to place the VM in the same cloud service as &lt;strong&gt;ContosoDC&lt;/strong&gt;, which is &lt;strong&gt;ContosoSQLsvc&lt;/strong&gt; as I have specified it in my screenshot earlier. Again, this cloud service name is unique on the internet.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;It does not take that much time to configure the three VMs, but be prepared to wait for a long time for all three VMs to be provisioned. Depending on the circumstances, it can take anywhere from a few hours to a full day for Windows Azure to fully provision three VMs.&lt;/p&gt;
&lt;p style="background: yellow;"&gt;Once the three VMs are fully provisioned, you need to join them to the &lt;strong&gt;corp.contoso.com&lt;/strong&gt; domain and grant &lt;strong&gt;CORP\Install&lt;/strong&gt; administrative rights to the machines. To do this, follow the steps below for each of the three VMs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Download each VM's remote desktop (RDP) file to your local directory by selecting the VM in the list and clicking the &lt;strong&gt;Connect&lt;/strong&gt; button. To select a VM, click anywhere but the first cell in the row, as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5751.050113_5F00_0001_5F00_TestLabCrea29.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Launch the RDP file you downloaded and log into the VM using your configured administrator account (&lt;strong&gt;ContosoAdmin&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Once you are logged in, the Initial Configuration Tasks window is automatically launched. Click the &lt;strong&gt;Configure networking&lt;/strong&gt; link as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0552.050113_5F00_0001_5F00_TestLabCrea30.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The Network Connections window is opened. Right-click &lt;strong&gt;Local Area Connection 3&lt;/strong&gt; and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7506.050113_5F00_0001_5F00_TestLabCrea31.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Internet Protocol Version 4 (TCP/IPv4)&lt;/strong&gt; and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4278.050113_5F00_0001_5F00_TestLabCrea32.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Use the following DNS server addresses&lt;/strong&gt; and specify 10.10.2.4 in &lt;strong&gt;Preferred DNS server&lt;/strong&gt;, as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4846.050113_5F00_0001_5F00_TestLabCrea33.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The address 10.10.2.4 is the address assigned to a VM in the 10.10.2.0/24 subnet in a Windows Azure virtual network, and that VM is &lt;strong&gt;ContosoDC&lt;/strong&gt;. To verify &lt;strong&gt;ContosoDC&lt;/strong&gt;'s IP address, use the &lt;strong&gt;nslookup contosodc&lt;/strong&gt; in the command prompt, as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2781.050113_5F00_0001_5F00_TestLabCrea34.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; twice to commit the changes. You are now able to join the VM to &lt;strong&gt;corp.contoso.com&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Back in the &lt;strong&gt;Initial Configuration Tasks&lt;/strong&gt;, click the &lt;strong&gt;Provide computer name and domain&lt;/strong&gt; link.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1614.050113_5F00_0001_5F00_TestLabCrea35.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;System Properties&lt;/strong&gt; dialog, click &lt;strong&gt;Change&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2768.050113_5F00_0001_5F00_TestLabCrea36.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select the &lt;strong&gt;Domain&lt;/strong&gt; check box and type &lt;strong&gt;corp.contoso.com&lt;/strong&gt; in the text box, then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7870.050113_5F00_0001_5F00_TestLabCrea37.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Windows Security&lt;/strong&gt; popup dialog, specify the credentials for the default domain administrator account (&lt;strong&gt;CORP\Administrator&lt;/strong&gt;) and the password you specified.&lt;/li&gt;
&lt;li&gt;When you see the "Welcome to the corp.contoso.com domain" message, click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Computer Name/Domain Changes&lt;/strong&gt;, click &lt;strong&gt;OK&lt;/strong&gt;, then click &lt;strong&gt;OK&lt;/strong&gt; in the popup dialog.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;System Properties&lt;/strong&gt;, click &lt;strong&gt;Close&lt;/strong&gt;, then click &lt;strong&gt;Restart Now&lt;/strong&gt; in the popup dialog to restart the VM.&lt;/li&gt;
&lt;li&gt;Wait a few minutes for the VM to be restarted, then launch the RDP file again to log into the VM using the &lt;strong&gt;BUILTIN\Administrator&lt;/strong&gt; account.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Start&lt;/strong&gt; menu, type "&lt;strong&gt;user&lt;/strong&gt;", then click &lt;strong&gt;Give administrative rights to a domain user&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7077.050113_5F00_0001_5F00_TestLabCrea38.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;User Accounts&lt;/strong&gt; dialog, click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0131.050113_5F00_0001_5F00_TestLabCrea39.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In Add &lt;strong&gt;New User&lt;/strong&gt;, specify &lt;strong&gt;Install&lt;/strong&gt; in &lt;strong&gt;User name&lt;/strong&gt; and &lt;strong&gt;CORP&lt;/strong&gt; in &lt;strong&gt;Domain&lt;/strong&gt;, as shown below, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3362.050113_5F00_0001_5F00_TestLabCrea40.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Administrator&lt;/strong&gt; to add the &lt;strong&gt;CORP\Install&lt;/strong&gt; to the local &lt;strong&gt;Administrators&lt;/strong&gt; group, then click &lt;strong&gt;Finish&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt; to close the &lt;strong&gt;User Accounts&lt;/strong&gt; dialog.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you add the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature to the VM. In the &lt;strong&gt;Initial Configuration Tasks&lt;/strong&gt; window, click &lt;strong&gt;Add features&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1682.050113_5F00_0001_5F00_TestLabCrea41.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Add Features Wizard&lt;/strong&gt;, select &lt;strong&gt;Failover Clustering&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7558.050113_5F00_0001_5F00_TestLabCrea42.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Confirm Installation Selections&lt;/strong&gt;, click &lt;strong&gt;Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature installation is completed, click &lt;strong&gt;Close&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Log out of the VM.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Create_WSFC_Cluster"&gt;&lt;/a&gt;Create WSFC Cluster&lt;/h2&gt;
&lt;p&gt;In this section, you create the WSFC cluster that will host the availability group you will create later. By now, you should have done the following to each of the three VMs you will use in the WSFC cluster:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fully provisioned in Windows Azure&lt;/li&gt;
&lt;li&gt;Joined VM to the domain&lt;/li&gt;
&lt;li&gt;Added &lt;strong&gt;CORP\Install&lt;/strong&gt; to the local &lt;strong&gt;Administrators&lt;/strong&gt; group&lt;/li&gt;
&lt;li&gt;Added the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these are prerequisites on each VM before you can join it to the WSFC cluster.&lt;/p&gt;
&lt;p&gt;Also, note that the Windows Azure virtual network does not behave in the same way as an on-premise network, you need to create the cluster in the following order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a single-node cluster on one of the nodes (ContosoSQL1)&lt;/li&gt;
&lt;li&gt;Modify the cluster IP address to an unused IP address (10.10.2.101)&lt;/li&gt;
&lt;li&gt;Bring the cluster name online&lt;/li&gt;
&lt;li&gt;Remove the IP address resource for the cluster group&lt;/li&gt;
&lt;li&gt;Add the other nodes (ContosoSQL2 and ContosoWSFCNode)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, you are ready to move on. Follow the steps below to fully configure the cluster.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Launch the RDP file for ContosoSQL1 and log in using the credentials for &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Open &lt;strong&gt;Server Manager&lt;/strong&gt;, then expand the &lt;strong&gt;Features&lt;/strong&gt; node, then right-click &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;, and then click &lt;strong&gt;Create a Cluster&lt;/strong&gt;, as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5383.050113_5F00_0001_5F00_TestLabCrea43.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Create Cluster Wizard&lt;/strong&gt;, click &lt;strong&gt;Next&lt;/strong&gt;. Then, type &lt;strong&gt;ContosoSQL1&lt;/strong&gt; in Enter server name and click &lt;strong&gt;Add&lt;/strong&gt;, and then click &lt;strong&gt;Next&lt;/strong&gt; again, as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1780.050113_5F00_0001_5F00_TestLabCrea44.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Validation Warning&lt;/strong&gt; page, click &lt;strong&gt;No, I do not require support from Microsoft for this cluster, and therefore do not want to run the validation tests. When I click Next, continue creating the cluster.&lt;/strong&gt; Then, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Cluser Name&lt;/strong&gt; text box, type &lt;strong&gt;Cluster1&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5305.050113_5F00_0001_5F00_TestLabCrea45.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Confirmation&lt;/strong&gt; page, click &lt;strong&gt;Next&lt;/strong&gt; to begin cluster creation. Once the cluster is created, click &lt;strong&gt;Finish&lt;/strong&gt; to close the wizard.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Server Manager&lt;/strong&gt;, expand &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;, then click &lt;strong&gt;Cluster1.corp.contoso.com&lt;/strong&gt;, then scroll down in the center pane, and then expand &lt;strong&gt;Cluster Core Resources&lt;/strong&gt;. You should see both the &lt;strong&gt;Name&lt;/strong&gt; and the &lt;strong&gt;IP Address&lt;/strong&gt; resources in the &lt;strong&gt;Failed&lt;/strong&gt; state. The IP address resource cannot be brought online because the cluster is assigned the same IP address as that of the machine itself, which is a duplicate address. Right-click the failed &lt;strong&gt;IP Address&lt;/strong&gt; resource, and then click &lt;strong&gt;Properties&lt;/strong&gt;, as shown below.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7534.050113_5F00_0001_5F00_TestLabCrea46.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Static IP Address&lt;/strong&gt; and specify &lt;strong&gt;10.10.2.101&lt;/strong&gt; in the &lt;strong&gt;Address&lt;/strong&gt; text box, as shown below. Then, click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7115.050113_5F00_0001_5F00_TestLabCrea47.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Cluster Core Resources&lt;/strong&gt; section, rlight-click &lt;strong&gt;Name: Cluster1&lt;/strong&gt; and click &lt;strong&gt;Bring this resource online&lt;/strong&gt;, as shown below. Then, wait until both resources are online. When the cluster name resource comes online, it updates the DC server with a new AD computer account. This AD account will be used to run the availability group clustered service later.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3302.050113_5F00_0001_5F00_TestLabCrea48.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Now that the AD account is created, bring the cluster name offline. Right-click the &lt;strong&gt;Name: Cluster1&lt;/strong&gt; resource and click &lt;strong&gt;Take this resource offline&lt;/strong&gt;. In the pop-up confirmation dialog, click &lt;strong&gt;Take&lt;/strong&gt; &lt;strong&gt;Name: Cluster1&lt;/strong&gt; &lt;strong&gt;offline&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0268.050113_5F00_0001_5F00_TestLabCrea49.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, remove the cluster IP address, which is not needed to run the availability group. Right-click &lt;strong&gt;IP Address: 10.10.2.101&lt;/strong&gt; and click &lt;strong&gt;Delete&lt;/strong&gt;. After you delete the cluster IP address, the &lt;strong&gt;Name: Cluster1&lt;/strong&gt; resource can no long come online because it depends on the IP address resource. However, your availability group does not depend on the cluster name or IP address in order to work properly, so you can leave the cluster name offline.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3731.050113_5F00_0001_5F00_TestLabCrea50.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Finally, you add the remaining nodes to the cluster. In the browser tree, right-click &lt;strong&gt;Cluster.corp.contoso.com&lt;/strong&gt; and click &lt;strong&gt;Add Node&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1346.050113_5F00_0001_5F00_TestLabCrea51.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Add Node Wizard&lt;/strong&gt;, click &lt;strong&gt;Next&lt;/strong&gt;. Then, in the &lt;strong&gt;Select Servers&lt;/strong&gt; page, add &lt;strong&gt;ContosoSQL2&lt;/strong&gt; and &lt;strong&gt;ContosoWSFCNode&lt;/strong&gt; to the list by typing the server name in &lt;strong&gt;Enter server name&lt;/strong&gt; and then clicking &lt;strong&gt;Add&lt;/strong&gt;. Once your list looks similar to the screenshot below, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7028.050113_5F00_0001_5F00_TestLabCrea52.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Validation Warning&lt;/strong&gt; page, click &lt;strong&gt;No, I do not require support from Microsoft for this cluster, and therefore do not want to run the validation tests. When I click Next, continue creating the cluster.&lt;/strong&gt; Then, click &lt;strong&gt;Next&lt;/strong&gt; twice to add the nodes. Once the nodes are added to the cluster, click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;Failover Cluster Manager should now show that your cluster has three nodes and list them in the &lt;strong&gt;Nodes&lt;/strong&gt; container, as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7610.050113_5F00_0001_5F00_TestLabCrea53.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Log out of the remote desktop session.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Prepare_SQL_Server_Instances_for_Availability_Group"&gt;&lt;/a&gt;Prepare SQL Server Instances for Availability Group&lt;/h2&gt;
&lt;p&gt;In this section, you will do the following on both ContosoSQL1 and contosoSQL2:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a login for &lt;strong&gt;NT AUTHORITY\System&lt;/strong&gt; with a necessary permissions set to the default SQL Server instance&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;CORP\Install&lt;/strong&gt; as a sysadmin role to the default SQL Server instance&lt;/li&gt;
&lt;li&gt;Open the firewall for remote access of SQL Server&lt;/li&gt;
&lt;li&gt;Enable the AlwaysOn Availability Groups feature&lt;/li&gt;
&lt;li&gt;Change the SQL Server service account to &lt;strong&gt;CORP\SQLSvc1&lt;/strong&gt; and &lt;strong&gt;CORP\SQLSvc2&lt;/strong&gt;, respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The actions above can be performed in any order, nevertheless the steps below will walk through them in order. Follow the steps for both &lt;strong&gt;ContosoSQL1&lt;/strong&gt; and &lt;strong&gt;ContosoSQL2&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you have not logged out of the remote desktop session for the VM, do so now.&lt;/li&gt;
&lt;li&gt;Launch the RDP file for the VM and log in as BUILTIN\Administrator.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;First, you add &lt;strong&gt;CORP\Install&lt;/strong&gt; as a sysadmin role to the default SQL Server instance. From the &lt;strong&gt;Start&lt;/strong&gt; menu, launch &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1321.050113_5F00_0001_5F00_TestLabCrea54.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Connect &lt;/strong&gt;to connect to the default SQL Server instance.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Object Explorer&lt;/strong&gt;, expand &lt;strong&gt;Security&lt;/strong&gt;, right-click &lt;strong&gt;Logins&lt;/strong&gt;, and click &lt;strong&gt;New Login&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/8508.050113_5F00_0001_5F00_TestLabCrea55.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;strong&gt;NT AUTHORITY\System&lt;/strong&gt; in &lt;strong&gt;Login name&lt;/strong&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Object Explorer&lt;/strong&gt;, right-click &lt;strong&gt;NT AUTHORITY\System&lt;/strong&gt; and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Securables&lt;/strong&gt; page, for the local server, select &lt;strong&gt;Grant&lt;/strong&gt; for the following permissions and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Alter any availability group &lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connect SQL &lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;View server state &lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Object Explorer&lt;/strong&gt;, right-click &lt;strong&gt;Logins&lt;/strong&gt; again and click &lt;strong&gt;New Login&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Type &lt;strong&gt;CORP\Install&lt;/strong&gt; in &lt;strong&gt;Login name&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6114.050113_5F00_0001_5F00_TestLabCrea56.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Server Roles&lt;/strong&gt; page, select &lt;strong&gt;sysadmin&lt;/strong&gt;. Then, click &lt;strong&gt;OK&lt;/strong&gt;. Once the login is created, you can see it by expanding &lt;strong&gt;Logins&lt;/strong&gt; in &lt;strong&gt;Object Explorer&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5444.050113_5F00_0001_5F00_TestLabCrea57.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;From the &lt;strong&gt;Start&lt;/strong&gt; menu, launch &lt;strong&gt;Windows Firewall with Advanced Security&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6507.050113_5F00_0001_5F00_TestLabCrea58.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Right-click &lt;strong&gt;Inbound Rules&lt;/strong&gt; and click &lt;strong&gt;New Rule&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1321.050113_5F00_0001_5F00_TestLabCrea59.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Rule Type&lt;/strong&gt; page, select &lt;strong&gt;Program&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7585.050113_5F00_0001_5F00_TestLabCrea60.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Program&lt;/strong&gt; page, select &lt;strong&gt;This program path&lt;/strong&gt; and type &lt;strong&gt;%ProgramFiles%\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe&lt;/strong&gt; in the text box. Then, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3872.050113_5F00_0001_5F00_TestLabCrea61.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Action&lt;/strong&gt; page, keep &lt;strong&gt;Allow the connection&lt;/strong&gt; selected and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Profile&lt;/strong&gt; page, accept the default settings and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Name&lt;/strong&gt; page, specify a rule name, such as &lt;strong&gt;SQL Server (Program Rule)&lt;/strong&gt; in the &lt;strong&gt;Name&lt;/strong&gt; text box, then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1212.050113_5F00_0001_5F00_TestLabCrea62.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you enable the &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; feature. From the &lt;strong&gt;Start&lt;/strong&gt; menu, launch &lt;strong&gt;SQL Server Configuration Manager&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1200.050113_5F00_0001_5F00_TestLabCrea63.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the browser tree, click &lt;strong&gt;SQL Server Services&lt;/strong&gt;, then right-click the &lt;strong&gt;SQL Server (MSSQLSERVER)&lt;/strong&gt; service and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4034.050113_5F00_0001_5F00_TestLabCrea64.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click the &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; tab, then select &lt;strong&gt;Enable AlwaysOn Availability Groups&lt;/strong&gt;, and then click &lt;strong&gt;Apply&lt;/strong&gt;. Click &lt;strong&gt;OK&lt;/strong&gt; in the pop-up dialog, and do not close the properties window yet. You will restart the SQL Server service after you change the service account.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4431.050113_5F00_0001_5F00_TestLabCrea65.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you change the SQL Server service account. Click the &lt;strong&gt;Log On&lt;/strong&gt; tab, then type &lt;strong&gt;CORP\SQLSvc1&lt;/strong&gt; (for &lt;strong&gt;ContosoSQL1&lt;/strong&gt;) or &lt;strong&gt;CORP\SQLSvc2&lt;/strong&gt; (for &lt;strong&gt;ContosoSQL2&lt;/strong&gt;) in &lt;strong&gt;Account Name&lt;/strong&gt;, then fill in and confirm the password, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7673.050113_5F00_0001_5F00_TestLabCrea66.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In the pop-up window, click &lt;strong&gt;Yes&lt;/strong&gt; to restart the SQL Server service. After the SQL Server service is restarted, the changes you made in the properties window are effective.&lt;/li&gt;
&lt;li&gt;Log out of the VM.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Create_Availability_Group"&gt;&lt;/a&gt;Create Availability Group&lt;/h2&gt;
&lt;p&gt;You are now ready to configure an availability group. Below is an outline of what you will do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new database (&lt;strong&gt;MyDB1&lt;/strong&gt;) on &lt;strong&gt;ContosoSQL1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Take both a full backup and a transaction log backup of the database&lt;/li&gt;
&lt;li&gt;Restore the full and log backups to &lt;strong&gt;ContosoSQL2&lt;/strong&gt; with the &lt;strong&gt;NORECOVERY&lt;/strong&gt; option&lt;/li&gt;
&lt;li&gt;Create the availability group (&lt;strong&gt;AG1&lt;/strong&gt;) with synchronous commit, automatic failover, and readable secondary replicas&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Follow the instructions below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you have not already logged out of the remote desktop sessions for &lt;strong&gt;ContosoSQL1&lt;/strong&gt; and &lt;strong&gt;ContosoSQL2&lt;/strong&gt;, do so now.&lt;/li&gt;
&lt;li&gt;Launch the RDP file for &lt;strong&gt;ContosoSQL1&lt;/strong&gt; and log in as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;First, under &lt;strong&gt;C:\&lt;/strong&gt;, create a directory called &lt;strong&gt;backup&lt;/strong&gt;. You will use this directory use to back up and restore your database.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Right-click the new directory, point to &lt;strong&gt;Share with&lt;/strong&gt;, and then click &lt;strong&gt;Specific people&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/8712.050113_5F00_0001_5F00_TestLabCrea67.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Add &lt;strong&gt;CORP\SQLSvc1&lt;/strong&gt; and give it the &lt;strong&gt;Read/Write&lt;/strong&gt; permission, then add &lt;strong&gt;CORP\SQLSvc2&lt;/strong&gt; and give it the &lt;strong&gt;Read&lt;/strong&gt; permission, and then click &lt;strong&gt;Share&lt;/strong&gt;. Once the file sharing process is complete, click &lt;strong&gt;Done&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2870.050113_5F00_0001_5F00_TestLabCrea68.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Next, you create the database. From the &lt;strong&gt;Start&lt;/strong&gt; menu, launch &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt; to connect to the default SQL Server instance.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, right-click &lt;strong&gt;Databases&lt;/strong&gt; and click &lt;strong&gt;New Database&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7658.050113_5F00_0001_5F00_TestLabCrea69.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Database name&lt;/strong&gt;, type &lt;strong&gt;MyDB1&lt;/strong&gt;, then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0207.050113_5F00_0001_5F00_TestLabCrea70.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you take a full backup of the database. In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, expand &lt;strong&gt;Databases&lt;/strong&gt;, then right-click &lt;strong&gt;MyDB1&lt;/strong&gt;, then point to &lt;strong&gt;Tasks&lt;/strong&gt;, and then click &lt;strong&gt;Back Up&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3823.050113_5F00_0001_5F00_TestLabCrea71.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Source&lt;/strong&gt; section, keep &lt;strong&gt;Backup type&lt;/strong&gt; set to &lt;strong&gt;Full&lt;/strong&gt;. In the &lt;strong&gt;Destination&lt;/strong&gt; section, click &lt;strong&gt;Remove&lt;/strong&gt; to remove the default file path for the backup file.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7536.050113_5F00_0001_5F00_TestLabCrea72.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Destination&lt;/strong&gt; section, click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3823.050113_5F00_0001_5F00_TestLabCrea73.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;File name&lt;/strong&gt; text box, type &lt;strong&gt;\\ContosoSQL1\backup\MyDB1.bak&lt;/strong&gt;. Then, click &lt;strong&gt;OK&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt; again to backup the database. When the backup operation completes, click &lt;strong&gt;OK&lt;/strong&gt; again to close the dialog.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4118.050113_5F00_0001_5F00_TestLabCrea74.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, you take a transaction log backup of the database. In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, expand &lt;strong&gt;Databases&lt;/strong&gt;, then right-click &lt;strong&gt;MyDB1&lt;/strong&gt;, then point to &lt;strong&gt;Tasks&lt;/strong&gt;, and then click &lt;strong&gt;Back Up&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6153.050113_5F00_0001_5F00_TestLabCrea75.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Backup&lt;/strong&gt; type, select &lt;strong&gt;Transaction Log&lt;/strong&gt;. Keep the &lt;strong&gt;Destination&lt;/strong&gt; file path set to the one you specified earlier and click &lt;strong&gt;OK&lt;/strong&gt;. Once the backup operation completes, click &lt;strong&gt;OK&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Next, you restore the full and transaction log backups on &lt;strong&gt;ContosoSQL2&lt;/strong&gt;. Launch the RDP file for &lt;strong&gt;ContosoSQL2&lt;/strong&gt; and log in as &lt;strong&gt;CORP\Install&lt;/strong&gt;. Leave the remote desktop session for &lt;strong&gt;ContosoSQL1&lt;/strong&gt; open.&lt;/li&gt;
&lt;li&gt;From the &lt;strong&gt;Start&lt;/strong&gt; menu, launch &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt; to connect to the default SQL Server instance.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, right-click &lt;strong&gt;Databases&lt;/strong&gt; and click &lt;strong&gt;Restore Database&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0383.050113_5F00_0001_5F00_TestLabCrea76.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Source&lt;/strong&gt; section, select &lt;strong&gt;Device&lt;/strong&gt;, and click the &lt;strong&gt;&amp;hellip;&lt;/strong&gt; button.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6237.050113_5F00_0001_5F00_TestLabCrea77.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Select backup devices&lt;/strong&gt;, click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5141.050113_5F00_0001_5F00_TestLabCrea78.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Backup file location&lt;/strong&gt;, type &lt;strong&gt;\\ContosoSQL1\backup&lt;/strong&gt;, then click &lt;strong&gt;Refresh&lt;/strong&gt;, then select &lt;strong&gt;MyDB1.bak&lt;/strong&gt;, then click &lt;strong&gt;OK&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt; again. You should now see the full backup and the log backup in the &lt;strong&gt;Backup sets to restore&lt;/strong&gt; pane.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5732.050113_5F00_0001_5F00_TestLabCrea79.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Go to the &lt;strong&gt;Options&lt;/strong&gt; page, then select &lt;strong&gt;RESTORE WITH NORECOVERY&lt;/strong&gt; in &lt;strong&gt;Recovery state&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt; to restore the database. Once the restore operation completes, click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0361.050113_5F00_0001_5F00_TestLabCrea80.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Now, you create an availability group. Go back to the remote desktop session for &lt;strong&gt;ContosoSQL1&lt;/strong&gt;. In the &lt;strong&gt;Object Explorer&lt;/strong&gt; in SSMS, right-click &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and click &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4643.050113_5F00_0001_5F00_TestLabCrea81.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Introduction&lt;/strong&gt; page, click &lt;strong&gt;Next&lt;/strong&gt;. In the &lt;strong&gt;Specify Availability Group Name&lt;/strong&gt; page, type &lt;strong&gt;AG1&lt;/strong&gt; in &lt;strong&gt;Availability group name&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt; again.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2821.050113_5F00_0001_5F00_TestLabCrea82.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Select Databases&lt;/strong&gt; page, select &lt;strong&gt;MyDB1&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;. The database meets the prerequisites for an availability group because you have taken at least one full backup on the intended primary replica.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3580.050113_5F00_0001_5F00_TestLabCrea83.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Specify Replicas&lt;/strong&gt; page, click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2313.050113_5F00_0001_5F00_TestLabCrea84.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The &lt;strong&gt;Connect to Server&lt;/strong&gt; dialog pops up. Type &lt;strong&gt;ContosoSQL2&lt;/strong&gt; in &lt;strong&gt;Server name&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5621.050113_5F00_0001_5F00_TestLabCrea85.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Back in the &lt;strong&gt;Specify Replicas&lt;/strong&gt; page, you should now see &lt;strong&gt;ContosoSQL2&lt;/strong&gt; listed in &lt;strong&gt;Available Replicas&lt;/strong&gt;. Configure the replicas as shown below. When you are finished, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6607.050113_5F00_0001_5F00_TestLabCrea86.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Select Initial Data Synchronization&lt;/strong&gt; page, select &lt;strong&gt;Join only&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;. You have already performed data synchronization manually when you took the full and transaction backups on &lt;strong&gt;ContosoSQL1&lt;/strong&gt; and restored them on &lt;strong&gt;ContosoSQL2&lt;/strong&gt;. You can instead choose not to perform the backup and restore operations on your database and select &lt;strong&gt;Full&lt;/strong&gt; to let the New Availability Group Wizard perform data synchronization for you. However, this is not recommended for very large databases that are found in some enterprises.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5621.050113_5F00_0001_5F00_TestLabCrea87.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Validation&lt;/strong&gt; page, click &lt;strong&gt;Next&lt;/strong&gt;. This page should look similar to below. There is a warning for the listener configuration because you have not configured an availability group listener. I intentionally skipped that step because availability group listeners are not currently supported in Windows Azure VMs.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2465.050113_5F00_0001_5F00_TestLabCrea88.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Summary&lt;/strong&gt; page, click &lt;strong&gt;Finish&lt;/strong&gt;, then wait while the wizard configures the new availability group. In the &lt;strong&gt;Progress&lt;/strong&gt; page, you can click &lt;strong&gt;More details&lt;/strong&gt; to view the detailed progress. Once the wizard is finished, inspect the &lt;strong&gt;Results&lt;/strong&gt; page to verify that the availability group is successfully created, as shown below, then click &lt;strong&gt;Close&lt;/strong&gt; to exit the wizard.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/5618.050113_5F00_0001_5F00_TestLabCrea89.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, expand &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt;, then expand &lt;strong&gt;Availability Groups&lt;/strong&gt;. You should now see the new availability group in this container. Right-click &lt;strong&gt;AG1 (Primary)&lt;/strong&gt; and click &lt;strong&gt;Show Dashboard&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6170.050113_5F00_0001_5F00_TestLabCrea90.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Your AlwaysOn Dashboard should look similar to the one shown below. You can see the replicas, the failover mode of each replica and the synchronization state.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1563.050113_5F00_0001_5F00_TestLabCrea91.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;From the &lt;strong&gt;Start&lt;/strong&gt; menu, open &lt;strong&gt;Server Manager&lt;/strong&gt; again, then expand &lt;strong&gt;Features&lt;/strong&gt;, then expand &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;, then expand &lt;strong&gt;Cluster1.corp.contoso.com&lt;/strong&gt;, and then expand &lt;strong&gt;Services and applications&lt;/strong&gt;. A new clustered service called &lt;strong&gt;AG1&lt;/strong&gt; has been created in &lt;strong&gt;Cluster1&lt;/strong&gt; to represent the availability group that you just configured. Note that &lt;strong&gt;AG1&lt;/strong&gt; does not have any IP address by which database clients can connect to the availability group, because you did not configure one and because that IP address would not work even if you configured it because the Windows Azure virtual network does not support static IP addresses.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/8814.050113_5F00_0001_5F00_TestLabCrea92.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;CAUTION:&lt;/span&gt; Do not try to fail over this clustered service. All failover operations should be performed from within AlwaysOn Dashboard in SSMS. For more information, see &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx"&gt;http://blogs.msdn.com/b/sqlalwayson/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name="Create_Public_Endpoints_for_Remote_Clients"&gt;&lt;/a&gt;Create Public Endpoints for Remote Clients&lt;/h2&gt;
&lt;p&gt;The new availability group is now online, but it is still not yet accessible from the internet. If your database client, such as an IIS server, runs within the same Windows Azure virtual network, then it is able to connect to the database servers directly within the virtual network and no additional steps are required. However, if your database client runs elsewhere, such as in your corporation's private network, you must open endpoints in Windows Azure to allow database access.&lt;/p&gt;
&lt;p&gt;Follow the steps below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Back in your Windows Azure portal, click &lt;strong&gt;Virtual Machines&lt;/strong&gt;, then click &lt;strong&gt;ContosoSQL1&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7737.050113_5F00_0001_5F00_TestLabCrea93.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the dashboard for &lt;strong&gt;ContosoSQL1&lt;/strong&gt;, click &lt;strong&gt;Endpoints&lt;/strong&gt;, then click &lt;strong&gt;Add Endpoint&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2538.050113_5F00_0001_5F00_TestLabCrea94.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Add Endpoint&lt;/strong&gt; dialog, leave &lt;strong&gt;Add Endpoint&lt;/strong&gt; selected and click the right arrow in the bottom-right corner.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4201.050113_5F00_0001_5F00_TestLabCrea95.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Specify the endpoint details as shown below, then click the check mark in the bottom-right corner to commit the changes.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7750.050113_5F00_0001_5F00_TestLabCrea96.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The private TCP port 1433 is the default port SQL Server uses to accept incoming remote connections. Note also that the public port &lt;strong&gt;1&lt;/strong&gt; is actually opened on the cloud service &lt;strong&gt;ContosoSQLsvc&lt;/strong&gt; which you created in the beginning, which is the only way to access the virtual machines. If you haven't noticed in the remote desktop connections, you have been connecting to different VMs by via the unique ports that Windows Azure has assigned to them within the cloud service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Next, in the Windows Azure portal, click &lt;strong&gt;ContosoSQL2&lt;/strong&gt;, then click &lt;strong&gt;Add Endpoint&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6761.050113_5F00_0001_5F00_TestLabCrea97.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Add Endpoint&lt;/strong&gt; dialog, leave &lt;strong&gt;Add Endpoint&lt;/strong&gt; selected and click the right arrow in the bottom-right corner.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3034.050113_5F00_0001_5F00_TestLabCrea98.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Specify the endpoint details as shown below, then click the check mark in the bottom-right corner to commit the changes. Since port &lt;strong&gt;1&lt;/strong&gt; on cloud service &lt;strong&gt;ContosoSQLsvc&lt;/strong&gt; is already used by &lt;strong&gt;ContosoSQL1&lt;/strong&gt;, you use port &lt;strong&gt;2&lt;/strong&gt; here.&lt;/div&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4188.050113_5F00_0001_5F00_TestLabCrea99.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You are done! You can remotely connect to these servers by pointing to the cloud service and the respective external port: &lt;strong&gt;ContosoSQLsvc.cloudapp.com:1&lt;/strong&gt; for &lt;strong&gt;ContosoSQL1&lt;/strong&gt; and &lt;strong&gt;ContosoSQLsvc.cloudapp.com:2&lt;/strong&gt; for &lt;strong&gt;ContosoSQL2&lt;/strong&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10387693" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Azure/">Windows Azure</category></item><item><title>HADR Tutorials for SQL Server in Windows Azure VMs</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/12/18/hadr-tutorials-for-sql-server-in-windows-azure-vms.aspx</link><pubDate>Tue, 18 Dec 2012 18:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10379150</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10379150</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/12/18/hadr-tutorials-for-sql-server-in-windows-azure-vms.aspx#comments</comments><description>&lt;p&gt;Hi Folks,&lt;/p&gt;
&lt;p&gt;For those interested in how to do SQL Server HADR in Windows Azure VMs, we have published a set of tutorials on Azure Documentation. A conceptual article gives you the overview for the subject and the tutorials show you how to set up specific scenarios end-to-end. The docs are currently in pre-release mode.&lt;/p&gt;
&lt;p&gt;&lt;a title="SQL Server High Availability and Disaster Recovery in Windows Azure Virtual Machines" href="http://msdn.microsoft.com/en-us/library/jj870962.aspx"&gt;SQL Server High Availability and Disaster Recovery in Windows Azure Virtual Machines&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tutorial: AlwaysOn Availability Groups in Windows Azure" href="http://msdn.microsoft.com/en-us/library/jj870963.aspx"&gt;Tutorial: AlwaysOn Availability Groups in Windows Azure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tutorial: AlwaysOn Availability Groups in Hybird IT" href="http://msdn.microsoft.com/en-us/library/jj870959.aspx"&gt;Tutorial: AlwaysOn Availability Groups in Hybird IT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tutorial: Database Mirroring for High Availability in Windows Azure" href="http://msdn.microsoft.com/en-us/library/jj870961.aspx"&gt;Tutorial: Database Mirroring for High Availability in Windows Azure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tutorial: Database Mirroring for Disaster Recovery in Windows Azure" href="http://msdn.microsoft.com/en-us/library/jj870960.aspx"&gt;Tutorial: Database Mirroring for Disaster Recovery in Windows Azure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tutorial: Database Mirroring for Disaster Recovery in Hybrid IT" href="http://msdn.microsoft.com/en-us/library/jj870964.aspx"&gt;Tutorial: Database Mirroring for Disaster Recovery in Hybrid IT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feel free to send your questions and feedback to &lt;a href="mailto:cephalin@microsoft.com?subject=Blog%20post:%20[HADR%20Tutorials%20for%20SQL%20Server%20in%20Windows%20Azure%20VMs]"&gt;cephalin@microsoft.com&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10379150" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Log+Shipping/">Log Shipping</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Azure/">Windows Azure</category></item><item><title>WSFC Cluster Configuration on Windows Azure Virtual Machines</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/12/03/wsfc-cluster-configuration-on-windows-azure-virtual-machines.aspx</link><pubDate>Tue, 04 Dec 2012 00:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10374258</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10374258</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/12/03/wsfc-cluster-configuration-on-windows-azure-virtual-machines.aspx#comments</comments><description>&lt;p&gt;Windows Azure Virtual Machines (VMs)&amp;nbsp;are currently in preview at &lt;a href="http://www.windowsazure.com"&gt;www.windowsazure.com&lt;/a&gt;. SQL Server high availability and disaster recovery solutions are supported on Windows Azure VMs.&lt;/p&gt;
&lt;p&gt;For AlwaysOn Availability Groups, there is currently no support for availability group listeners in Windows Azure. Also, you must work around a DHCP limitation in Windows Azure when creating Windows Server Failover Clustering (WSFC) clusters in Windows Azure. For more information, see &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/14776.configuring-windows-failover-cluster-in-windows-azure-for-alwayson-availability-groups.aspx"&gt;Configuring Windows Failover Cluster in Windows Azure for AlwaysOn Availability Groups&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10374258" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item><item><title>AlwaysOn at SQLPASS 2012</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/11/01/alwayson-at-sqlpass-2012.aspx</link><pubDate>Thu, 01 Nov 2012 01:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10364742</guid><dc:creator>luis vargas [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10364742</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/11/01/alwayson-at-sqlpass-2012.aspx#comments</comments><description>&lt;p&gt;SQLPASS is next week at the Washington State Convention Center (Seattle).&lt;/p&gt;
&lt;p&gt;AlwaysOn will again be a significant aspect.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;ll be many sessions discussing AlwaysOn from Microsoft and MVPs, a mission-critical booth where we&amp;rsquo;ll give guidance to customers, and a demo in the demo theater.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;Wednesday 11/7&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;Sessions&lt;/b&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p&gt;SQL Server 2012 AlwaysOn Availability Groups Drilldown&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Luis Vargas &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;10:15 am &amp;ndash; 11:30 am&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;302-TCC&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;Replication vs. AlwaysOn:&lt;br /&gt;&amp;nbsp; Scalability Solutions with SQL Server 2012&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p class="Default"&gt;Meir Dudai &lt;b&gt;(MVP)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;1:30 pm &amp;ndash; 2:45 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;611&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p&gt;SQLCAT: AlwaysOn HA/DR Design Patterns, Architectures and&lt;br /&gt;&amp;nbsp; Best Practices&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Sanjay Mishra, Mike Weiner &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;3:00 pm &amp;ndash; 4:15 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;609&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;Real-Life SQL 2012&lt;br /&gt;&amp;nbsp; Availability Group Lessons Learned&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Brent Ozar &lt;b&gt;(MVP)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;3:00 pm &amp;ndash; 4:15 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;6E&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p&gt;SQLCAT: AlwaysOn Unplugged &amp;ndash; Everything You Want to Know&lt;br /&gt;&amp;nbsp; About AlwaysOn&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Steve Lindell, Min He, Eric Kang, Sanjay Mishra Goden Yao,&lt;br /&gt;&amp;nbsp; Jean-Yves Devant, Sunil Agarwal, Dan Benediktson, Mahesh Sreenivas, Yuxi Bai,&lt;br /&gt;&amp;nbsp; Matt Neerincx &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;4:45 pm &amp;ndash; 6:00 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;305-TCC&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;SQLCAT: How Does Microsoft&lt;br /&gt;&amp;nbsp; Run Its SAP Landscape on Windows and SQL Server?&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p class="Default"&gt;Juergen Thomas &lt;strong&gt;(Microsoft)&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;4:45 pm &amp;ndash; 6:00 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;307-308&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;Booth&lt;/b&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p&gt;Mission-Critical&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Luis Vargas &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;2:00 pm &amp;ndash; 4:00 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Product Pavilion&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;Thursday 11/8&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;Sessions&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;AlwaysOn: Availability Groups&lt;br /&gt;&amp;nbsp; and Replication Working Together&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Jean-Yves Devant&lt;b&gt; (Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;1:30 pm &amp;ndash; 2:45 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;302-TCC&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;SQLCAT: SQL&lt;br /&gt;&amp;nbsp; Server 2012 AlwaysOn HA/DR Customer Panel&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p class="Default"&gt;Sanjay Mishra &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;p class="Default"&gt;Ayad Shammout, David Smith,&lt;br /&gt;&amp;nbsp; Michael Steineke,&amp;nbsp; Thomas Grohser, Wolfgang Kutschera &lt;b&gt;(MVPs)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;5:00 pm &amp;ndash; 6:15 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;608&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;Demo Theater&lt;/b&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p&gt;Using SQL Server 2012 AlwaysOn&lt;br /&gt;&amp;nbsp; Availability Groups for cost-effective high availability and disaster&lt;br /&gt;&amp;nbsp; recovery&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Luis Vargas &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;12:00 pm &amp;ndash; 12:30 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;Product Pavilion&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;Friday 11/9&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;Sessions&lt;/b&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;SQL Server in Azure VM&lt;br /&gt;&amp;nbsp; patterns: Hybrid DR, data movement and BI&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p class="Default"&gt;Guy Bowerman, Ross LoForte &lt;b&gt;(Microsoft)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;9:45 am &amp;ndash; 11:00 am&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="425"&gt;
&lt;p class="Default"&gt;The Good, Bad, and Ugly of&lt;br /&gt;&amp;nbsp; Deploying AlwaysOn Availability Groups&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p class="Default"&gt;Allan Hirt, David Smith,&lt;br /&gt;&amp;nbsp; Michael Steineke &lt;b&gt;(MVPs)&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;1:00 pm &amp;ndash; 2:15 pm&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="399"&gt;
&lt;p&gt;615-617&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10364742" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQLPASS/">SQLPASS</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/PASS/">PASS</category></item><item><title>How To: Migrate to AlwaysOn from Prior Deployments Combining Database Mirroring and Log Shipping – Part 2</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-2.aspx</link><pubDate>Tue, 16 Oct 2012 16:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10360050</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10360050</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-2.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Contributors: &lt;/strong&gt;Oleg Bulanyy (Microsoft), Jimmy May (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This blog is the continuation of a blog series that shows you how to perform the following end-to-end HADR migration scenario of SQL Server inside a test environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From a SQL Server 2008 R2 solution: &lt;strong&gt;Database mirroring&lt;/strong&gt; for high availability and &lt;strong&gt;log shipping&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;li&gt;To a SQL Server 2012 solution: &lt;strong&gt;Availability Group&lt;/strong&gt; for both high availability and disaster recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-1.aspx"&gt;How To: Migrate to AlwaysOn AlwaysOn from Prior Deployments Combining Database Mirroring and Log Shipping &amp;ndash; Part 1&lt;/a&gt;, you created the base configuration. In this installment, you will apply the migration steps to the base configuration you created. Without further delay, let's start!&lt;/p&gt;
&lt;h2&gt;Step 1: Upgrade Log Shipping Secondary Database Server&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The first step in the migration process is to upgrade the log shipping secondary database server (&lt;strong&gt;REMOTE1&lt;/strong&gt;). If this server is a hot standby server (databases restored with the WITH STANDBY option), then you must first reconfigure all restore jobs to use the WITH NORECOVERY option before you can proceed. In this case, you have already configured the restore jobs to use the WITH NORECOVERY option, so you can simply proceed with the migration.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to &lt;strong&gt;REMOTE1&lt;/strong&gt; as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Run SQL Server Setup to upgrade the default SQL Server instance to &lt;strong&gt;SQL Server 2012&lt;/strong&gt;. For more information, see &lt;span style="color: #0563c1; text-decoration: underline;"&gt;Prerequisites&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Verify that the log shipping copy and restore jobs continue to run.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Server Manager&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/cc770506.aspx"&gt;add the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="http://support.microsoft.com/kb/2494036"&gt;KB 2494036&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 2: Upgrade the Witness Server&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The next server to be upgraded is the witness server in the database mirroring configuration (&lt;strong&gt;WITNESS&lt;/strong&gt;). Note that when upgrading the servers in the database mirroring configuration, you are asked to remove &lt;strong&gt;WITNESS&lt;/strong&gt; from the database mirroring session and rejoin it to the session multiple times. This procedure is based on the assumption that the upgrade process takes multiple days due to the additional verification steps you may wish to take after each server is upgraded. In this case, it is best to retain the automatic failover capability offered by &lt;strong&gt;WITNESS&lt;/strong&gt; in the database mirroring session. However, if you plan to complete the upgrade within a few hours, there are multiple possible paths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove &lt;strong&gt;WITNESS&lt;/strong&gt; from the session, then proceed to upgrade &lt;strong&gt;PRIMARY1 &lt;/strong&gt;and &lt;strong&gt;PRIMARY2&lt;/strong&gt; while upgrading &lt;strong&gt;WITNESS&lt;/strong&gt;, and then rejoin &lt;strong&gt;WITNESS&lt;/strong&gt; to the session.&lt;/li&gt;
&lt;li&gt;Remove &lt;strong&gt;WITNESS&lt;/strong&gt; from the session permanently. Upgrade &lt;strong&gt;PRIMARY1 &lt;/strong&gt;and &lt;strong&gt;PRIMARY2&lt;/strong&gt;, and then configure the availability group immediately.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When making a decision on your specific upgrade path, consider carefully how your decision changes the HADR capabilities of your system before, during, and after each upgrade step.&lt;/p&gt;
&lt;p&gt;Follow the steps below to upgrade &lt;strong&gt;WITNESS&lt;/strong&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to &lt;strong&gt;WITNESS&lt;/strong&gt; as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Run SQL Server Setup to upgrade the default SQL Server instance to &lt;strong&gt;SQL Server 2012&lt;/strong&gt;. For more information, see &lt;span style="color: #0563c1; text-decoration: underline;"&gt;Prerequisites&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Verify that both &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt; are reconnected to &lt;strong&gt;WITNESS&lt;/strong&gt; in the database mirroring session.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 3: Upgrade the Mirror Database Server&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The next server to be upgraded is the mirror server in the database mirroring configuration (&lt;strong&gt;PRIMARY2&lt;/strong&gt;).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;strong&gt;PRIMARY1&lt;/strong&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/ms191519.aspx"&gt;remove&lt;/a&gt; the &lt;strong&gt;WITNESS&lt;/strong&gt; server from the database mirroring configuration.&lt;/li&gt;
&lt;li&gt;Log in to &lt;strong&gt;PRIMARY2&lt;/strong&gt; as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Run SQL Server Setup to upgrade the default SQL Server instance to &lt;strong&gt;SQL Server 2012&lt;/strong&gt;. For more information, see &lt;span style="color: #0563c1; text-decoration: underline;"&gt;Prerequisites&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Verify that the database mirroring session is synchronized.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms365603.aspx"&gt;Return&lt;/a&gt; the &lt;strong&gt;WITNESS&lt;/strong&gt; server to the database mirroring configuration.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Server Manager&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/cc770506.aspx"&gt;add the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="http://support.microsoft.com/kb/2494036"&gt;KB 2494036&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 4: Upgrade the Primary Database Server&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The next server to be upgraded is the primary server in the database mirroring configuration (&lt;strong&gt;PRIMARY1&lt;/strong&gt;). This step involves failing over the databases to &lt;strong&gt;PRIMARY2&lt;/strong&gt;, which has been upgraded to SQL Server 2012. Once the failover happens, the database mirroring session is suspended because data cannot move down SQL Server versions, resulting in growth of the transaction logs on &lt;strong&gt;PRIMARY2&lt;/strong&gt; (risking disk space exhaustion) until &lt;strong&gt;PRIMARY1&lt;/strong&gt; is upgraded to the same SQL Server version. Furthermore, if an automatic failover to &lt;strong&gt;PRIMARY2&lt;/strong&gt; occurs due to a failure, you cannot fail over the databases back to &lt;strong&gt;PRIMARY1&lt;/strong&gt; (no high availability) until &lt;strong&gt;PRIMARY1&lt;/strong&gt; is upgraded to the same SQL Server version. Therefore, make sure that you are ready to complete this upgrade step immediately once you failover the databases.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; of &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt; from &lt;strong&gt;PRIMARY1&lt;/strong&gt; to &lt;strong&gt;PRIMARY2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms191519.aspx"&gt;Remove&lt;/a&gt; the &lt;strong&gt;WITNESS&lt;/strong&gt; server from the database mirroring configuration.&lt;/li&gt;
&lt;li&gt;Log in to &lt;strong&gt;PRIMARY1&lt;/strong&gt; as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Run SQL Server Setup to upgrade the default SQL Server instance to &lt;strong&gt;SQL Server 2012&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms190664.aspx"&gt;Resume&lt;/a&gt; the database mirroring session for the two databases, and then verify that the database mirroring session is synchronized.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms365603.aspx"&gt;Return&lt;/a&gt; the &lt;strong&gt;WITNESS&lt;/strong&gt; server into the database mirroring configuration for both databases&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; of &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt; from &lt;strong&gt;PRIMARY2&lt;/strong&gt; to &lt;strong&gt;PRIMARY1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Server Manager&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/cc770506.aspx"&gt;add the &lt;strong&gt;Failover Clustering&lt;/strong&gt; feature&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="http://support.microsoft.com/kb/2494036"&gt;KB 2494036&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At the end of these steps, you have the same HADR configuration that you started with, with the exception that all servers are running SQL Server 2012.&lt;/p&gt;
&lt;h2&gt;Step 5: Create a WSFC cluster&lt;/h2&gt;
&lt;h3&gt;Domain Configuration&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Domain Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You use CORP\Install to create and configure the WSFC cluster. In order for you to successfully create and run the cluster, this account needs to be configured to have the necessary permissions. Follow the steps below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;strong&gt;DC&lt;/strong&gt;, open &lt;strong&gt;Active Directory Users and Computers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;View&lt;/strong&gt; menu, select &lt;strong&gt;Advanced Features&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong&gt;corp.contoso.com&lt;/strong&gt; and click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Security&lt;/strong&gt; tab. If you have not selected the &lt;strong&gt;Advanced Features&lt;/strong&gt; option previously, this tab is not visible.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Advanced&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Advanced Security Settings for corp&lt;/strong&gt; dialog, click &lt;strong&gt;Add&lt;/strong&gt;, then type &lt;strong&gt;CORP\Install&lt;/strong&gt; in the text box to add a security object for the account.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Allow&lt;/strong&gt; check box for the &lt;strong&gt;Create Computer Objects&lt;/strong&gt; permission.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;, then click &lt;strong&gt;OK&lt;/strong&gt; again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It is possible to set a more restricted permissions set for the WSFC cluster and clustered service. For more information, see &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/06/05/configure-windows-failover-clustering-for-sql-server-availability-group-or-fci-with-limited-security.aspx"&gt;Configure Windows Failover Clustering for SQL Server (Availability Group or FCI) with Limited Security&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Cluster Configuration&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before configuring the availability group, you must create a WSFC cluster that includes &lt;strong&gt;PRIMARY1&lt;/strong&gt;, &lt;strong&gt;PRIMARY2&lt;/strong&gt;, and &lt;strong&gt;REMOTE1&lt;/strong&gt;. In this scenario, you use &lt;strong&gt;Node and File Share Majority&lt;/strong&gt; for the WSFC quorum while removing the quorum vote from &lt;strong&gt;REMOTE1&lt;/strong&gt;. This setup gives your WSFC quorum three votes at the primary site to ensure that the cluster is online in the event of a single-machine failure.&lt;/p&gt;
&lt;p&gt;In a WSFC cluster, quorum health is paramount to the availability of the WSFC cluster and, consequently, of the availability group it hosts. Optimal quorum health not only determines whether an availability group has high availability, but also whether it is available at all. Make sure that you have full understanding of the WSFC quorum before attempting to configure an availability group on your production database servers. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh781257.aspx"&gt;Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to any one of the following three servers as &lt;strong&gt;CORP\Install&lt;/strong&gt;: &lt;strong&gt;PRIMARY1&lt;/strong&gt;, &lt;strong&gt;PRIMARY2&lt;/strong&gt;, or &lt;strong&gt;REMOTE1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Create a new failover cluster with the following PowerShell commands (run with administrative privileges).&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Import-Module FailoverClusters &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;New-Cluster -Name SQLServer2012 -Node PRIMARY1,PRIMARY2,REMOTE1 &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Create a share folder on &lt;strong&gt;WITNESS&lt;/strong&gt; called &lt;a href="file:///\\WITNESS\WSFCQuorum"&gt;\\WITNESS\WSFCQuorum&lt;/a&gt; and grant the &lt;strong&gt;SQLServer2012$&lt;/strong&gt; computer account &lt;strong&gt;Read/Write&lt;/strong&gt; access to the folder. The &lt;strong&gt;SQLServer2012$&lt;/strong&gt; cluster account was created when you created the cluster in the previous step. It must be able to manipulate the file share witness before you can successfully configure the file share majority quorum.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set the quorum mode and test the cluster with the following PowerShell commands:&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Set-ClusterQuorum -NodeAndFileShareMajority \\WITNESS\WSFCQuorum &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Test-Cluster &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Remove the default quorum vote from &lt;strong&gt;REMOTE1&lt;/strong&gt; using the following PowerShell command:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;(Get-ClusterNode "REMOTE1").NodeWeight = 0 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The quorum for the &lt;strong&gt;SQLServer2012&lt;/strong&gt; cluster should now look as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PRIMARY1&lt;/strong&gt;: 1 vote&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PRIMARY2&lt;/strong&gt;: 1 vote&lt;/li&gt;
&lt;li&gt;File Share Witness: 1 vote&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;REMOTE1&lt;/strong&gt;: 0 vote&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: The default quorum model, where each server has one vote without a file share witness, is technically an acceptable configuration. If intersite network fails, the primary site has node majority. Moreover, if any one of the three cluster nodes fails, the cluster still has node majority. However, the quorum model you configure here is a best-practice configuration that always gives the disaster recovery site zero votes while ensuring that the primary site has node majority in the event of a single-node failure. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh781257.aspx"&gt;Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 6: Configure the Availability Group&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Finally, you configure the availability group to complete your migration process.&lt;/p&gt;
&lt;p&gt;While the &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt; gives you the option to prepare the secondary replicas by taking the necessary backups, it is not designed for very large databases that may exist in a Tier-1 environment. For very large databases, it is recommended that you manually prepare the secondary replicas in the same way you prepare mirror databases in a database mirroring configuration. This preparation involves taking a full backup and the most recent log backup of your databases and restore them with the WITH NO RECOVERY option on the intended secondary replica servers. However, &lt;strong&gt;PRIMARY2&lt;/strong&gt; already has a synchronized copy of the databases, and &lt;strong&gt;REMOTE1&lt;/strong&gt; is already restoring the shipped logs. The existing configuration reduces the amount of work required to fully configure the availability group.&lt;/p&gt;
&lt;h3&gt;Enable AlwaysOn Availability Groups Feature&lt;/h3&gt;
&lt;p&gt;You must first &lt;a href="http://technet.microsoft.com/en-us/library/ff878259(v=sql.110).aspx"&gt;enable the AlwaysOn Availability Groups feature&lt;/a&gt; for each SQL Server instance.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;strong&gt;REMOTE1&lt;/strong&gt;, enable the &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; feature and restart the SQL Server instance.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;PRIMARY2&lt;/strong&gt;, enable the &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; feature and restart the SQL Server instance.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;PRIMARY1&lt;/strong&gt;, enable the &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; feature and restart the SQL Server instance. This action causes an automatic failover of the two databases to &lt;strong&gt;PRIMARY2&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;strong&gt;AlwaysOn Availability Group&lt;/strong&gt; tab on each of your servers should look similar to the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4572.101612_5F00_1635_5F00_HowToMigrat1.png" /&gt;&lt;/p&gt;
&lt;p&gt;At the end of these steps, &lt;strong&gt;PRIMARY2&lt;/strong&gt; is the principal database server in the database mirroring configuration and the primary server in the log shipping configuration.&lt;/p&gt;
&lt;h3&gt;Configure the Availability Group&lt;/h3&gt;
&lt;p&gt;Perform the following steps to configure the availability group:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms189071.aspx"&gt;Remove the log shipping configuration&lt;/a&gt; on &lt;strong&gt;PRIMARY2&lt;/strong&gt; (and on &lt;strong&gt;REMOTE1&lt;/strong&gt;, as a side effect) for both database &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; of both databases back to &lt;strong&gt;PRIMARY1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms189071.aspx"&gt;Remove the log shipping configuration&lt;/a&gt; on &lt;strong&gt;PRIMARY1&lt;/strong&gt; for both databases. Make sure that the log tail is restored on &lt;strong&gt;REMOTE1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms190471.aspx"&gt;Remove the database mirroring sessions&lt;/a&gt; for both databases.&lt;/div&gt;
&lt;p&gt;The console application on &lt;strong&gt;CLIENT&lt;/strong&gt; should continue to show &lt;span style="color: black; font-family: Courier New; font-size: 9pt; background-color: #dddddd;"&gt;Success:...&lt;/span&gt; for write access. The connection string currently used by the application continues to work because it points to &lt;strong&gt;PRIMARY1&lt;/strong&gt; in the&lt;span style="font-family: Courier New; font-size: 9pt;"&gt; Server &lt;/span&gt;parameter, which was the principal database server before you removed the database mirroring configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;On &lt;strong&gt;REMOTE1&lt;/strong&gt;, open the default port used by SQL Server for AlwaysOn Availability Groups, with the following command. Notice it is the same as the default database mirroring port. Remember that you already opened these ports on &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt;.&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server HADR (TCP-In)' dir=in action=allow protocol=TCP localport=5022 profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;While connected to &lt;strong&gt;PRIMARY1&lt;/strong&gt; in &lt;strong&gt;SSMS&lt;/strong&gt;, right-click &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and click &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt;, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Availability group name&lt;/strong&gt; box, type &lt;strong&gt;AG1&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Replicas&lt;/strong&gt; tab, click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Server name&lt;/strong&gt; box, type &lt;strong&gt;PRIMARY2&lt;/strong&gt;, and then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Replicas&lt;/strong&gt; tab, click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Server name&lt;/strong&gt; box, type &lt;strong&gt;REMOTE1&lt;/strong&gt;, and then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-top: 0;"&gt;Configure the three server instances as shown below.&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 117px;" /&gt;&lt;col style="width: 117px;" /&gt;&lt;col style="width: 117px;" /&gt;&lt;col style="width: 117px;" /&gt;&lt;col style="width: 117px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Server Instance&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Initial Role&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Automatic Failover&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Synchronous Commit&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Readable Secondary&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Primary&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Secondary&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;REMOTE1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Secondary&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-bottom: 0;"&gt;Accept default settings in the &lt;strong&gt;Endpoints&lt;/strong&gt; tab. The ports used for the endpoints should be 5022, the same as the ones previously configured for database mirroring.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Backup Preferences&lt;/strong&gt; tab, keep the default &lt;strong&gt;Prefer Secondary&lt;/strong&gt; option and configure the following priority settings for the replicas:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PRIMARY1&lt;/strong&gt;: &lt;strong&gt;50&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PRIMARY2&lt;/strong&gt;: &lt;strong&gt;50&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;REMOTE1&lt;/strong&gt;: &lt;strong&gt;60&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By giving &lt;strong&gt;REMOTE1&lt;/strong&gt; higher priority, this configuration keeps the backup workload off the automatic failover set (&lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This configuration alone does not actually cause any backup job to run. You still need to configure the desired backup jobs on each availability replica. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh710053.aspx"&gt;Configure Backup on Availability Replicas (SQL Server)&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Listener&lt;/strong&gt; tab, select &lt;strong&gt;Create an availability group listener&lt;/strong&gt;, and then specify the following settings for the listener:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Listener DNS Name&lt;/strong&gt;: &lt;strong&gt;AG1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Port&lt;/strong&gt;: &lt;strong&gt;10000&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Mode&lt;/strong&gt;: &lt;strong&gt;Static IP&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv4 Address&lt;/strong&gt; for 10.1.1/24: &lt;strong&gt;10.1.1.111&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv4 Address&lt;/strong&gt; for 10.2.2/24: &lt;strong&gt;10.2.2.222&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Join only&lt;/strong&gt; for data synchronization preference, and then click &lt;strong&gt;Next&lt;/strong&gt;. You use the mirror databases and log shipping secondary databases from the previous configuration as secondary replicas, which all have recently restored log backups, so you do not need to synchronize data.&lt;/li&gt;
&lt;li&gt;Once validation finishes without errors, click &lt;strong&gt;Next&lt;/strong&gt;, then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The console application on &lt;strong&gt;CLIENT&lt;/strong&gt; should continue to show &lt;span style="color: black; font-family: Courier New; font-size: 9pt; background-color: #dddddd;"&gt;Success:...&lt;/span&gt;. However, with the current availability group configuration, the&lt;span style="font-family: Courier New; font-size: 9pt;"&gt; Failover Partner &lt;/span&gt;parameter is only a dummy parameter. For conditions where the&lt;span style="font-family: Courier New; font-size: 9pt;"&gt; Failover Partner &lt;/span&gt;parameter can continue to work with an availability group, see &lt;a href="http://msdn.microsoft.com/en-us/library/jj635217"&gt;Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping Par I &amp;ndash; Prescriptive Guidance&lt;/a&gt; (http://msdn.microsoft.com/en-us/library/jj635217). In this situation, you must reconfigure the client application to ensure that your application is highly available.&lt;/p&gt;
&lt;p&gt;Once the availability group configuration is finished, you can monitor the availability group health in SSMS by right-clicking &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and selecting &lt;strong&gt;Show Dashboard&lt;/strong&gt;. For an example, see the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2438.101612_5F00_1635_5F00_HowToMigrat2.png" /&gt;&lt;/p&gt;
&lt;p&gt;You can also view the WSFC cluster information in the &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;, as shown in the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3286.101612_5F00_1635_5F00_HowToMigrat3.png" /&gt;&lt;/p&gt;
&lt;p&gt;The availability group (&lt;strong&gt;AG1&lt;/strong&gt;) runs inside the WSFC cluster as a clustered service. &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt;, which are in the automatic failover set, are the preferred owners of &lt;strong&gt;AG1&lt;/strong&gt;. The IP addresses for the availability group listener are in an OR configuration, where one IP address is online at any given time, depending on which subnet the primary replica resides. The WSFC service manages aspects the resource group ownership and monitors the quorum health for the availability group.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;: Other than quorum model and health management, you should avoid modifying the clustered service properties of the availability group in the Failover Cluster Manager. For example, &lt;em&gt;do not perform availability group failovers using the Failover Cluster Manager&lt;/em&gt;. SSMS is the user interface you should use for availability group management, such as performing failovers, adding and removing replicas and databases, and managing availability group listeners. For more information, see &lt;a href="http://sqlcat.com/sqlcat/b/msdnmirror/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx)"&gt;DO NOT use Windows Failover Cluster Manager to perform Availability Group Failover&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Reconfigure the Client Application&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Application Developer &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you reconfigure your client application to point to the new availability group listener. The availability group listener is not the only way to connect to the databases. You can also connect directly to the databases on any one of the server instances. For example, you can connect directly to &lt;strong&gt;test1&lt;/strong&gt; on &lt;strong&gt;PRIMARY2&lt;/strong&gt; for read-only workload using&lt;span style="font-family: Courier New; font-size: 9pt;"&gt; Server=PRIMARY2;Initial Catalog=test1&lt;/span&gt;. AlwaysOn Availability Groups also support new connection string keywords. For more information on client connectivity for AlwaysOn Availability Groups, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213417(v=sql.110).aspx"&gt;Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you have not already done so, close the running console application on &lt;strong&gt;CLIENT&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Program.cs&lt;/strong&gt;, locate the following line:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=PRIMARY1;Failover Partner=PRIMARY2;Initial Catalog=test1;Integrated Security=True"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Replace this line with the following code to use the availability group listener and port number you configured:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=tcp:AG1,10000;Database=test1;IntegratedSecurity=SSPI"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Run the application again by opening the &lt;strong&gt;Debug&lt;/strong&gt; menu and clicking &lt;strong&gt;Start Debugging&lt;/strong&gt;. The console application on &lt;strong&gt;CLIENT&lt;/strong&gt; should now show &lt;span style="color: black; font-family: Courier New; font-size: 9pt; background-color: #dddddd;"&gt;Success:...&lt;/span&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;You're Done!&lt;/h2&gt;
&lt;p&gt;Congratulations! You have successfully migrated your HADR solution to AlwaysOn Availability Groups. Note that &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; still does not have access to the databases on the &lt;strong&gt;REMOTE1&lt;/strong&gt; instance. However, if you fail over the availability group to &lt;strong&gt;REMOTE1&lt;/strong&gt; in order to add the necessary permissions, you risk the possibility of data loss because &lt;strong&gt;REMOTE1&lt;/strong&gt; hosts an asynchronous replica. I would recommend that you simply incorporate this step into your disaster recovery plan.&lt;/p&gt;
&lt;p&gt;Remember, the steps I present here may be much different from what you must implementyou're your particular migration scenario, but I hope it has given you a framework whereupon you can build the details. Whatever path you take to migrate your solution to SQL Server AlwaysOn, be sure to test your particular migration scenario extensively, including rehearsing failover scenarios and disaster recovery scenarios, &lt;em&gt;before&lt;/em&gt; performing the migration on your production system.&lt;/p&gt;
&lt;p&gt;Also, I have not shown you the new workloads that are possible with your new SQL Server AlwaysOn solution, such as using the read-only secondary replica for read workloads. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213417(v=sql.110).aspx"&gt;Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10360050" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Log+Shipping/">Log Shipping</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item><item><title>How To: Migrate to AlwaysOn AlwaysOn from Prior Deployments Combining Database Mirroring and Log Shipping – Part 1</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-1.aspx</link><pubDate>Tue, 16 Oct 2012 15:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10360031</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10360031</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-1.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Contributors: &lt;/strong&gt;Oleg Bulanyy (Microsoft), Jimmy May (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This blog series is a follow-up to my whitepaper &lt;a href="http://msdn.microsoft.com/en-us/library/jj635217.aspx"&gt;Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping&lt;/a&gt;. In this series, I will walk you through the following end-to-end migration scenario inside a test environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From a SQL Server 2008 R2 solution: &lt;strong&gt;Database mirroring&lt;/strong&gt; for high availability and &lt;strong&gt;log shipping&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;li&gt;To a SQL Server 2012 solution: &lt;strong&gt;Availability Group&lt;/strong&gt; for both high availability and disaster recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before I go further, l want to refer you to a whitepaper &lt;a href="http://msdn.microsoft.com/en-us/library/jj191711.aspx"&gt;AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using AlwaysOn Availability Groups&lt;/a&gt;. This is a great architectural guide for anyone who is interested about the end-to-end deployment of the AlwaysOn scenario I'm discussing in this blog.&lt;/p&gt;
&lt;h2&gt;How to Use This Blog Series&lt;/h2&gt;
&lt;p&gt;This is a disclaimer similar to the one I have in &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-1.aspx"&gt;How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn&lt;/a&gt;. My walkthrough steps are to help people get started on implementing a end-to-end migration scenario in a &lt;em&gt;test environment.&lt;/em&gt; I have already published prescriptive guidance on the migration scenario in &lt;a href="http://msdn.microsoft.com/en-us/library/jj635217.aspx"&gt;Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping&lt;/a&gt;. If you are a database architect seeking guidance on migrating your production system to SQL Server AlwaysOn, I advise you to look there first. If you are a database administrator who needs help to get started on migrating your company's database system to SQL Server AlwaysOn, then my blog is for you. To expedite the testing phase of you migration scenario, I recommend that you walk through the entirety of this blog series, which can help you recognize and avoid many issues that can trip you up along the way. Once you have successfully completed the walkthrough in your test environment, you will know what success looks for a generalized scenario. The next natural step continue the testing phase with the specification of your SQL Server deployment.&lt;/p&gt;
&lt;p&gt;I cannot emphasize enough: &lt;strong&gt;DO NOT&lt;/strong&gt; apply these migration steps blindly to your production system. To minimize the risks of your actual migration to SQL Server AlwaysOn, test these steps thoroughly against every aspect of your SQL Server deployment (I repeat, &lt;em&gt;in a test environment&lt;/em&gt;) and incorporate all the necessary tweaks to accommodate your specific scenario.&lt;/p&gt;
&lt;h2&gt;Migration Walkthrough Overview&lt;/h2&gt;
&lt;p&gt;You will walk through the migration procedures as covered in &lt;a href="http://msdn.microsoft.com/en-us/library/jj635217"&gt;Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping Par I &amp;ndash; Prescriptive Guidance&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following table outlines the starting point and the end point of the walkthrough.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 282px;" /&gt;&lt;col style="width: 282px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a; font-family: Arial;"&gt;&lt;strong&gt;Start&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a; font-family: Arial;"&gt;&lt;strong&gt;End&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;PRIMARY1, PRIMARY2, and WITNESS in Subnet1, implementing database mirroring for local high availability &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;REMOTE1 in Subnet2, shipping logs from PRIMARY1 and PRIMARY2 for remote disaster recovery&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;td style="border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;One availability group on PRIMARY1, PRIMARY2, and REMOTE1 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;PRIMARY1 as primary replica &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;PRIMARY2 as synchronous secondary replica &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;REMOTE1 as asynchronous secondary replica&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The four stages of migration as covered in the whitepaper are as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Online upgrade of the log shipping secondary database server (REMOTE1).&lt;/li&gt;
&lt;li&gt;Online upgrade of the mirror database server (PRIMARY2).&lt;/li&gt;
&lt;li&gt;Online upgrade of the principal database server (PRIMARY1).&lt;/li&gt;
&lt;li&gt;Configuration of an availability group.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you build the base configuration I prescribe here, you will find a clear path to success in the migration procedure. You can instead use your existing HADR solution as the base configuration, but just realize that I cannot guarantee that my migration steps will work as-is with your HADR solution. In all likelihood, you will need to tweaks as you follow along. Make sure that you test the migration steps thoroughly before attempting the same steps on your production environment.&lt;/p&gt;
&lt;p&gt;As client connectivity is an important part of the migration scenario, you will simulate a client workload on the database system to test the HADR capabilities of the system before, during, and after the migration process. In addition, the client workload is used to demonstrate how to configure client applications to work with AlwaysOn Availability Groups.&lt;/p&gt;
&lt;h3&gt;Industry Best Practices&lt;/h3&gt;
&lt;p&gt;You should observe all industry best practices in the implementation of your HADR system in general. For example, network redundancy is crucial for a production environment to circumvent outages due to network anomalies. You may notice that I simplify such elements especially in some screenshots, so that they don't become a distraction from the migration steps themselves. &lt;strong&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Success Criteria&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;This walkthrough attempts to balance between a real-life migration environment and requirements and the generalized use case. While it does not possess the complexity of a real-life scenario, a few common migration criteria are included.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maintain separation of roles, where applicable (domain administrator, database administrator, application developer).&lt;/li&gt;
&lt;li&gt;Minimize downtime during migration.&lt;/li&gt;
&lt;li&gt;Approximate the high availability and disaster recovery capabilities during migration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;To prepare the base configuration, you need the following hardware and/or software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardware to implement the network topology, including servers, switches, and so on. You can simulate the network topology using Hyper-V.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx"&gt;Windows Server 2008 R2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SQL Server 2008 R2 SP1 (see note below)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/express"&gt;Visual Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/cc442495"&gt;Windows 7&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To complete the migration process successfully, you need the following additional software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SQL Server 2012 (see note below)&lt;/li&gt;
&lt;li&gt;&lt;a href="file:///C:\Users\olegb\AppData\Local\Microsoft\Windows\Temporary%20Internet%20Files\Content.Outlook\2LZKYT7Q\KB%202494036"&gt;KB 2494036&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: For more information on all supported version upgrades, see &lt;a href="http://technet.microsoft.com/en-us/library/ms143393.aspx"&gt;Supported Version and Edition Upgrades&lt;/a&gt;. The in-place upgrade described in this blog series does not support upgrade paths from or to Evaluation Editions of SQL Server. Furthermore, you must use an edition of SQL Server that supports database mirroring, log shipping, and AlwaysOn Availability Groups where applicable. The minimum license requirement for completing the walkthrough is summarized below.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 193px;" /&gt;&lt;col style="width: 282px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;SQL Server Developer&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;PRIMARY1, PRIMARY2, and REMOTE1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;SQL Server Express&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;WITNESS&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/cc645993.aspx"&gt;Features Supported by the Editions of SQL Server 2012&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Step 0: Setup Base Configuration&lt;/h2&gt;
&lt;p&gt;So, let's start!&lt;/p&gt;
&lt;p&gt;First, you implement the network topology shown in the diagram below. The two subnets simulate the two sites in Contoso Corporation. The client machine simulates a write workload on the SQL Server instances during the migration process.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3107.101612_5F00_1542_5F00_HowToMigrat1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The walkthrough steps focus on the software configuration on the server nodes and not on the implementation of the network topology.&lt;/p&gt;
&lt;h3&gt;Set up the Domain Controller and Accounts&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Domain Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc753100(v=ws.10).aspx"&gt;Set up the domain controller&lt;/a&gt;(DC) for DNS service with the domain specifications below.&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Domain Name&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;FQDN&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;corp.contoso.com&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc784390(v=WS.10).aspx"&gt;Create the domain &lt;strong&gt;user&lt;/strong&gt; accounts&lt;/a&gt; show below:&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Domain Administrator&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\Administrator&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;SQL Installation&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\Install&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Database Administrator&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\DBAdmin&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Client Application&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLClient&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;SQL Service Accounts&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc3 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc4 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent3 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent4&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Deploy SQL Server 2008 R2 Solution&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Perform the following steps on &lt;strong&gt;PRIMARY1&lt;/strong&gt;, &lt;strong&gt;PRIMARY2&lt;/strong&gt;, &lt;strong&gt;WITNESS&lt;/strong&gt;, and &lt;strong&gt;REMOTE1&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href="http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx"&gt;Windows Server 2008 R2&lt;/a&gt; SP1, and then join the machine to the domain.&lt;/li&gt;
&lt;li&gt;Give &lt;strong&gt;CORP\Install&lt;/strong&gt; administrative privileges on the local machine.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the default SQL Server 2008 R2 instance with the respective service accounts shown below.&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 162px;" /&gt;&lt;col style="width: 162px;" /&gt;&lt;col style="width: 162px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Machine&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;SQL Service Account&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;SQL Agent Account&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLAgent1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLSvc2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLAgent2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;WITNESS&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLSvc3&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLAgent3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;REMOTE1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLSvc4&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQLAgent4&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the firewall for remote access of the default SQL Server instance with the following command:&lt;/p&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server (TCP-In)' dir=in action=allow protocol=TCP localport=1433 profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;SQL Server Configuration Manager&lt;/strong&gt;, under the &lt;strong&gt;SQL Server Network Configuration&lt;/strong&gt; node, enable the TCP/IP protocol.&lt;/li&gt;
&lt;li&gt;Restart the database instance.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Create Databases and Configure Database Mirroring&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Perform the following steps to create the databases and configure database mirroring sessions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;On both &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt;, open port 5022, the default port SQL Server uses for database mirroring with the following command:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server Mirroring (TCP-In)' dir=in action=allow protocol=TCP localport=5022 profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt; (SSMS), &lt;a href="http://technet.microsoft.com/en-us/library/ms186312.aspx"&gt;create two databases&lt;/a&gt; on &lt;strong&gt;PRIMARY1&lt;/strong&gt;, named &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms188264.aspx"&gt;Create a table&lt;/a&gt; in both &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt;, called &lt;strong&gt;table1&lt;/strong&gt;, using the following script:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;CREATE TABLE dbo.table1(col1 nchar(10), col2 nchar(10)) &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms189053.aspx"&gt;Prepare the mirror databases&lt;/a&gt; for &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt; on &lt;strong&gt;PRIMARY2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-top: 0;"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms188712.aspx"&gt;Establish the database mirroring sessions&lt;/a&gt; on the two databases using the specifications below.&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 253px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Role&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://primary1.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Role&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://primary2.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Witness Role&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;WITNESS&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Witness Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Witness Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://witness.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Operating Mode&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;High safety&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;After you configure database mirroring on &lt;strong&gt;table1&lt;/strong&gt; and &lt;strong&gt;table2&lt;/strong&gt;, you can use the &lt;strong&gt;Database Mirroring Monitor&lt;/strong&gt; to make sure that the servers have connectivity and are synchronized for both databases. It should look similar to the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6646.101612_5F00_1542_5F00_HowToMigrat2.png" /&gt;&lt;/p&gt;
&lt;h3&gt;Configure Log Shipping&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Perform the following steps to set up log shipping for the two databases.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;strong&gt;PRIMARY1&lt;/strong&gt;, &lt;strong&gt;PRIMARY2&lt;/strong&gt;, and &lt;strong&gt;REMOTE1&lt;/strong&gt;, in SQL Server Configuration Manager, set the &lt;strong&gt;SQL Server Agent&lt;/strong&gt; service to start automatically.&lt;/li&gt;
&lt;li&gt;Start the &lt;strong&gt;SQL Server Agent&lt;/strong&gt; service on all three machines.&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-top: 0;"&gt;Create the following share folders:&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 121px;" /&gt;&lt;col style="width: 257px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Network Name&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Permissions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\WITNESS\test1&lt;/p&gt;
&lt;p&gt;\\WITNESS\test2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQLSvc1&lt;/strong&gt;: &lt;strong&gt;Read&lt;/strong&gt; and &lt;strong&gt;Write&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQLSvc2&lt;/strong&gt;: &lt;strong&gt;Read&lt;/strong&gt; and &lt;strong&gt;Write &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQLSvc4&lt;/strong&gt;: &lt;strong&gt;Read&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQLAgent4&lt;/strong&gt;: &lt;strong&gt;Read&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\REMOTE1\test1&lt;/p&gt;
&lt;p&gt;\\REMOTE1\test2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQLSvc4: Read &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQLAgent4&lt;/strong&gt;: &lt;strong&gt;Read&lt;/strong&gt; and &lt;strong&gt;Write&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt;, set up log shipping of &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt; to &lt;strong&gt;REMOTE1&lt;/strong&gt; using the following parameters:&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 102px;" /&gt;&lt;col style="width: 121px;" /&gt;&lt;col style="width: 166px;" /&gt;&lt;col style="width: 194px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Backup Folder&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Destination Folder for Copied Files&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;Restore Mode&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;test1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\WITNESS\test1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\REMOTE1\test1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;No recovery&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;test2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\WITNESS\test2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;\\REMOTE1\test2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;No recovery&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Since you are mixing database mirroring and log shipping, you cannot perform this step using the SSMS user interface alone. For instructions, see the &lt;strong&gt;Log Shipping to a Third Destination from a Database Mirroring Pair&lt;/strong&gt; section in &lt;a href="http://download.microsoft.com/download/d/9/4/d948f981-926e-40fa-a026-5bfcf076d9b9/DBMandLogShipping.docx"&gt;Database Mirroring and Log Shipping Working Together&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you are finished, the SSMS view of the three database instances in &lt;strong&gt;Object Explorer&lt;/strong&gt; should look similar to the screenshot below. &lt;strong&gt;PRIMARY1&lt;/strong&gt; is the principal database server for both databases and &lt;strong&gt;PRIMARY2&lt;/strong&gt; is the mirror database server.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/1524.101612_5F00_1542_5F00_HowToMigrat3.png" /&gt;&lt;/p&gt;
&lt;h3&gt;Configure Access for the Client Application&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For client access to the databases, perform the following steps in SSMS for the various database instances:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;On &lt;strong&gt;PRIMARY1&lt;/strong&gt;, add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;, and then give &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; the following database memberships for both &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt;:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; for both &lt;strong&gt;test1&lt;/strong&gt; and &lt;strong&gt;test2&lt;/strong&gt; to &lt;strong&gt;PRIMARY2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;PRIMARY2&lt;/strong&gt;, add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;, and then give &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; the following database memberships for both test1 and test2:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; back to &lt;strong&gt;PRIMARY1&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You will use &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; to connect to the databases from the client application in later steps. If a failure happens during your migration process, you have ensured that clients have access to the automatic failover partner. In a disaster recovery scenario, you must bring &lt;strong&gt;REMOTE1&lt;/strong&gt; online, and then add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; to &lt;strong&gt;REMOTE1&lt;/strong&gt;, and then configure the same database memberships so that client applications can connect to it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Role: Application Developer &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On &lt;strong&gt;CLIENT&lt;/strong&gt;, perform the following steps to run the client application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href="http://technet.microsoft.com/en-us/evalcenter/cc442495"&gt;Windows 7&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Join the machine to the &lt;strong&gt;corp.contoso.com&lt;/strong&gt; domain using the &lt;strong&gt;CORP\Administrator&lt;/strong&gt; account.&lt;/li&gt;
&lt;li&gt;Logout and login as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;SQL Server 2008 R2 Management Studio&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Start SSMS and connect to &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2&lt;/strong&gt; to verify that the database instances can accept remote connections.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="http://www.microsoft.com/express"&gt;Visual Studio&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Logout and login as &lt;strong&gt;CORP\SQLClient&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/zfzh36t7(v=vs.100).aspx"&gt;Create a console application&lt;/a&gt; (named &lt;strong&gt;ConsoleApplication1&lt;/strong&gt; by default), and then replace the code in &lt;strong&gt;Program.cs&lt;/strong&gt; with the code below. This code continually attempts to connect to &lt;strong&gt;test1&lt;/strong&gt; and insert a record. Each connection attempt has three retries and a 5-second interval between each retry. The connection logic is taken from &lt;a href="http://technet.microsoft.com/en-us/library/cc917713.aspx"&gt;Implementing Application Failover with Database Mirroring&lt;/a&gt;.&lt;/div&gt;
&lt;p style="background: #dddddd; margin-bottom: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using &lt;span style="color: black;"&gt;System; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Data; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Data.SqlClient; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Threading; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;namespace &lt;span style="color: black;"&gt;ConsoleApplication1 &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&amp;nbsp; class &lt;span style="color: black;"&gt;Program &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=PRIMARY1;Failover Partner=PRIMARY2;Initial Catalog=test1;Integrated Security=True"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static bool &lt;span style="color: black;"&gt;ExecuteSQLWithRetry_NoResults(&lt;span style="color: #0070c0;"&gt;string &lt;span style="color: black;"&gt;strConn, &lt;span style="color: #0070c0;"&gt;string &lt;span style="color: black;"&gt;strCmd, &lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iRetryInterval, &lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iMaxRetries) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SqlConnection &lt;span style="color: black;"&gt;conn = null; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;SqlCommand &lt;span style="color: black;"&gt;cmd = null; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;for &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iRetryCount = 0; iRetryCount &amp;lt; iMaxRetries; iRetryCount++) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;try&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;conn = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;SqlConnection&lt;span style="color: black;"&gt;(strConn); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;conn.Open(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= conn &amp;amp;&amp;amp; ConnectionState.Open == conn.State) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;cmd = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;SqlCommand&lt;span style="color: black;"&gt;(strCmd, conn); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;cmd.ExecuteNonQuery(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;return true&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;catch &lt;span style="color: black;"&gt;(&lt;span style="color: #00b0f0;"&gt;Exception &lt;span style="color: black;"&gt;ex) { } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;finally &lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;try&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= cmd) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;cmd.Dispose(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= conn &amp;amp;&amp;amp; &lt;span style="color: #00b0f0;"&gt;ConnectionState&lt;span style="color: black;"&gt;.Closed != conn.State) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;conn.Close(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;catch &lt;span style="color: black;"&gt;(&lt;span style="color: #00b0f0;"&gt;Exception &lt;span style="color: black;"&gt;ex) { } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(iRetryCount &amp;lt; iMaxRetries) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Thread&lt;span style="color: black;"&gt;.Sleep(iRetryInterval * 1000); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;return false&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;static void &lt;span style="color: black;"&gt;Main(&lt;span style="color: #0070c0;"&gt;string&lt;span style="color: black;"&gt;[] args) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;while &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;true&lt;span style="color: black;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Random &lt;span style="color: black;"&gt;rand = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;Random&lt;span style="color: black;"&gt;(); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;string &lt;span style="color: black;"&gt;cmdString = &lt;span style="color: #c00000;"&gt;"Insert into table1 values (N'" &lt;span style="color: black;"&gt;+ rand.Next() + &lt;span style="color: #c00000;"&gt;"',N'" &lt;span style="color: black;"&gt;+ rand.Next() + &lt;span style="color: #c00000;"&gt;"')"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(ExecuteSQLWithRetry_NoResults(connString, cmdString, 5, 3)) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Console&lt;span style="color: black;"&gt;.WriteLine(&lt;span style="color: #c00000;"&gt;"Success: " &lt;span style="color: black;"&gt;+ cmdString); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;else &lt;span style="color: #00b0f0;"&gt;Console&lt;span style="color: black;"&gt;.WriteLine(&lt;span style="color: #c00000;"&gt;"Error: " &lt;span style="color: black;"&gt;+ cmdString); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Run the application by opening the &lt;strong&gt;Debug&lt;/strong&gt; menu and clicking &lt;strong&gt;Start Debugging&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You have now finished setting up the base configuration and are ready to start the migration scenario to the SQL Server AlwaysOn solution in SQL Server 2012.&lt;/p&gt;
&lt;p&gt;But wait, this blog has gotten too long already! In &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/10/16/how-to-migrate-to-alwayson-from-prior-deployments-combining-database-mirroring-and-log-shipping-part-2.aspx"&gt;the next installment&lt;/a&gt;, you will &lt;em&gt;actually&lt;/em&gt; start the migration steps. Stay tuned!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10360031" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Log+Shipping/">Log Shipping</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item><item><title>How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn – Part 3</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-3.aspx</link><pubDate>Fri, 28 Sep 2012 22:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10354303</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10354303</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-3.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Contributors: &lt;/strong&gt;Oleg Bulanyy (Microsoft), Jimmy May (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; SQL Server Failover Clustering has been renamed AlwaysOn Failover Cluster Instances (FCI) in SQL Server 2012. For simplicity, the term FCI in this paper applies to either SQL Server Failover Clustering in SQL Server 2008 R2 or AlwaysOn FCI in SQL Server 2012.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This blog is the continuation of a blog series that shows you how to perform the following end-to-end HADR migration scenario of SQL Server inside a test environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From a SQL Server 2008 R2 solution: &lt;strong&gt;SQL Server Failover Clustering&lt;/strong&gt; for high availability and &lt;strong&gt;database mirroring&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;li&gt;To a SQL Server 2012 solution: &lt;strong&gt;AlwaysOn Failover Cluster Instances&lt;/strong&gt; for high availability and &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-2.aspx"&gt;Part 2&lt;/a&gt;&lt;span style="background-color: yellow;"&gt;&lt;/span&gt;, you created a temporary FCI3 for primary site workload, reconfigured FCI2, and created an availability group that encompasses FCI3 and FCI2. This availability group contains both DB1 and DB2. In this installment, you will finish the migration steps by reconfiguring FCI1 and returning to the two-FCI configuration that you had pre-migration. So, let's start!&lt;/p&gt;
&lt;h2&gt;Step 5: Reconfigure FCI1 and Join It to Availability Group&lt;/h2&gt;
&lt;p&gt;In this section, you reconfigure FCI1 and join it to the availability group.&lt;/p&gt;
&lt;h3&gt;Reconfigure FCI1 with SQL Server 2012&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, you reconfigure FCI1 by reinstalling Windows Server and SQL Server completely on the FCI1 machines. For the reasons described in &lt;span style="color: #333333;"&gt;&lt;strong&gt;Step 3: Reconfigure FCI2 with SQL Server 2012&lt;/strong&gt;&lt;/span&gt; in &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-2.aspx"&gt;Part 2&lt;/a&gt;, you cannot simply upgrade SQL Server 2012 on the existing configuration for FCI1.&lt;/p&gt;
&lt;p&gt;Following the procedures at &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/06/05/quickly-setup-sql-server-alwayson-failover-cluster-instance-fci-in-hyper-v.aspx"&gt;Quickly Setup SQL Server AlwaysOn Failover Cluster Instance (FCI) in Hyper-V&lt;/a&gt;, deploy FCI1 at the primary site using the specifications in the table below. The steps in the blog post can be applied to both physical and Hyper-V environments.&lt;/p&gt;
&lt;p&gt;Make sure you use the steps below the table to join machines to Cluster3.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQL Server 2012&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;FCI Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Instance Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;LIVE_INST1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Machine Names&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY1&lt;/p&gt;
&lt;p&gt;PRIMARY2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;File Server Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FILE1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;WSFC Cluster Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Cluster3*&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Cluster Service IP Address&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;10.1.1.111&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Agent Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLAgent1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;*Instead of recreating &lt;strong&gt;Cluster1&lt;/strong&gt;, you join the machines to the new cluster &lt;strong&gt;Cluster3&lt;/strong&gt;. Follow the instructions below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When you initialize the shared disks, do not create a new iSCSI target for the quorum disk because the existing Cluster3 cluster already has a quorum disk. Instead, for the iSCSI target of the existing quorum disk, add the IP addresses of &lt;strong&gt;PRIMARY1&lt;/strong&gt; and &lt;strong&gt;PRIMARY2 &lt;/strong&gt;to the &lt;strong&gt;iSCSI Initiators Identifiers&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;When you configure &lt;strong&gt;PRIMARY1&lt;/strong&gt;, use the following steps instead of the ones in the &lt;strong&gt;Configure [MACHINE_NAME1]&lt;/strong&gt; section:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Log in as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Join the machine to the &lt;strong&gt;Cluster3&lt;/strong&gt; cluster with the following PowerShell command.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Import-Module FailoverClusters &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-Cluster Cluster3 | Add-ClusterNode PRIMARY1,PRIMARY2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Move-ClusterGroup "Available Storage" -Node PRIMARY1 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterAvailableDisk | Add-ClusterDisk &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Test-Cluster &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After the &lt;a href="http://technet.microsoft.com/en-us/library/ee461047.aspx"&gt;Add-ClusterNode&lt;/a&gt; command runs, ignore the errors for the three missing SQL Server DLLs. These DLLs are added when you install FCI1 on the nodes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;a href="http://technet.microsoft.com/en-us/library/ee461002.aspx"&gt;Move-ClusterGroup&lt;/a&gt; command moves the &lt;strong&gt;Available Storage&lt;/strong&gt; resource group to &lt;strong&gt;PRIMARY1&lt;/strong&gt;. This resource group holds all newly added shared storage. Unless either &lt;strong&gt;PRIMARY1&lt;/strong&gt; or &lt;strong&gt;PRIMARY2&lt;/strong&gt; owns this resource group, you cannot bring the shared disk online after you add it to the cluster because it cannot be brought online on any other node in the cluster.&lt;/p&gt;
&lt;p&gt;After the nodes are added to the cluster, your WSFC quorum should look as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PRIMARY1: 1 vote&lt;/li&gt;
&lt;li&gt;PRIMARY2: 1 vote&lt;/li&gt;
&lt;li&gt;TEMP1: 1 vote&lt;/li&gt;
&lt;li&gt;TEMP2: 1 vote&lt;/li&gt;
&lt;li&gt;REMOTE1: 0 vote&lt;/li&gt;
&lt;li&gt;REMOTE2: 0 vote&lt;/li&gt;
&lt;li&gt;Quorum disk: 1 vote&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; You should reconsider your quorum model carefully to maintain optimal WSFC quorum health both when and after adding the nodes. For more information, see the &lt;strong&gt;WSFC Quorum Modes and Voting Configuration&lt;/strong&gt; section in &lt;a href="http://msdn.microsoft.com/en-us/library/hh781257.aspx"&gt;Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set the appropriate owners of the existing clustered services for FCI3 and FCI2, including the respective service resources, using the following PowerShell commands. Setting the proper node ownership ensures that FCI3 does not attempt to failover to the FCI1 nodes, which cannot host that FCI3.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Change to the directory that contains the &lt;strong&gt;setup.exe&lt;/strong&gt; file for SQL Server 2012, then install &lt;strong&gt;FCI1&lt;/strong&gt; using the following command. Note that even though you initialize the data disk to use drive letter &lt;strong&gt;Z&lt;/strong&gt; based on the blog instructions, the WSFC service changes it to a different drive letter when adding to because that drive letter is already used in the cluster (by FCI3). You must use the new drive letter that is assigned to your shared disk.&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;.\Setup.exe /QS /ACTION=InstallFailoverCluster /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL, ADV_SSMS /INSTANCENAME=LIVE_INST1 /SQMREPORTING=0 /FAILOVERCLUSTERDISKS="Cluster Disk 4" /FAILOVERCLUSTERIPADDRESSES="IPv4;10.1.1.111;Cluster Network 1;255.255.255.0" /FAILOVERCLUSTERNETWORKNAME=FCI1 /AGTSVCACCOUNT="CORP\SQLAgent1" /AGTSVCPASSWORD=&lt;strong&gt;&lt;em&gt;[PASSWORD]&lt;/em&gt;&lt;/strong&gt; /INSTALLSQLDATADIR="&lt;strong&gt;&lt;em&gt;[SHAREDDISK_DRIVELETTER]&lt;/em&gt;&lt;/strong&gt;:\" /SQLSVCACCOUNT="CORP\SQLSvc1" /SQLSVCPASSWORD=&lt;strong&gt;&lt;em&gt;[PASSWORD]&lt;/em&gt;&lt;/strong&gt; /SQLSYSADMINACCOUNTS="CORP\Install" "CORP\DBAdmin" &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the following commands to open the firewall for SQL Server connectivity.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server Browser (UDP-In 1434)' dir=in action=allow protocol=UDP localport=1434 profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server (TCP-In)' program='C:\Program Files\Microsoft SQL Server\MSSQL11.LIVE_INST1\MSSQL\Binn\sqlservr.exe' dir=in action=allow protocol=TCP profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the following commands to set the proper ownership for the clustered service, including all the service resources.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Set-ClusterOwnerNode -Owners TEMP1,TEMP2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners TEMP1,TEMP2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST1)" | Set-ClusterOwnerNode -Owners PRIMARY1,PRIMARY2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST1)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners PRIMARY1,PRIMARY2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "Cluster Group" | Get-ClusterResource | Set-ClusterOwnerNode -Owners PRIMARY1,PRIMARY2,REMOTE1,REMOTE2,TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The resource group "Cluster Group" contains cluster-level resources for Cluster3, including the quorum disk. The last command ensures that that all nodes have access to the quorum disk.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once FCI2 has been reconfigured, it should look similar to Figure 9 when viewed in Failover Cluster Manager. Note that Cluster3 now has two cluster networks and two clustered services.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4621.092812_5F00_2207_5F00_HowToMigrat1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 9 FCI1 after Reconfiguration as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Enable AlwaysOn Availability Groups on FCI1&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, you &lt;a href="http://msdn.microsoft.com/en-us/library/ff878259.aspx"&gt;enable the AlwaysOn Availability Groups feature&lt;/a&gt; on FCI1. To do this, open a SQL Server PowerShell window from SSMS and run the following commands:&lt;/p&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\SQL\FCI1\LIVE_INST1 -Force &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Add Primary Site to Availability Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you will add the primary site to the availability group.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Take both a &lt;a href="http://msdn.microsoft.com/en-us/library/ms187510.aspx"&gt;full&lt;/a&gt; backup and a &lt;a href="http://msdn.microsoft.com/en-us/library/ms191429.aspx"&gt;log&lt;/a&gt; backup for the two databases on FCI3\TEMP_INST and &lt;a href="http://msdn.microsoft.com/en-us/library/ms177429.aspx"&gt;restore&lt;/a&gt; them on FCI1\LIVE_INST1. When restoring the databases, make sure that the WITH NO RECOVERY option is used.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; node for FCI3\TEMP_INST, under &lt;strong&gt;Availability Groups&lt;/strong&gt;, right-click &lt;strong&gt;AG1 (Primary)&lt;/strong&gt; and click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;. In the &lt;strong&gt;Connect to Existing Secondary Replicas&lt;/strong&gt; page, click &lt;strong&gt;Connect All&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Replica&lt;/strong&gt; tab, click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Server name&lt;/strong&gt; box, type &lt;strong&gt;FCI1\LIVE_INST1&lt;/strong&gt;, and then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For FCI1\LIVE_INST1, select &lt;strong&gt;Synchronous Commit (Up to 3)&lt;/strong&gt; and &lt;strong&gt;Readable Secondary=Yes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Backup Preferences&lt;/strong&gt; tab, change the backup priority for &lt;strong&gt;FCI1\LIVE_INST1&lt;/strong&gt; to &lt;strong&gt;50&lt;/strong&gt;. Your backup priorities should now be as follows:
&lt;ul style="margin-left: 72pt;"&gt;
&lt;li&gt;&lt;strong&gt;FCI1\LIVE_INST1&lt;/strong&gt;: &lt;strong&gt;50&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;: &lt;strong&gt;60&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;: &lt;strong&gt;50&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This setting makes the remote site the preferred secondary replica for backup operations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Join only&lt;/strong&gt; for data synchronization preference, and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Once validation finishes without errors, click &lt;strong&gt;Next&lt;/strong&gt;, and then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the availability group configuration is finished, you can monitor the availability group health in SSMS by right-clicking &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and selecting &lt;strong&gt;Show Dashboard&lt;/strong&gt;. It may take some time for FCI1\LIVE_INST1 to become synchronized. Once it is synchronized, the AlwaysOn Dashboard looks similar to Figure 10.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/3386.092812_5F00_2207_5F00_HowToMigrat2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 10 AlwaysOn Dashboard after Addition of FCI1\LIVE_INST1 &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Step 6: Remove Temporary FCI&lt;/h2&gt;
&lt;p&gt;The last step is to return the availability group to a two-FCI configuration. You will failover the availability group to the FCI1\LIVE_INST1, and then remove FCI3\TEMP_INST from the availability group.&lt;/p&gt;
&lt;h3&gt;Failover to Primary Site&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Perform the following steps while connected to FCI3\TEMP_INST, which is currently hosting the primary replica in the availability group.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the &lt;strong&gt;Object Explorer&lt;/strong&gt;, right-click &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt;, and click &lt;strong&gt;Show Dashboard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the dashboard, click &lt;strong&gt;AG1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the top-right corner of the dashboard, click &lt;strong&gt;Start Failover Wizard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;. Select &lt;strong&gt;FCI1\LIVE_INST1&lt;/strong&gt; as the new primary replica and click &lt;strong&gt;Next&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Connect to Replica&lt;/strong&gt; page, click &lt;strong&gt;Connect&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt; again, and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Results&lt;/strong&gt; page, you are reminded to validate WSFC quorum vote configuration. Since your quorum state has not changed in this failover, you do not need to change the quorum settings. Click &lt;strong&gt;Close&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;The AlwaysOn Dashboard may show error states until failover is complete and the dashboard is refreshed. By default, the dashboard refreshes every 30 seconds. You can refresh it manually by pressing F5.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; At this point, &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; still does not have access to the databases on &lt;strong&gt;FCI1\LIVE_INST1&lt;/strong&gt;. You must perform the following steps immediately after the failover so that the client applications can recover database connectivity.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Give &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; the following database memberships for both DB1 and DB2:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Remove Temporary FCI from Availability Group&lt;/h3&gt;
&lt;p&gt;Perform the following steps while connected to FCI1\LIVE_INST1, which is currently hosting the primary replica in the availability group.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the Object Explorer, expand &lt;strong&gt;AlwaysOn High Availability Group&lt;/strong&gt;, then expand &lt;strong&gt;Availability Groups&lt;/strong&gt;, then expand &lt;strong&gt;AG1 (Primary)&lt;/strong&gt;, and then expand &lt;strong&gt;Availability Replicas&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong&gt;FCI3\TEMP_INST (Secondary)&lt;/strong&gt; and click &lt;strong&gt;Remove from&lt;/strong&gt; &lt;strong&gt;Availability Group&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;Once the replica has been removed, you will remove the clustered service and the nodes from Cluster3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Log in to &lt;strong&gt;PRIMARY1&lt;/strong&gt; as &lt;strong&gt;CORP\Install&lt;/strong&gt; and open &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;, expand &lt;strong&gt;Cluster3.corp.contoso.com&lt;/strong&gt;, and then expand &lt;strong&gt;Services and applications&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong&gt;SQL Server (TEMP_INST)&lt;/strong&gt; and click &lt;strong&gt;Delete&lt;/strong&gt;. Confirm by clicking &lt;strong&gt;Delete SQL Server (TEMP_INST)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Cluster3.corp.contoso.com&lt;/strong&gt;, click &lt;strong&gt;Storage&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the &lt;strong&gt;Available Storage&lt;/strong&gt; section, right-click &lt;strong&gt;Cluster Disk 2&lt;/strong&gt; and select &lt;strong&gt;Delete&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;IMPORTANT: Before evicting TEMP1 and TEMP2 from the cluster, make sure all nodes have access to the quorum disk. If TEMP1 and TEMP2 are still the only nodes that can access it, the quorum disk is taken offline immediately after you evict the two nodes because no other node is able to take ownership of the quorum disk. You can test this condition by attempting to move the quorum disk between the remaining nodes. For example, to move the quorum disk to PRIMARY1, the following PowerShell command:&lt;/p&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Move-ClusterSharedVolume "Cluster Disk 1" -Node PRIMARY1 &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Cluster3.corp.contoso.com&lt;/strong&gt;, click &lt;strong&gt;Nodes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Inspect all the nodes in Cluster3 and make sure that all nodes are online. Specifically, the success of the following steps depends on whether the quorum is in optimal health. In other words, at least the following nodes should be online (the ones that have quorum votes):&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;PRIMARY1&lt;/li&gt;
&lt;li&gt;PRIMARY2&lt;/li&gt;
&lt;li&gt;TEMP1&lt;/li&gt;
&lt;li&gt;TEMP2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Cluster3.corp.contoso.com&lt;/strong&gt; and expand the &lt;strong&gt;Cluster Core Resources&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Make sure that the disk witness is online.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Nodes&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong&gt;TEMP1&lt;/strong&gt;, then point to &lt;strong&gt;More Actions&lt;/strong&gt;, and then click &lt;strong&gt;Evict&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Confirm by clicking &lt;strong&gt;Evict node TEMP1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong&gt;TEMP2&lt;/strong&gt;, then point to &lt;strong&gt;More Actions&lt;/strong&gt;, and then click &lt;strong&gt;Evict&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Confirm by clicking &lt;strong&gt;Evict node TEMP2&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;Your Cluster3 quorum should now look as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PRIMARY1: 1 vote&lt;/li&gt;
&lt;li&gt;PRIMARY2: 1 vote&lt;/li&gt;
&lt;li&gt;REMOTE1: 0 vote&lt;/li&gt;
&lt;li&gt;REMOTE2: 0 vote&lt;/li&gt;
&lt;li&gt;Quorum disk: 1 vote&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After you finish removing the FCI3 nodes from Cluster3, the cluster should look similar to Figure 11. The storage view is shown here to demonstrate that the quorum disk is online and hosted by one of the remaining nodes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0640.092812_5F00_2207_5F00_HowToMigrat3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 11 Failover Cluster Manager View after Removal of FCI3 &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;You're Done!&lt;/h2&gt;
&lt;p&gt;Whew! Three blogs later, you have migrated a SQL Server 2008 R2 HADR solution to a SQL Server AlwaysOn solution. Take a look at the table below for a comparison of the two solutions.&lt;/p&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;SQL Server 2008 R2 Solution (Pre-Migration)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;SQL Server AlwaysOn Solution (Post-Migration)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of WSFC Clusters&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of FCIs&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of Cluster Networks&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;1 in each cluster for the respective subnet&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2 in the cluster, spanning both subnets&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of Cluster Disks&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2 in each cluster (1 for quorum and 1 for FCI)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;3 (1 for quorum and 1 for each FCI)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of Nodes&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;2 in each cluster&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Number of Clustered Services&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;1 in each cluster&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;3 (1 for each FCI and 1 for availability group)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Cluster Resource Ownership&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Owned by all nodes in each cluster&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI resources owned by respective FCI nodes.&lt;/p&gt;
&lt;p&gt;Availability group resources owned by all nodes.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;HA Failover Approach&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI failover in Failover Cluster Manager&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI failover in Failover Cluster Manager&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;DR Failover Approach&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Database mirroring failover in SQL Server Management Studio&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Availability group failover in SQL Server Management Studio&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Migrating an HADR solution is not a trivial matter, and clearly, migrating to SQL Server AlwaysOn is not an exemption. Hopefully, I have put you on the right track by helping you avoid many of the potential issues. I want to remind you at this point that the whitepaper: &lt;a href="http://msdn.microsoft.com/en-us/library/hh923056.aspx"&gt;Migration Guide: Migrating to SQL Server 2012 Failover Clustering and Availability Groups from Prior Clustering and Mirroring Deployments, Part 1&lt;/a&gt;, shows you an alternative migration approach without using intermediate hardware. If there is the interest, I can blog about that in a separate series. Whatever path you take to migrate your solution to SQL Server AlwaysOn, be sure to test your particular migration scenario extensively, including rehearsing failover scenarios and disaster recovery scenarios, &lt;em&gt;before&lt;/em&gt; performing the migration on your production system.&lt;/p&gt;
&lt;p&gt;Also, I have not shown you the new workloads that are possible with your new SQL Server AlwaysOn solution, such as using the read-only secondary replica for read workloads. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213417(v=sql.110).aspx"&gt;Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10354303" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Cluster+Instance/">Failover Cluster Instance</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/FCI/">FCI</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item><item><title>How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn – Part 2</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-2.aspx</link><pubDate>Fri, 28 Sep 2012 21:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10354299</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10354299</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-2.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Contributors: &lt;/strong&gt;Oleg Bulanyy (Microsoft), Jimmy May (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; SQL Server Failover Clustering has been renamed AlwaysOn Failover Cluster Instances (FCI) in SQL Server 2012. For simplicity, the term FCI in this paper applies to either SQL Server Failover Clustering in SQL Server 2008 R2 or AlwaysOn FCI in SQL Server 2012.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This blog is the continuation of a blog series that shows you how to perform the following end-to-end HADR migration scenario of SQL Server inside a test environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From a SQL Server 2008 R2 solution: SQL Server Failover Clustering for high availability and database mirroring for disaster recovery&lt;/li&gt;
&lt;li&gt;To a SQL Server 2012 solution: AlwaysOn Failover Cluster Instances for high availability and AlwaysOn Availability Groups for disaster recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In&amp;nbsp;&lt;span style="background-color: yellow;"&gt;&lt;a title="Part 1" href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-1.aspx"&gt;Part 1&lt;/a&gt;&lt;/span&gt;, you created the base configuration. In this installment, you will apply the migration steps to the base configuration you created. Without further delay, let's start!&lt;/p&gt;
&lt;h2&gt;Step 1: Deploy FCI3 as Intermediate FCI&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, you create a temporary FCI in 10.1.1.X/24. Following the procedures at &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/06/05/quickly-setup-sql-server-alwayson-failover-cluster-instance-fci-in-hyper-v.aspx"&gt;Quickly Setup SQL Server AlwaysOn Failover Cluster Instance (FCI) in Hyper-V&lt;/a&gt;, deploy FCI3 in 10.1.1.X/24 using the specifications in the table below. The steps in the blog post can be applied to both physical and Hyper-V environments.&lt;/p&gt;
&lt;div style="margin-left: 5pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;WSFC Cluster Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Cluster3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Server Version&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQL Server 2012&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;FCI Network Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Instance Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TEMP_INST&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Machine Names&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TEMP1&lt;/p&gt;
&lt;p&gt;TEMP2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;File Server Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FILE1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Cluster Service IP Address&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;10.1.1.133&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Agent Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLAgent3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Figure 5 shows the details of FCI3 after you create it, as viewed in &lt;strong&gt;Failover Cluster Manager&lt;/strong&gt;. Similar to FCI1 and FCI2, FCI3 has a quorum model of &lt;strong&gt;Node and Disk Majority&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6545.092812_5F00_2133_5F00_HowToMigrat1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 5&amp;nbsp; FCI3 as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;FCI3 is used in this walkthrough as a temporary replacement FCI to preserve the two-FCI configuration when you are reconfiguring FCI1 or FCI2. You can perform migration without the temporary FCI and still preserve the high availability of your databases, but note that when FCI1 or FCI2 is being reconfigured or upgraded using this alternate approach, the high availability of your database instance rests upon the single remaining FCI.&lt;/p&gt;
&lt;p&gt;In addition, FCI3 is used to set up the availability group in the SQL Server AlwaysOn solution, and the WSFC cluster used to host FCI3 (Cluster3) will become a permanent fixture in the final configuration.&lt;/p&gt;
&lt;h2&gt;Step 2: Redirect Database Mirroring to FCI3&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this section, you will remove the existing database mirroring session between FCI1\LIVE_INST and FCI2\LIVE_INST and configure a new database mirroring session between FCI1\LIVE_INST and FCI3\TEMP_INST. These actions effectively remove FCI2 from the HADR solution so that it can be reconfigured, while still maintaining two FCIs in your HADR database system. However, removing FCI2 also means that the system does not have any disaster recovery capability until FCI2 is reintroduced to your HADR system.&lt;/p&gt;
&lt;p&gt;Perform the following steps while connected to FCI1\LIVE_INST and FCI3\TEMP_INST.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms189053.aspx"&gt;Prepare the mirror databases&lt;/a&gt; for &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt; on &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/ms190471.aspx"&gt;remove the existing database mirroring sessions&lt;/a&gt; for &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/ms188712.aspx"&gt;establish the database mirroring sessions&lt;/a&gt; on &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt; using the specifications in Table 7.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin-left: 41pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 221px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Primary FCI\Instance&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI1\LIVE_INST&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror FCI\Instance&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI3\TEMP_INST&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Primary Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Primary Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://fci1.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://fci3.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;At this point, FCI2 is no longer being used, and it can be reconfigured to be part of Cluster3.&lt;/p&gt;
&lt;h2&gt;Step 3: Reconfigure FCI2 with SQL Server 2012&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you reconfigure FCI2 by reinstalling Windows Server and SQL Server completely on the FCI2 machines. You cannot simply upgrade SQL Server 2012 on the existing configuration for FCI2 for the following reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The SQL Server AlwaysOn solution requires that all the machines to be joined to the new WSFC cluster (Cluster3).&lt;/li&gt;
&lt;li&gt;As each machine can be joined to only one WSFC cluster at the time, the existing WSFC cluster (Cluster2) must be destroyed.&lt;/li&gt;
&lt;li&gt;Since FCI2 is clustered service hosted by Cluster2, destroying Cluster2 also renders FCI2 unusable.&lt;/li&gt;
&lt;li&gt;Previously, FCI1 and FCI2 can share the same instance name in a database mirroring configuration because they run in separate WSFC clusters. However, the fact that they ultimately participate in the same availability group requires that they run in a single WSFC cluster, each having a unique instance name.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While you can manually delete both the FCI2 clustered service, the Cluster2 cluster, and the existing SQL Server installation, it can add unnecessary complication and troubleshooting to your migration process. Unless you have a compelling reason to preserve the existing Windows installation, it is simpler just to reinstall Windows.&lt;/p&gt;
&lt;p&gt;Following the procedures at &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/06/05/quickly-setup-sql-server-alwayson-failover-cluster-instance-fci-in-hyper-v.aspx"&gt;Quickly Setup SQL Server AlwaysOn Failover Cluster Instance (FCI) in Hyper-V&lt;/a&gt;, deploy FCI2 using the specifications in the table below. The steps in the blog post can be applied to both physical and Hyper-V environments.&lt;/p&gt;
&lt;p&gt;Due to the reasons described previously, make sure you use the steps following the table to join machines to Cluster3.&lt;/p&gt;
&lt;div style="margin-left: 5pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;WSFC Cluster Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Cluster3*&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Server Version&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQL Server 2012&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;FCI Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Instance Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;LIVE_INST2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Machine Names&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;REMOTE1&lt;/p&gt;
&lt;p&gt;REMOTE2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;File Server Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FILE2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Cluster Service IP Address&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;10.2.2.222&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Agent Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLAgent2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;*&lt;span style="background-color: #ffff80;"&gt;I&lt;/span&gt;nstead of recreating &lt;strong&gt;Cluster2&lt;/strong&gt;, you join the machines to the new cluster &lt;strong&gt;Cluster3&lt;/strong&gt;. Follow the instructions below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When you initialize the shared disks, do not create a new iSCSI target for the quorum disk because the existing Cluster3 cluster already has a quorum disk. Instead, for the iSCSI target of the existing quorum disk, add the IP addresses of &lt;strong&gt;REMOTE1&lt;/strong&gt; and &lt;strong&gt;REMOTE2&lt;/strong&gt; to the &lt;strong&gt;iSCSI Initiators Identifiers&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;When you configure REMOTE1, use the following steps instead of the ones in the &lt;strong&gt;Configure [MACHINE_NAME1]&lt;/strong&gt; section:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Log in as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Join the machine to the &lt;strong&gt;Cluster3&lt;/strong&gt; cluster with the following PowerShell command.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Import-Module FailoverClusters &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-Cluster Cluster3 | Add-ClusterNode REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Move-ClusterGroup "Available Storage" -Node REMOTE1 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterAvailableDisk | Add-ClusterDisk &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Test-Cluster &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After the &lt;a href="http://technet.microsoft.com/en-us/library/ee461047.aspx"&gt;Add-ClusterNode&lt;/a&gt; command runs, ignore the errors for the three missing SQL Server DLLs. These DLLs are added when you install FCI2 on the nodes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;a href="http://technet.microsoft.com/en-us/library/ee461002.aspx"&gt;Move-ClusterGroup&lt;/a&gt; command moves the &lt;strong&gt;Available Storage&lt;/strong&gt; resource group to REMOTE1. This resource group holds all newly added shared storage. Unless either REMOTE1 or REMOTE2 owns this resource group, you cannot bring the shared disk online after you add it to the cluster because it cannot be brought online on any other node in the cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set the appropriate owners of the existing clustered service SQL Server (TEMP_INST), including all the service resources, with the following PowerShell commands. Setting the proper ownership ensures that FCI3 does not attempt to failover to REMOTE1 or REMOTE2, which cannot host the TEMP_INST SQL Server instance.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Remove the quorum votes for the remote nodes. Setting the proper node votes ensures that the WSFC cluster correctly determines the quorum health and makes proper decisions whether to fail over or take the cluster offline during a failure.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;(Get-ClusterNode "REMOTE1").NodeWeight = 0 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;(Get-ClusterNode "REMOTE2").NodeWeight = 0 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Your Cluster3 quorum should now look as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TEMP1: 1 vote&lt;/li&gt;
&lt;li&gt;TEMP2: 1 vote&lt;/li&gt;
&lt;li&gt;REMOTE1: 0 vote&lt;/li&gt;
&lt;li&gt;REMOTE2: 0 vote&lt;/li&gt;
&lt;li&gt;Quorum disk: 1 vote&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; You should reconsider your quorum model carefully to maintain optimal WSFC quorum health both when and after adding the nodes. For more information, see the &lt;strong&gt;WSFC Quorum Modes and Voting Configuration&lt;/strong&gt; section in &lt;a href="http://msdn.microsoft.com/en-us/library/hh781257.aspx"&gt;Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Change to the directory that contains the &lt;strong&gt;setup.exe&lt;/strong&gt; file for SQL Server 2012, then install &lt;strong&gt;FCI2&lt;/strong&gt; using the following command. Note that even though you initialize the data disk to use drive letter &lt;strong&gt;Z&lt;/strong&gt; based on the blog instructions, the WSFC service changes it to a different drive letter when adding to because that drive letter is already used in the cluster (by FCI3). You must use the new drive letter that is assigned to your shared disk.&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;.\Setup.exe /QS /ACTION=InstallFailoverCluster /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL, ADV_SSMS /INSTANCENAME=LIVE_INST2 /SQMREPORTING=0 /FAILOVERCLUSTERDISKS="Cluster Disk 3" /FAILOVERCLUSTERIPADDRESSES="IPv4;10.2.2.222;Cluster Network 2;255.255.255.0" /FAILOVERCLUSTERNETWORKNAME=FCI2 /AGTSVCACCOUNT="CORP\SQLAgent2" /AGTSVCPASSWORD=&lt;strong&gt;&lt;em&gt;[PASSWORD]&lt;/em&gt;&lt;/strong&gt; /INSTALLSQLDATADIR="&lt;strong&gt;&lt;em&gt;[SHAREDDISK_DRIVELETTER]&lt;/em&gt;&lt;/strong&gt;:\" /SQLSVCACCOUNT="CORP\SQLSvc2" /SQLSVCPASSWORD=&lt;strong&gt;&lt;em&gt;[PASSWORD]&lt;/em&gt;&lt;/strong&gt; /SQLSYSADMINACCOUNTS="CORP\Install" "CORP\DBAdmin" &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the following commands to open the firewall for SQL Server connectivity.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server Browser (UDP-In 1434)' dir=in action=allow protocol=UDP localport=1434 profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;netsh advfirewall firewall add rule name='SQL Server (TCP-In)' program='C:\Program Files\Microsoft SQL Server\MSSQL11.LIVE_INST2\MSSQL\Binn\sqlservr.exe' dir=in action=allow protocol=TCP profile=domain &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the following commands to set the proper ownership for the clustered service, including all the service resources.&lt;/div&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (TEMP_INST)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners TEMP1,TEMP2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "SQL Server (LIVE_INST2)" | Get-ClusterResource | Set-ClusterOwnerNode -Owners REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Get-ClusterGroup "Cluster Group" | Get-ClusterResource | Set-ClusterOwnerNode -Owners TEMP1,TEMP2,REMOTE1,REMOTE2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The resource group "Cluster Group" contains cluster-level resources for Cluster3, including the quorum disk. The last command ensures that that all nodes have access to the quorum disk.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once FCI2 has been reconfigured, it should look similar to Figure 6 when viewed in Failover Cluster Manager. Note that Cluster3 now has two cluster networks and two clustered services.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/8182.092812_5F00_2133_5F00_HowToMigrat2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 6 FCI2 after Reconfiguration as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Step 4: Make FCI3 the New Primary FCI and Create Availability Group&lt;/h2&gt;
&lt;p&gt;In this section, you will perform a failover to make FCI3 the new primary partner and stop database mirroring. Then, you will establish an availability group with the temporary FCI as the primary replica and the remote FCI as the secondary replica. Ultimately, this availability group becomes a permanent fixture in the post-migration solution.&lt;/p&gt;
&lt;h3&gt;Enable AlwaysOn Availability Groups on FCI3 and FCI2&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, you &lt;a href="http://technet.microsoft.com/en-us/library/ff878259(v=sql.110).aspx"&gt;enable the AlwaysOn Availability Groups feature&lt;/a&gt; on FCI3 and FCI2. You will perform this step now so that you do not have to restart FCI3 after it becomes the primary FCI. To do this, open a SQL Server PowerShell window from SSMS and run the following commands:&lt;/p&gt;
&lt;p style="margin-bottom: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\SQL\FCI3\TEMP_INST -Force &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 0; background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\SQL\FCI2\LIVE_INST2 -Force &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Create Availability Group on FCI3&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you will perform the database mirroring failover to FCI3 and configure the availability group that you will use for the SQL Server AlwaysOn solution.&lt;/p&gt;
&lt;p style="background: yellow;"&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; Your client application will experience downtime in this part of the migration process. The duration of the downtime depends on your efficiency, the database size, the speed of file transfer, and other factors.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;On &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt;, perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; for both DB1 and DB2, from &lt;strong&gt;FCI1&lt;/strong&gt; to &lt;strong&gt;FCI3&lt;/strong&gt;.&lt;/div&gt;
&lt;p style="background: yellow;"&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; This is the beginning of downtime. The console application on CLIENT should begin to show &lt;span style="color: black; font-family: Courier New; font-size: 9pt; background-color: #dddddd;"&gt;Error:...&lt;/span&gt; for write access failures.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;For client access, connect to &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt; in SSMS, and then add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt; and give it the following database memberships for both &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/ms190471.aspx"&gt;remove the existing database mirroring sessions&lt;/a&gt; for both &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;, prepare the secondary &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt; databases for the availability group you will create, by taking both &lt;a href="http://msdn.microsoft.com/en-us/library/ms187510.aspx"&gt;full&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ms191429.aspx"&gt;log&lt;/a&gt; backups of the databases from &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ms177429.aspx"&gt;restoring&lt;/a&gt; them on &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;. When restoring the databases, make sure that the WITH NO RECOVERY option is used.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;, right-click &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and click &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;New Availability Group Wizard&lt;/strong&gt;, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Availability group name&lt;/strong&gt; box, type &lt;strong&gt;AG1&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Replicas&lt;/strong&gt; tab, click &lt;strong&gt;Add Replica&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Server name&lt;/strong&gt; box, type &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;, then click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Synchronous Commit (Up to 3)&lt;/strong&gt; for &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Readable Secondary=Yes&lt;/strong&gt; for both &lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt; and &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Backup Preferences&lt;/strong&gt;tab, change the backup priority of the nodes as follows:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FCI3\TEMP_INST&lt;/strong&gt;: &lt;strong&gt;50&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;: &lt;strong&gt;60&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Listener&lt;/strong&gt; tab, select &lt;strong&gt;Create an availability group listener&lt;/strong&gt;, and then specify the following settings for the listener:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Listener DNS Name&lt;/strong&gt;: &lt;strong&gt;AG1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Port&lt;/strong&gt;: &lt;strong&gt;10000&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Mode&lt;/strong&gt;: &lt;strong&gt;Static IP&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv4 Address&lt;/strong&gt; for 10.1.1.X/24: &lt;strong&gt;10.1.1.121&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv4 Address&lt;/strong&gt; for 10.2.2.X/24: &lt;strong&gt;10.2.2.242&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Join only&lt;/strong&gt; for data synchronization preference, and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; While the &lt;strong&gt;Full&lt;/strong&gt; option automatically prepares the secondary replicas by taking the necessary backups, it is not designed for very large databases that may exist in a Tier-1 environment. For more information on the prerequisites for AlwaysOn Availability Groups, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff878487(v=sql.110).aspx"&gt;Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups (SQL Server)&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Once validation finishes without errors, click &lt;strong&gt;Next&lt;/strong&gt;, then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the availability group configuration is finished, you can monitor the availability group health in SSMS by right-clicking &lt;strong&gt;AlwaysOn High Availability&lt;/strong&gt; and selecting &lt;strong&gt;Show Dashboard&lt;/strong&gt;. The view of the &lt;strong&gt;AlwaysOn Dashboard&lt;/strong&gt; is shown in Figure 7.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/0753.092812_5F00_2133_5F00_HowToMigrat3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 7 AlwaysOn Dashboard after Availability Group Creation &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The Failover Cluster Manager view of AG1 is shown in Figure 8. The Cluster3 cluster now contains three clustered services: two FCI services and one availability group service. The WSFC service manages aspects the resource group ownership and monitors the quorum health for the availability group. Note that other than quorum model and health management, you should avoid modifying the clustered service properties of the availability group in the Failover Cluster Manager. For example, &lt;em&gt;do not perform availability group failovers using the Failover Cluster Manager&lt;/em&gt;. You can use the AlwaysOn Dashboard to perform this task. For more information, see &lt;a href="http://sqlcat.com/sqlcat/b/msdnmirror/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx)"&gt;DO NOT use Windows Failover Cluster Manager to perform Availability Group Failover&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/4863.092812_5F00_2133_5F00_HowToMigrat4.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 8 New Availability Group as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;At this point, &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; still does not have access to the databases on &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt;. If you must fail over to &lt;strong&gt;FCI2\LIVE_INST2&lt;/strong&gt; due to a failure during or after migration, you must perform the following steps immediately after the failover so that the client applications can recover database connectivity.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Give &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; the following database memberships for both DB1 and DB2:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Reconfigure the Client Application&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Application Developer &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you reconfigure your client application to re-establish database connectivity. In a real-life migration scenario, you can proceed with this step as soon as downtime begins so that your client applications can re-establish database connectivity as soon as the availability group is online.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you have not already done so, close the running console application on &lt;strong&gt;CLIENT&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;Program.cs&lt;/strong&gt;, locate the following line:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=FCI1\LIVE_INST;Failover Partner=FCI2\LIVE_INST;Initial Catalog=DB1;Integrated Security=True"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Replace this line with the following code to use the availability group listener and port number you configured:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=tcp:AG1,10000;Database=DB1;IntegratedSecurity=SSPI"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run the application again by opening the &lt;strong&gt;Debug&lt;/strong&gt; menu and clicking &lt;strong&gt;Start Debugging&lt;/strong&gt;.&lt;/div&gt;
&lt;p style="background: yellow;"&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; The console application on CLIENT should now show &lt;span style="color: black; font-family: Courier New; font-size: 9pt; background-color: #dddddd;"&gt;Success:...&lt;/span&gt; for write access. This is the end of downtime.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You have now created the availability group, lost and recovered client connectivity, and recovered HADR capabilities. The only remaining tasks are reconfiguring FCI1, add it to the availability group, and remove the temporary FCI. I will cover that in &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-3.aspx"&gt;the next installment&lt;/a&gt;. Stay tuned!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10354299" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Cluster+Instance/">Failover Cluster Instance</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/FCI/">FCI</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item><item><title>How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn – Part 1</title><link>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-1.aspx</link><pubDate>Fri, 28 Sep 2012 19:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10354264</guid><dc:creator>Cephas Lin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/sqlalwayson/rsscomments.aspx?WeblogPostID=10354264</wfw:commentRss><comments>http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-1.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Contributors: &lt;/strong&gt;Oleg Bulanyy (Microsoft), Jimmy May (Microsoft) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; SQL Server Failover Clustering has been renamed AlwaysOn Failover Cluster Instances (FCI) in SQL Server 2012. For simplicity, the term FCI in this paper applies to either SQL Server Failover Clustering in SQL Server 2008 R2 or AlwaysOn FCI in SQL Server 2012.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This blog series is a follow-up to my whitepaper &lt;a href="http://msdn.microsoft.com/en-us/library/hh923056.aspx"&gt;Migration Guide: Migrating to SQL Server 2012 Failover Clustering and Availability Groups from Prior Clustering and Mirroring Deployments&lt;/a&gt;. In this series, I will walk you through the following end-to-end migration scenario inside a test environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From a SQL Server 2008 R2 solution: &lt;strong&gt;SQL Server Failover Clustering&lt;/strong&gt; for high availability and &lt;strong&gt;database mirroring&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;li&gt;To a SQL Server 2012 solution: &lt;strong&gt;AlwaysOn Failover Cluster Instances&lt;/strong&gt; for high availability and &lt;strong&gt;AlwaysOn Availability Groups&lt;/strong&gt; for disaster recovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before I go further, l want to refer you to a whitepaper &lt;a href="http://msdn.microsoft.com/en-us/library/jj215886"&gt;AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using Failover Cluster Instances and Availability Groups&lt;/a&gt;. This is a great architectural guide for anyone who is interested about the end-to-end deployment of the AlwaysOn scenario I'm discussing in this blog.&lt;/p&gt;
&lt;h2&gt;How to Use This Blog Series&lt;/h2&gt;
&lt;p&gt;Giving direct, step-by-step migration guidance on an HADR solution is inherently dangerous because there are too many variations of SQL Server HADR scenarios in real-life production systems, and each presents unique pitfalls and require unique recommendations. Therefore, for production systems, &lt;a href="http://msdn.microsoft.com/en-us/library/hh923056.aspx"&gt;Migration Guide: Migrating to SQL Server 2012 Failover Clustering and Availability Groups from Prior Clustering and Mirroring Deployments&lt;/a&gt; gives you the prescriptive guidance on the migration process without diving into the nuances. However, if you have already read that whitepaper, and still need help walking through the paces of migration &lt;em&gt;in your test environment&lt;/em&gt;, then this blog can hopefully help you avoid many issues that can trip you up along the way. Once you can successfully migrate to SQL Server AlwaysOn in the test environment, the next natural step is to determine the tweaks you must make in order to migrate your production SQL Server deployment to SQL Server AlwaysOn.&lt;/p&gt;
&lt;p&gt;A more severe way of saying the same thing is: &lt;strong&gt;DO NOT&lt;/strong&gt; apply these migration steps blindly to your production system. To minimize the risks of your actual migration to SQL Server AlwaysOn, test these steps thoroughly against every aspect of your SQL Server deployment (I repeat, &lt;em&gt;in a test environment&lt;/em&gt;) and incorporate all the necessary tweaks to accommodate your specific scenario.&lt;/p&gt;
&lt;h2&gt;Migration Walkthrough Overview&lt;/h2&gt;
&lt;p&gt;You will walk through the migration procedures as covered in the Migration With Intermediate Hardware section in &lt;a href="http://msdn.microsoft.com/en-us/library/hh923056.aspx"&gt;Migration Guide: Migrating to SQL Server 2012 Failover Clustering and Availability Groups from Prior Clustering and Mirroring Deployments&lt;/a&gt;. The whitepaper presents a separate migration approach: Migration Without Intermediate Hardware. I suggest that you read through the two options and decide which approach is best suited for your needs.&lt;/p&gt;
&lt;p&gt;Table 1 summarizes the solution characteristics between the starting point and the end point of the migration walkthrough.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 217px;" /&gt;&lt;col style="width: 166px;" /&gt;&lt;col style="width: 256px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a; font-family: Arial;"&gt;&lt;strong&gt;Start&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a; font-family: Arial;"&gt;&lt;strong&gt;Migration Strategy&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a; font-family: Arial;"&gt;&lt;strong&gt;End&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;WSFC cluster Cluster1 on the primary site &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI1 running in Cluster1 for local high availability &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;WSFC cluster Cluster2 on the remote site &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI2 running in Cluster2 for local high availability &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;Database mirroring on databases DB1 and DB2 from FCI1 to FCI2 for disaster recovery&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;Add WSFC cluster Cluster3 to the primary site &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;Run FCI3 as temporary FCI in Cluster3 &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;Reconfigure FCI1 and FCI2 in Cluster3, which spans both the primary and remote sites&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI1 on the primary site, running in Cluster3, for local high availability &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI2 on the remote site, running in Cluster3 for local high availability &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Arial;"&gt;Availability group on DB1 and DB2, running in Cluster3, for disaster recovery &lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI1 as primary replica &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial;"&gt;FCI2 as secondary replica, with asynchronous commit&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Table 1 Solution Characteristics Between Migration End Points &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;At this point, it is useful to elaborate on what exactly you will do. The migration procedures are divided into the following sections. Step 0 shows you how to set up the pre-migration solution, and Step 1 is the beginning of the migration steps.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 0: Set up Base Configuration as the Starting Point&lt;/span&gt; (Part 1)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 1: Deploy FCI3 as Intermediate FCI&lt;/span&gt; (Part 2)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 2: Redirect Database Mirroring to FCI3&lt;/span&gt; (Part 2)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 3: Reconfigure FCI2 with SQL Server 2012&lt;/span&gt; (Part 2)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 4: Make FCI3 the New Primary FCI and Create Availability Group&lt;/span&gt; (Part 2)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 5: Reconfigure FCI1 and Join It to Availability Group&lt;/span&gt; (Part 3)&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0563c1; text-decoration: underline;"&gt;Step 6: Remove Temporary FCI&lt;/span&gt; (Part 3)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you build the base configuration I prescribe here, you will find a clear path to success in the migration procedure. Once you know what success looks like using the prescribed base configuration, you can determine the necessary deviations to address the needs of your HADR solution. You can instead use your existing HADR solution as the base configuration, but just realize that I cannot guarantee that my migration steps will work as-is with your HADR solution. In all likelihood, you will need to tweaks as you follow along. Make sure that you test the migration steps thoroughly before attempting the same steps on your production environment.&lt;/p&gt;
&lt;p&gt;As client connectivity is an important part of the migration scenario, you will simulate a client workload on the database system to test the HADR capabilities of the system before, during, and after the migration process. In addition, the client workload is used to demonstrate how to configure client applications to work with AlwaysOn Availability Groups. If you choose to use your specific HADR solution as the starting point, you can likewise use your own client applications if you like.&lt;/p&gt;
&lt;h3&gt;Simplifications&lt;/h3&gt;
&lt;p&gt;Because the migration walkthrough is designed for a test environment, I oversimplify some important aspects of an FCI deployment. If you are keen, you will realize that I don't follow three industry best practices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hyper-V&lt;/strong&gt; In earlier testing cycles of a migration deployment, Hyper-V makes a convenient technology choice to quickly create and destroy SQL Server installations. In most production mission-critical applications, it does not perform as well as physical server blades. &lt;strong&gt; &lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SAN Storage&lt;/strong&gt; Production systems that utilize FCI for high availability require the performance and data security offered by a full storage area network (SAN) solution with fibre channel. Instead, the walkthrough asks you to use iSCSI Software Target to simulate SAN storage. You should fully understand that iSCSI is not practical for most real-life tier-1 environments.&lt;strong&gt; &lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Redundancy&lt;/strong&gt; Hardware redundancy is crucial on the physical network for a production environment to circumvent outages due to network anomalies. You are not asked to abide by this rule in the walkthrough, but you are advised to follow best practices in your production environment.&lt;strong&gt; &lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The walkthrough steps are the same whether you use physical hardware or simulate them in Hyper-V. Moreover, if you have access to SAN hardware and redundant network cards for your test environment, you are welcome to follow the steps using them instead of accepting the simplifications outlined above. As an alternative, you can introduce the hardware after you have successfully performed the migration steps without them.&lt;/p&gt;
&lt;h3&gt;Success Criteria&lt;/h3&gt;
&lt;p&gt;This walkthrough attempts to balance between a real-life migration environment and requirements and the generalized use case. While it does not possess the complexity of a real-life scenario, I have included a few common migration criteria.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maintain separation of roles, where applicable (domain administrator, database administrator, application developer)&lt;/li&gt;
&lt;li&gt;Minimize downtime during migration&lt;/li&gt;
&lt;li&gt;During migration, approximate the HADR capabilities of the pre-migration solution&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;To implement the base configuration described in this whitepaper, you need following hardware and/or software. You can instead use your existing HADR solution as the base configuration as long as the solution characteristics are the same as the characteristics outlined in the &lt;strong&gt;Start&lt;/strong&gt; column of Table 1.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardware to implement the network topology in Figure 1, including servers, switches, and so on. You can also implement the network topology virtually using Hyper-V.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx"&gt;Windows Server 2008 R2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=19867"&gt;iSCSI Software Target 3.3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/sqlserver/en/us/get-sql-server/try-it.aspx"&gt;SQL Server 2008 R2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/express"&gt;Visual Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/cc442495"&gt;Windows 7&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To perform the migration, you need the following additional hardware and/or software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two server machines, physical or virtual, to use as intermediary hardware&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/sqlserver/en/us/get-sql-server/try-it.aspx"&gt;SQL Server 2012&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/976097"&gt;KB 976097&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/2494036"&gt;KB 2494036&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Step 0: Set up Base Configuration as the Starting Point&lt;/h2&gt;
&lt;p&gt;Finally, we are ready to start!&lt;/p&gt;
&lt;p&gt;First, you implement the network topology shown in the diagram below and the SQL Server configuration outlined in the &lt;strong&gt;Start&lt;/strong&gt; column of Table 1. The two subnets simulate the two sites in Contoso Corporation. The client machine will simulate write access to the SQL Server instances during the migration process. If you intend to use your existing HADR solution to test the migration steps, skip&amp;nbsp;the rest of the steps in this blog&amp;nbsp;and see&amp;nbsp;&lt;span style="background-color: yellow;"&gt;Part 2&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6470.092812_5F00_1921_5F00_HowToMigrat1.png" /&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt; &lt;br /&gt;&lt;strong&gt;Figure 1 Network Topology for Base Configuration &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The walkthrough steps will focus on the software configuration on the server nodes and not on the implementation of the network topology.&lt;/p&gt;
&lt;h3&gt;Set up the Domain Controller and Accounts&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Domain Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Set up the domain controller using the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc753100(v=ws.10).aspx"&gt;Set up the domain controller&lt;/a&gt; (DC) with the domain specifications as shown in the table below.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin-left: 41pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Domain Name&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;FQDN&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;corp.contoso.com&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li value="2"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc784390(v=WS.10).aspx"&gt;Create the domain &lt;strong&gt;user&lt;/strong&gt; accounts&lt;/a&gt; as shown in the table below:&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin-left: 41pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Domain Administrator&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\Administrator&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;SQL Installation&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\Install&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Database Administrator&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\DBAdmin&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;Client Application&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLClient&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;&lt;strong&gt;SQL Service Accounts&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLSvc3 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent2 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;"&gt;CORP\SQLAgent3&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Deploy SQL Server 2008 R2 FCIs&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Following the procedures at &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/06/05/quickly-setup-sql-server-alwayson-failover-cluster-instance-fci-in-hyper-v.aspx"&gt;Quickly Setup SQL Server AlwaysOn Failover Cluster Instance (FCI) in Hyper-V&lt;/a&gt;, deploy the FCIs for the primary site and for the remote site using the specifications in the table below. The steps in the blog post can be applied to both physical and Hyper-V environments.&lt;/p&gt;
&lt;div style="margin-left: 5pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 213px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;FCI Name&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;FCI1&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;span style="color: #44546a;"&gt;&lt;strong&gt;FCI2&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;WSFC Cluster Name&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Cluster1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;Cluster2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Server Version&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQL Server 2008 R2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;SQL Server 2008 R2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;FCI Network Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI1&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Instance Name&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;LIVE_INST&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;LIVE_INST&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Machine Names&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;PRIMARY1&lt;/p&gt;
&lt;p&gt;PRIMARY2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;REMOTE1&lt;/p&gt;
&lt;p&gt;REMOTE2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;File Server Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FILE1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FILE2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Cluster Service IP Address&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;10.1.1.111&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;10.2.2.222&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Service Account&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Agent Account&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLAgent1&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLAgent2&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The steps given in the blog post shows you how to setup your FCIs with the &lt;strong&gt;Node and Disk Majority&lt;/strong&gt; quorum model. This quorum model preserves the high availability of your FCI in a single-node failure. Figure 2 and Figure 3 show the details of the two FCIs you created, as viewed in Failover Cluster Manager.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/7041.092812_5F00_1921_5F00_HowToMigrat2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 2 FCI1 in Base Configuration as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/2063.092812_5F00_1921_5F00_HowToMigrat3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 3 FCI2 in Base Configuration as Shown in Failover Cluster Manager &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Create Databases and Configure Database Mirroring&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Perform the following steps to create the databases and configure database mirroring sessions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt; (SSMS), connect to &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt; and &lt;a href="http://technet.microsoft.com/en-us/library/ms186312.aspx"&gt;create two databases&lt;/a&gt;, named &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms188264.aspx"&gt;Create a table&lt;/a&gt; in both &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;, called, &lt;strong&gt;table1&lt;/strong&gt;, using the following script:&lt;/div&gt;
&lt;p style="background: #dddddd;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;CREATE TABLE dbo.table1(col1 nchar(10), col2 nchar(10)) &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms189053.aspx"&gt;Prepare the mirror databases&lt;/a&gt; for DB1 and DB2 in &lt;strong&gt;FCI2\LIVE_INST&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms188712.aspx"&gt;Establish the database mirroring sessions&lt;/a&gt; on the two databases using the specification shown in the table below.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin-left: 41pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 213px;" /&gt;&lt;col style="width: 221px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Role&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #d9d9d9 1.0pt; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI1\LIVE_INST&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Service Account&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Principal Endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://fci1.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Role&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;FCI2\LIVE_INST&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Service Account&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;CORP\SQLSvc2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Mirror Endpoint&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;TCP://fci2.corp.contoso.local:5022&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #d9d9d9 1.0pt; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;&lt;strong&gt;Operating Mode&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #d9d9d9 1.0pt; border-right: solid #d9d9d9 1.0pt;"&gt;
&lt;p&gt;High performance (asynchronous)&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Figure 4 shows the view in the &lt;strong&gt;Mirroring&lt;/strong&gt; tab of the &lt;strong&gt;Database Properties&lt;/strong&gt; dialog after you have successfully set up database mirroring for DB1.&lt;strong&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-36-metablogapi/6283.092812_5F00_1921_5F00_HowToMigrat4.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 9pt;"&gt;&lt;strong&gt;Figure 4 Database Properties View for Database Mirroring of DB1 &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Configure Access for the Client Application&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Role: Database Administrator &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You next set up a client workload to test the HADR capabilities of your HADR solution. First, you must make sure that the account used for client access (in this case, &lt;strong&gt;CORP\SQLClient&lt;/strong&gt;) can access both the principal and mirror databases in the database mirroring configuration.&lt;/p&gt;
&lt;p&gt;Perform the following steps in SSMS:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt;, add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;, and give it the following database memberships for both &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt;:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; for both &lt;strong&gt;DB1&lt;/strong&gt; and &lt;strong&gt;DB2&lt;/strong&gt; to &lt;strong&gt;FCI2\LIVE_INST&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In &lt;strong&gt;FCI2\LIVE_INST&lt;/strong&gt;, add &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; as a &lt;a href="http://technet.microsoft.com/en-us/library/aa337562.aspx"&gt;login&lt;/a&gt;, and give it the following database memberships for both DB1 and DB2:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;db_datareader&lt;/li&gt;
&lt;li&gt;db_datawriter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Perform a &lt;a href="http://technet.microsoft.com/en-us/library/ms186348.aspx"&gt;manual database mirroring failover&lt;/a&gt; back to &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You will use &lt;strong&gt;CORP\SQLClient&lt;/strong&gt; to connect to the databases from the client application. If a failure happens during your migration process, you have ensured that clients have access to &lt;strong&gt;FCI2\LIVE_INST&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Role: Application Developer &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You are now ready to simulate the client workload. On CLIENT, perform the following steps to run the client application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href="http://technet.microsoft.com/en-us/evalcenter/cc442495"&gt;Windows 7&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Join the machine to the &lt;strong&gt;corp.contoso.com&lt;/strong&gt; domain using the &lt;strong&gt;CORP\Administrator&lt;/strong&gt; account.&lt;/li&gt;
&lt;li&gt;Logout and login as &lt;strong&gt;CORP\Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;SQL Server 2008 R2 Management Studio&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Start SSMS and connect to &lt;strong&gt;FCI1\LIVE_INST&lt;/strong&gt; and &lt;strong&gt;FCI2\LIVE_INST&lt;/strong&gt; to verify that the FCIs can accept remote connections.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="http://www.microsoft.com/express"&gt;Visual Studio&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Logout and login as &lt;strong&gt;CORP\SQLClient&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/zfzh36t7(v=vs.100).aspx"&gt;Create a console application&lt;/a&gt; (named &lt;strong&gt;ConsoleApplication1&lt;/strong&gt; by default), and then replace the code in &lt;strong&gt;Program.cs&lt;/strong&gt; with the code below. This code continually attempts to connect to DB1 and insert a record. Each connection attempt has three retries and a 5-second interval between each retry. The connection logic is taken from &lt;a href="http://technet.microsoft.com/en-us/library/cc917713.aspx"&gt;Implementing Application Failover with Database Mirroring&lt;/a&gt;.&lt;/div&gt;
&lt;p style="background: #dddddd; margin-bottom: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using &lt;span style="color: black;"&gt;System; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Data; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Data.SqlClient; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;using&lt;span style="color: black;"&gt; System.Threading; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: #0070c0; font-family: Courier New; font-size: 9pt;"&gt;namespace &lt;span style="color: black;"&gt;ConsoleApplication1 &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;class &lt;span style="color: black;"&gt;Program &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; { &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; const string &lt;span style="color: black;"&gt;connString = &lt;span style="color: #c00000;"&gt;@"Server=FCI1\LIVE_INST;Failover Partner=FCI2\LIVE_INST;Initial Catalog=DB1;Integrated Security=True"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;span style="color: #0070c0;"&gt;static bool &lt;span style="color: black;"&gt;ExecuteSQLWithRetry_NoResults(&lt;span style="color: #0070c0;"&gt;string &lt;span style="color: black;"&gt;strConn, &lt;span style="color: #0070c0;"&gt;string &lt;span style="color: black;"&gt;strCmd, &lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iRetryInterval, &lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iMaxRetries) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; { &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; SqlConnection &lt;span style="color: black;"&gt;conn = null; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;SqlCommand &lt;span style="color: black;"&gt;cmd = null;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;span style="color: #0070c0;"&gt;for &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;int &lt;span style="color: black;"&gt;iRetryCount = 0; iRetryCount &amp;lt; iMaxRetries; iRetryCount++) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; { &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;nbsp; try&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;SqlConnection&lt;span style="color: black;"&gt;(strConn); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;conn.Open(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= conn &amp;amp;&amp;amp; ConnectionState.Open == conn.State) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cmd = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;SqlCommand&lt;span style="color: black;"&gt;(strCmd, conn); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;cmd.ExecuteNonQuery(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;return true&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;catch &lt;span style="color: black;"&gt;(&lt;span style="color: #00b0f0;"&gt;Exception &lt;span style="color: black;"&gt;ex) { } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;finally &lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;try&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= cmd) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;cmd.Dispose(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;null &lt;span style="color: black;"&gt;!= conn &amp;amp;&amp;amp; &lt;span style="color: #00b0f0;"&gt;ConnectionState&lt;span style="color: black;"&gt;.Closed != conn.State) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;conn.Close(); &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;catch &lt;span style="color: black;"&gt;(&lt;span style="color: #00b0f0;"&gt;Exception &lt;span style="color: black;"&gt;ex) { } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(iRetryCount &amp;lt; iMaxRetries) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Thread&lt;span style="color: black;"&gt;.Sleep(iRetryInterval * 1000); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;return false&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;static void &lt;span style="color: black;"&gt;Main(&lt;span style="color: #0070c0;"&gt;string&lt;span style="color: black;"&gt;[] args) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;while &lt;span style="color: black;"&gt;(&lt;span style="color: #0070c0;"&gt;true&lt;span style="color: black;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Random &lt;span style="color: black;"&gt;rand = &lt;span style="color: #0070c0;"&gt;new &lt;span style="color: #00b0f0;"&gt;Random&lt;span style="color: black;"&gt;(); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;string &lt;span style="color: black;"&gt;cmdString = &lt;span style="color: #c00000;"&gt;"Insert into table1 values (N'" &lt;span style="color: black;"&gt;+ rand.Next() + &lt;span style="color: #c00000;"&gt;"',N'" &lt;span style="color: black;"&gt;+ rand.Next() + &lt;span style="color: #c00000;"&gt;"')"&lt;span style="color: black;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;if &lt;span style="color: black;"&gt;(ExecuteSQLWithRetry_NoResults(connString, cmdString, 5, 3)) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Console&lt;span style="color: black;"&gt;.WriteLine(&lt;span style="color: #c00000;"&gt;"Success: " &lt;span style="color: black;"&gt;+ cmdString); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt; &lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;else &lt;span style="color: #00b0f0;"&gt;Console&lt;span style="color: black;"&gt;.WriteLine(&lt;span style="color: #c00000;"&gt;"Error: " &lt;span style="color: black;"&gt;+ cmdString); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #00b0f0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&lt;span style="color: #0070c0;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp; } &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dddddd; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: Courier New; font-size: 9pt;"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Run the application by opening the &lt;strong&gt;Debug&lt;/strong&gt; menu and clicking &lt;strong&gt;Start Debugging&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You have now finished setting up the base configuration and are ready to start the migration scenario to the SQL Server AlwaysOn solution in SQL Server 2012.&lt;/p&gt;
&lt;p&gt;But wait, this blog has gotten too long already! In &lt;a href="http://blogs.msdn.com/b/sqlalwayson/archive/2012/09/28/how-to-migrate-from-failover-cluster-instances-and-database-mirroring-to-sql-server-alwayson-part-2.aspx"&gt;the next installment&lt;/a&gt;, you will &lt;em&gt;actually&lt;/em&gt; start the migration steps. Stay tuned!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10354264" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Denali/">Denali</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Availability+Group/">Availability Group</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/AlwaysOn/">AlwaysOn</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Cluster+Instance/">Failover Cluster Instance</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Database+Mirroring/">Database Mirroring</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL/">SQL</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Cluster/">Cluster</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/SQL+Server+2012/">SQL Server 2012</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Failover+Clustering/">Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/FCI/">FCI</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/Windows+Server+Failover+Clustering/">Windows Server Failover Clustering</category><category domain="http://blogs.msdn.com/b/sqlalwayson/archive/tags/WSFC/">WSFC</category></item></channel></rss>