<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>xendesktop 7.1 sql mirroring &#8211; Carl Webster</title>
	<atom:link href="https://www.carlwebster.com/tag/xendesktop-7-1-sql-mirroring/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.carlwebster.com</link>
	<description>The Accidental Citrix Admin - The site for those who find themselves supporting Citrix involuntarily or accidentally</description>
	<lastBuildDate>Mon, 06 Sep 2021 21:12:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">42228915</site>	<item>
		<title>Changing a Production XenDesktop 7.1 Site to use SQL Mirroring</title>
		<link>https://www.carlwebster.com/changing-production-xendesktop-7x-site-use-sql-mirroring/</link>
					<comments>https://www.carlwebster.com/changing-production-xendesktop-7x-site-use-sql-mirroring/#comments</comments>
		
		<dc:creator><![CDATA[Carl Webster]]></dc:creator>
		<pubDate>Tue, 11 Feb 2014 09:30:32 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[XenApp/XenDesktop 7.0 - 7.7]]></category>
		<category><![CDATA[xendesktop 7.1 database mirror]]></category>
		<category><![CDATA[xendesktop 7.1 sql mirroring]]></category>
		<guid isPermaLink="false">https://www.carlwebster.com/?p=6943</guid>

					<description><![CDATA[In a previous article, I changed my lab&#8217;s PVS Farm to use SQL database mirroring.  Since that has been done it is time to change my XenDesktop 7.1 Site to also&#8230;]]></description>
										<content:encoded><![CDATA[<p>In a <a title="Changing a Production Provisioning Services SQL Database to Use Mirroring" href="https://www.carlwebster.com/changing-a-production-provisioning-services-sql-database-to-use-mirroring/" target="_blank" rel="noopener noreferrer">previous article</a>, I changed my lab&#8217;s PVS Farm to use SQL database mirroring.  Since that has been done it is time to change my XenDesktop 7.1 Site to also use SQL database mirroring.  I will document the process I found that worked.  It is not all like what is described in <a title="How to Reconfigure a XenDesktop Site to Use a Mirrored Database" href="http://support.citrix.com/article/CTX127538" target="_blank" rel="noopener noreferrer">CTX127538</a> <em>How to Reconfigure a XenDesktop Site to Use a Mirrored Database</em> but that article does have some valid information in it. I will also use information gleaned from two Citrix blogs: <a title="XD Tipster – SQL Mirroring: Just the Skinny Please…" href="http://blogs.citrix.com/2013/10/23/xd-tipster-sql-mirroring-just-the-skinny-please/" target="_blank" rel="noopener noreferrer">XD Tipster – SQL Mirroring: Just the Skinny Please…</a> and <a title="XenDesktop 7.x Database Migration" href="http://blogs.citrix.com/2014/02/05/xendesktop-7-x-database-migration/" target="_blank" rel="noopener noreferrer">XenDesktop 7.x Database Migration</a>.  They are helpful but they don&#8217;t have 75 screen shots!</p>
<p><span id="more-6943"></span><br />
<strong>Updated 11-Feb-2014</strong>.  A reader emailed me saying they had worked with Citrix support on this very process and gave me some information they felt should be added to this article.  Look for the <strong>Updated</strong> stuff in-line in the article.</p>
<p><strong>Updated 13-Feb-2014</strong> to answer questions asked.  Look for the <strong>Updated</strong> stuff in-line in the article.</p>
<p>My lab is running two XenDesktop 7.1 servers on Microsoft Windows Server 2012 R2 and three Microsoft SQL Server 2012 SP1 servers also running on Server 2012 R2.</p>
<p><strong>Update 30-Mar-2016:</strong> When I wrote this article, I knew it worked with version 7.1 but never tested it with later versions. Since Citrix has added additional features and services in 7.5, 7.6, 7.7 and 7.8, <span style="text-decoration: underline;">do not attempt to use this article for anything other than version 7.1</span>. Citrix really should have a thoroughly documented process for this procedure for each version of XenApp/XenDesktop 7.x. Most important, you should never attempt anything in a production environment until you have tested it in a lab or test environment.  I have changed the title of this article from 7.x to 7.1.</p>
<p><strong>Note:</strong> The Witness SQL server can run SQL Server Express but I already had full SQL Server installed on three servers so I decided to use full SQL Server and not SQL Server Express for the Witness server.</p>
<p>When I created my Site, I allowed Studio to create and configure the Site database.  The Site configuration, Configuration Logging and Monitoring are all using the same database.  <a title="Change secondary database locations" href="http://support.citrix.com/proddocs/topic/xendesktop-71/cds-change-db-location.html" target="_blank" rel="noopener noreferrer">eDocs</a> say if database mirroring is configured first, when the secondary databases are moved, Studio can automatically create the new databases AND configure mirroring.  We will see if that is true.</p>
<p>I will be using my Controller XD71Studio1 (Studio1) to run all the PowerShell scripts.</p>
<p>The first thing to do is to install SQLCMD or the SQL Command Line Utilities.  This is needed to give the Controllers permissions to the databases</p>
<p>Because I am using SQL Server 2012 SP1, I had to download the SQL Server 2012 SP1 Feature Pack.  From the download page, I selected ENU\x64\SqlCmdLnUtils.msi which required that ENU\x64\sqlncli.msi (SQL Server Native Client) be installed first.  Installing the SQL Server Native Client may require a server restart.</p>
<p>I created a security group named <em>SQLServers</em> that has all three SQL Servers as members.  This security group will be used when mirroring is configured later using a wizard in SQL Server.</p>
<figure id="attachment_49571" aria-describedby="caption-attachment-49571" style="width: 414px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure001-2.png"><img fetchpriority="high" decoding="async" class="size-full wp-image-49571" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure001-2.png" alt="Figure 1" width="414" height="480" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure001-2.png 414w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure001-2-259x300.png 259w" sizes="(max-width: 414px) 100vw, 414px" /></a><figcaption id="caption-attachment-49571" class="wp-caption-text">Figure 1</figcaption></figure>
<p>The members of the SQLServers security group.</p>
<figure id="attachment_49572" aria-describedby="caption-attachment-49572" style="width: 414px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure002-3.png"><img decoding="async" class="size-full wp-image-49572" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure002-3.png" alt="Figure 2" width="414" height="480" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure002-3.png 414w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure002-3-259x300.png 259w" sizes="(max-width: 414px) 100vw, 414px" /></a><figcaption id="caption-attachment-49572" class="wp-caption-text">Figure 2</figcaption></figure>
<p>The Site configuration as shown in Studio shows I am not configured for database mirroring.</p>
<dl id="attachment_6855">
<dt></dt>
</dl>
<figure id="attachment_49573" aria-describedby="caption-attachment-49573" style="width: 670px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure003-1.png"><img decoding="async" class="size-full wp-image-49573" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure003-1.png" alt="Figure 3" width="670" height="342" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure003-1.png 670w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure003-1-530x271.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure003-1-600x306.png 600w" sizes="(max-width: 670px) 100vw, 670px" /></a><figcaption id="caption-attachment-49573" class="wp-caption-text">Figure 3</figcaption></figure>
<p>The first thing that must be done is to change the <em>Recovery model</em> of the database that Studio created automatically.  Studio created the database using the Simple Recovery model but mirroring requires the use of the Full Recovery model.  Please see <a title="Prerequisites, Restrictions, and Recommendations for Database Mirroring" href="http://technet.microsoft.com/en-us/library/ms366349.aspx" target="_blank" rel="noopener noreferrer">Prerequisites, Restrictions, and Recommendations for Database Mirroring</a>.</p>
<p>&#8220;The database must use the full recovery model. The simple and bulk-logged recovery models do not support database mirroring. Therefore, bulk operations are always fully logged for a mirrored database.&#8221;</p>
<p>On the SQL Server that has the Site database, open the SQL Server Management Studio, expand <em>Databases</em>, right-click the Site database, click <em>Properties</em> and click <em>Options</em> in the left pane.</p>
<dl id="attachment_6856">
<dt></dt>
</dl>
<figure id="attachment_49574" aria-describedby="caption-attachment-49574" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure004-2.png"><img loading="lazy" decoding="async" class="size-full wp-image-49574" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure004-2.png" alt="Figure 4" width="704" height="632" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure004-2.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure004-2-334x300.png 334w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure004-2-600x539.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49574" class="wp-caption-text">Figure 4</figcaption></figure>
<p>Change the <em>Recovery model</em> to <em>Full</em> and click <em>OK</em>.</p>
<dl id="attachment_6857">
<dt></dt>
</dl>
<figure id="attachment_49575" aria-describedby="caption-attachment-49575" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure005-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49575" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure005-1.png" alt="Figure 5" width="704" height="632" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure005-1.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure005-1-334x300.png 334w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure005-1-600x539.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49575" class="wp-caption-text">Figure 5</figcaption></figure>
<p>Eight XenDesktop services in the site must be disconnected from the current database by running the following PowerShell script.</p>
<pre class="brush: powershell; title: ; notranslate">
Add-PSSnapin Citrix*

$controllers = Get-BrokerController | %{$_.DNSName}

foreach ($controller in $controllers)
{
    Write-Host &quot;Disconnect controller $controller ...&quot;

    Set-SfDBConnection $null –AdminAddress $controller
    Set-AcctDBConnection $null –AdminAddress $controller
    Set-BrokerDBConnection $null –AdminAddress $controller
    Set-ConfigDBConnection $null –AdminAddress $controller
    Set-AdminDBConnection $null –AdminAddress $controller
    Set-EnvtestDBConnection $null –AdminAddress $controller
    Set-HypDBConnection $null –AdminAddress $controller
    Set-ProvDBConnection $null –AdminAddress $controller
}
</pre>
<p><strong>Updated</strong>: The reader said Citrix support had them run these commands to disconnect services.</p>
<pre class="brush: powershell; title: ; notranslate">
$controllers = Get-BrokerController | %{$_.DNSName}

foreach ($controller in $controllers)
{
    Write-Host &quot;Disconnect controller $controller ...&quot;

    Set-ConfigDBConnection -DBConnection $null -AdminAddress $Controller
    Set-AcctDBConnection -DBConnection $null -AdminAddress $Controller
    Set-HypDBConnection -DBConnection $null -AdminAddress $Controller
    Set-ProvDBConnection -DBConnection $null -AdminAddress $Controller
    Set-BrokerDBConnection -DBConnection $null -AdminAddress $Controller
    Set-EnvTestDBConnection -DBConnection $null -AdminAddress $Controller
    Set-SfDBConnection -DBConnection $null -AdminAddress $Controller
    Set-MonitorDBConnection -Datastore Monitor -DBConnection $null -AdminAddress $Controller
    reset-MonitorDataStore -DataStore Monitor
    Set-MonitorDBConnection -DBConnection $null -AdminAddress $Controller
    Set-LogDBConnection -DataStore Logging -DBConnection $null -AdminAddress $Controller
    reset-LogDataStore -DataStore Logging
    Set-LogDBConnection -DBConnection $null -AdminAddress $Controller
    Set-AdminDBConnection -DBConnection $null -AdminAddress $Controller
}
</pre>
<p>Leave that PowerShell session running.</p>
<p>Now to start configuring the database to be mirrored.</p>
<p>The next step is to do two backups of the Site database.  One for the database and one for the transaction logs.</p>
<p>Still in the Databases node of the SQL Server Management Studio, right-click the Site database, click <em>Tasks</em> and click <em>Back Up</em>.</p>
<dl id="attachment_6858">
<dt></dt>
</dl>
<figure id="attachment_49576" aria-describedby="caption-attachment-49576" style="width: 607px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure006-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49576" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure006-1.png" alt="Figure 6" width="607" height="319" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure006-1.png 607w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure006-1-530x279.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure006-1-600x315.png 600w" sizes="auto, (max-width: 607px) 100vw, 607px" /></a><figcaption id="caption-attachment-49576" class="wp-caption-text">Figure 6</figcaption></figure>
<p>Leave the <em>Backup type</em> as <em>Full</em> and click <em>OK</em>.</p>
<dl id="attachment_6859">
<dt></dt>
</dl>
<figure id="attachment_49577" aria-describedby="caption-attachment-49577" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure007-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49577" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure007-1.png" alt="Figure 7" width="704" height="634" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure007-1.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure007-1-333x300.png 333w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure007-1-600x540.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49577" class="wp-caption-text">Figure 7</figcaption></figure>
<p>Click <em>OK</em>.</p>
<dl id="attachment_6861">
<dt></dt>
</dl>
<figure id="attachment_49578" aria-describedby="caption-attachment-49578" style="width: 621px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure008-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49578" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure008-1.png" alt="Figure 8" width="621" height="138" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure008-1.png 621w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure008-1-530x118.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure008-1-600x133.png 600w" sizes="auto, (max-width: 621px) 100vw, 621px" /></a><figcaption id="caption-attachment-49578" class="wp-caption-text">Figure 8</figcaption></figure>
<p>Repeat the process for the second backup.  Right-click the Site database, click <em>Tasks</em> and click <em>Back Up</em>.</p>
<dl id="attachment_6858">
<dt></dt>
</dl>
<figure id="attachment_49579" aria-describedby="caption-attachment-49579" style="width: 607px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure009-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49579" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure009-1.png" alt="Figure 9" width="607" height="319" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure009-1.png 607w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure009-1-530x279.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure009-1-600x315.png 600w" sizes="auto, (max-width: 607px) 100vw, 607px" /></a><figcaption id="caption-attachment-49579" class="wp-caption-text">Figure 9</figcaption></figure>
<p>Change the <em>Backup type</em> to <em>Transaction Log</em> and click <em>OK</em>.</p>
<dl id="attachment_6862">
<dt></dt>
</dl>
<figure id="attachment_49580" aria-describedby="caption-attachment-49580" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure010-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49580" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure010-1.png" alt="Figure 10" width="704" height="632" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure010-1.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure010-1-334x300.png 334w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure010-1-600x539.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49580" class="wp-caption-text">Figure 10</figcaption></figure>
<p>Click <em>OK</em>.</p>
<dl id="attachment_6863">
<dt></dt>
</dl>
<figure id="attachment_49581" aria-describedby="caption-attachment-49581" style="width: 621px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure011-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49581" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure011-1.png" alt="Figure 11" width="621" height="138" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure011-1.png 621w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure011-1-530x118.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure011-1-600x133.png 600w" sizes="auto, (max-width: 621px) 100vw, 621px" /></a><figcaption id="caption-attachment-49581" class="wp-caption-text">Figure 11</figcaption></figure>
<p>The backup on the primary SQL server needs to be copied to the same location on what will be the mirror SQL server.  For my lab, XD71SQL1 is the primary and XD71SQL2 is the mirror.</p>
<p>What I did is on SQL1 open up Windows Explorer to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup and also open up an Explorer window to &#92;xd71sql2\c$\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup.  I then copied and pasted the backup file from SQL1 to SQL2.</p>
<dl id="attachment_6864">
<dt></dt>
</dl>
<figure id="attachment_49582" aria-describedby="caption-attachment-49582" style="width: 802px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49582" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1.png" alt="Figure 12" width="802" height="486" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1.png 802w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1-495x300.png 495w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1-768x465.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure012-1-600x364.png 600w" sizes="auto, (max-width: 802px) 100vw, 802px" /></a><figcaption id="caption-attachment-49582" class="wp-caption-text">Figure 12</figcaption></figure>
<p>Exit both explorer windows.</p>
<p>Either go to SQL2 or add SQL2 to the SQL Server Management Studio on SQL1 (which is what I did).</p>
<p><strong>Note:</strong> Please make sure your SQL Servers are running the same version or you will run into issues.  Don&#8217;t ask me how I found that out. 🙂</p>
<figure id="attachment_49583" aria-describedby="caption-attachment-49583" style="width: 333px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure013-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49583" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure013-1.png" alt="Figure 13" width="333" height="304" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure013-1.png 333w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure013-1-329x300.png 329w" sizes="auto, (max-width: 333px) 100vw, 333px" /></a><figcaption id="caption-attachment-49583" class="wp-caption-text">Figure 13</figcaption></figure>
<p>For the mirror server connection (SQL2 for me), right-click <em>Databases</em> and click <em>Restore Database</em>.</p>
<figure id="attachment_49584" aria-describedby="caption-attachment-49584" style="width: 311px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure014-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49584" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure014-1.png" alt="Figure 14" width="311" height="204" /></a><figcaption id="caption-attachment-49584" class="wp-caption-text">Figure 14</figcaption></figure>
<p>Change <em>Source</em> to <em>Device</em> and click the browse button.</p>
<figure id="attachment_49585" aria-describedby="caption-attachment-49585" style="width: 702px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure015-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49585" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure015-1.png" alt="Figure 15" width="702" height="614" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure015-1.png 702w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure015-1-343x300.png 343w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure015-1-600x525.png 600w" sizes="auto, (max-width: 702px) 100vw, 702px" /></a><figcaption id="caption-attachment-49585" class="wp-caption-text">Figure 15</figcaption></figure>
<p>Browse to the backup file copied from the primary SQL server, click on the backup file and click <em>OK</em>.</p>
<dl id="attachment_6869">
<dt></dt>
</dl>
<figure id="attachment_49586" aria-describedby="caption-attachment-49586" style="width: 649px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure016-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49586" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure016-1.png" alt="Figure 16" width="649" height="473" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure016-1.png 649w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure016-1-412x300.png 412w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure016-1-600x437.png 600w" sizes="auto, (max-width: 649px) 100vw, 649px" /></a><figcaption id="caption-attachment-49586" class="wp-caption-text">Figure 16</figcaption></figure>
<p>Click <em>OK</em>.</p>
<figure id="attachment_49587" aria-describedby="caption-attachment-49587" style="width: 406px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure017-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49587" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure017-1.png" alt="Figure 17" width="406" height="299" /></a><figcaption id="caption-attachment-49587" class="wp-caption-text">Figure 17</figcaption></figure>
<p>Make sure the <em>Database</em> is your Site database and both <em>Backup sets to restore</em> are selected.  <strong>DO NOT</strong> click <em>OK</em> at this time.</p>
<dl id="attachment_6875">
<dt></dt>
</dl>
<figure id="attachment_49588" aria-describedby="caption-attachment-49588" style="width: 878px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49588" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1.png" alt="Figure 18" width="878" height="728" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1.png 878w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1-362x300.png 362w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1-768x637.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure018-1-600x497.png 600w" sizes="auto, (max-width: 878px) 100vw, 878px" /></a><figcaption id="caption-attachment-49588" class="wp-caption-text">Figure 18</figcaption></figure>
<p>Click <em>Options</em> in the left pane, change the <em>Recovery state</em> to <em>RESTORE WITH NORECOVERY</em> and click <em>OK.</em></p>
<dl id="attachment_6876">
<dt></dt>
</dl>
<figure id="attachment_49589" aria-describedby="caption-attachment-49589" style="width: 878px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49589" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1.png" alt="Figure 19" width="878" height="728" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1.png 878w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1-362x300.png 362w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1-768x637.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure019-1-600x497.png 600w" sizes="auto, (max-width: 878px) 100vw, 878px" /></a><figcaption id="caption-attachment-49589" class="wp-caption-text">Figure 19</figcaption></figure>
<p>Click <em>OK</em>.</p>
<dl id="attachment_6877">
<dt></dt>
</dl>
<figure id="attachment_49590" aria-describedby="caption-attachment-49590" style="width: 336px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure020-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49590" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure020-1.png" alt="Figure 20" width="336" height="172" /></a><figcaption id="caption-attachment-49590" class="wp-caption-text">Figure 20</figcaption></figure>
<p>Expand <em>Databases</em> on the mirror server.  The Site database should say &#8220;<em>(Restoring&#8230;)</em>&#8220;.</p>
<dl id="attachment_6878">
<dt></dt>
</dl>
<figure id="attachment_49591" aria-describedby="caption-attachment-49591" style="width: 415px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure021-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49591" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure021-1.png" alt="Figure 21" width="415" height="246" /></a><figcaption id="caption-attachment-49591" class="wp-caption-text">Figure 21</figcaption></figure>
<p>On the principal server, expand <em>Databases</em>, right-click the Site database, click <em>Tasks</em> and click <em>Mirror</em>.</p>
<dl id="attachment_6879">
<dt></dt>
</dl>
<figure id="attachment_49592" aria-describedby="caption-attachment-49592" style="width: 605px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure022-2.png"><img loading="lazy" decoding="async" class="size-full wp-image-49592" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure022-2.png" alt="Figure 22" width="605" height="303" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure022-2.png 605w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure022-2-530x265.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure022-2-600x300.png 600w" sizes="auto, (max-width: 605px) 100vw, 605px" /></a><figcaption id="caption-attachment-49592" class="wp-caption-text">Figure 22</figcaption></figure>
<p>Click <em>Configure Security</em>.</p>
<dl id="attachment_6881">
<dt></dt>
</dl>
<figure id="attachment_49593" aria-describedby="caption-attachment-49593" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure023-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49593" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure023-1.png" alt="Figure 23" width="704" height="632" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure023-1.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure023-1-334x300.png 334w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure023-1-600x539.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49593" class="wp-caption-text">Figure 23</figcaption></figure>
<p>Click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49594" aria-describedby="caption-attachment-49594" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure024-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49594" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure024-1.png" alt="Figure 24" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure024-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure024-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49594" class="wp-caption-text">Figure 24</figcaption></figure>
<p>Verify <em>Yes</em> is selected and click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49595" aria-describedby="caption-attachment-49595" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure025-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49595" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure025-1.png" alt="Figure 25" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure025-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure025-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49595" class="wp-caption-text">Figure 25</figcaption></figure>
<p>Verify <em>Witness server instance</em> is selected and click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49596" aria-describedby="caption-attachment-49596" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure026-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49596" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure026-1.png" alt="Figure 26" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure026-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure026-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49596" class="wp-caption-text">Figure 26</figcaption></figure>
<p>Click <em>Next</em></p>
<p>&nbsp;</p>
<figure id="attachment_49597" aria-describedby="caption-attachment-49597" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure027-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49597" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure027-1.png" alt="Figure 27" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure027-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure027-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49597" class="wp-caption-text">Figure 27</figcaption></figure>
<p>Select the mirror server from the <em>Mirror server instance</em> dropdown and click <em>Connect</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49598" aria-describedby="caption-attachment-49598" style="width: 400px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure028-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49598" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure028-1.png" alt="Figure 28" width="400" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure028-1.png 400w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure028-1-331x300.png 331w" sizes="auto, (max-width: 400px) 100vw, 400px" /></a><figcaption id="caption-attachment-49598" class="wp-caption-text">Figure 28</figcaption></figure>
<p>Click <em>Connect</em> to authenticate and connect to the mirror server.</p>
<p>&nbsp;</p>
<figure id="attachment_49599" aria-describedby="caption-attachment-49599" style="width: 341px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure029-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49599" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure029-1.png" alt="Figure 29" width="341" height="258" /></a><figcaption id="caption-attachment-49599" class="wp-caption-text">Figure 29</figcaption></figure>
<p>Click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49600" aria-describedby="caption-attachment-49600" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure030-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49600" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure030-1.png" alt="Figure 30" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure030-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure030-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49600" class="wp-caption-text">Figure 30</figcaption></figure>
<p>Select the witness server from the <em>Witness server instance</em> dropdown and click <em>Connect</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49601" aria-describedby="caption-attachment-49601" style="width: 400px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure031-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49601" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure031-1.png" alt="Figure 31" width="400" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure031-1.png 400w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure031-1-331x300.png 331w" sizes="auto, (max-width: 400px) 100vw, 400px" /></a><figcaption id="caption-attachment-49601" class="wp-caption-text">Figure 31</figcaption></figure>
<p>Click <em>Connect</em> to authenticate and connect to the witness server.</p>
<p>&nbsp;</p>
<figure id="attachment_49602" aria-describedby="caption-attachment-49602" style="width: 341px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure032-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49602" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure032-1.png" alt="Figure 32" width="341" height="258" /></a><figcaption id="caption-attachment-49602" class="wp-caption-text">Figure 32</figcaption></figure>
<p>Click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49603" aria-describedby="caption-attachment-49603" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure033-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49603" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure033-1.png" alt="Figure 33" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure033-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure033-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49603" class="wp-caption-text">Figure 33</figcaption></figure>
<p>Enter the SQLServers security account for all three instances and click <em>Next</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49604" aria-describedby="caption-attachment-49604" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure034-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49604" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure034-1.png" alt="Figure 34" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure034-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure034-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49604" class="wp-caption-text">Figure 34</figcaption></figure>
<p>Click <em>Finish</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49605" aria-describedby="caption-attachment-49605" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure035-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49605" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure035-1.png" alt="Figure 35" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure035-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure035-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49605" class="wp-caption-text">Figure 35</figcaption></figure>
<p>If all <em>Action</em> columns have a status of success, click <em>Close</em>.  Otherwise, view the report generated, resolve the issues reported, and rerun the Configure Security wizard.</p>
<p>&nbsp;</p>
<figure id="attachment_49606" aria-describedby="caption-attachment-49606" style="width: 401px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure036-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49606" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure036-1.png" alt="Figure 36" width="401" height="363" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure036-1.png 401w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure036-1-331x300.png 331w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a><figcaption id="caption-attachment-49606" class="wp-caption-text">Figure 36</figcaption></figure>
<p>Click <em>Start Mirroring</em> (and pray that everything works).</p>
<p>&nbsp;</p>
<figure id="attachment_49607" aria-describedby="caption-attachment-49607" style="width: 497px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure037-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49607" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure037-1.png" alt="Figure 37" width="497" height="214" /></a><figcaption id="caption-attachment-49607" class="wp-caption-text">Figure 37</figcaption></figure>
<p>WHEW, it worked.  Click <em>OK</em>.</p>
<dl id="attachment_6903">
<dt></dt>
</dl>
<figure id="attachment_49608" aria-describedby="caption-attachment-49608" style="width: 563px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure038-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49608" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure038-1.png" alt="Figure 38" width="563" height="506" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure038-1.png 563w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure038-1-334x300.png 334w" sizes="auto, (max-width: 563px) 100vw, 563px" /></a><figcaption id="caption-attachment-49608" class="wp-caption-text">Figure 38</figcaption></figure>
<p>In the SQL Server Management Studio, refresh the primary and mirror servers.  Expand <em>Databases</em> on both servers.  The principal server should show the Site database as <em>(Principal, Synchronized)</em> and the mirror server should show the Site database as <em>(Mirror, Synchronized / Restoring&#8230;)</em>.</p>
<dl id="attachment_6904">
<dt></dt>
</dl>
<figure id="attachment_49609" aria-describedby="caption-attachment-49609" style="width: 414px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure039-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49609" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure039-1.png" alt="Figure 39" width="414" height="483" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure039-1.png 414w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure039-1-257x300.png 257w" sizes="auto, (max-width: 414px) 100vw, 414px" /></a><figcaption id="caption-attachment-49609" class="wp-caption-text">Figure 39</figcaption></figure>
<p>Now do a basic test of the failover before continuing.</p>
<p>Go back to the SQL Server Management Studio.  On the principal server, expand <em>Databases</em>, right-click the Site database, click <em>Tasks</em> and click <em>Mirror</em>.</p>
<dl id="attachment_6925">
<dt></dt>
</dl>
<figure id="attachment_49610" aria-describedby="caption-attachment-49610" style="width: 739px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure040-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49610" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure040-1.png" alt="Figure 40" width="739" height="354" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure040-1.png 739w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure040-1-530x254.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure040-1-600x287.png 600w" sizes="auto, (max-width: 739px) 100vw, 739px" /></a><figcaption id="caption-attachment-49610" class="wp-caption-text">Figure 40</figcaption></figure>
<p>Click the <em>Failover</em> button.</p>
<dl id="attachment_6926">
<dt></dt>
</dl>
<figure id="attachment_49611" aria-describedby="caption-attachment-49611" style="width: 704px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure041-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49611" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure041-1.png" alt="Figure 41" width="704" height="632" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure041-1.png 704w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure041-1-334x300.png 334w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure041-1-600x539.png 600w" sizes="auto, (max-width: 704px) 100vw, 704px" /></a><figcaption id="caption-attachment-49611" class="wp-caption-text">Figure 41</figcaption></figure>
<p>Click <em>Yes</em>.</p>
<p>&nbsp;</p>
<figure id="attachment_49612" aria-describedby="caption-attachment-49612" style="width: 497px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure042-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49612" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure042-1.png" alt="Figure 42" width="497" height="162" /></a><figcaption id="caption-attachment-49612" class="wp-caption-text">Figure 42</figcaption></figure>
<p>Refresh both the principal and mirror servers, expand <em>Databases</em> and look at the database status.</p>
<p>The principal server now shows <em>(Mirror, Synchronized / Restoring&#8230;)</em> and the mirror server now shows <em>(Principal, Synchronized)</em>.</p>
<figure id="attachment_49613" aria-describedby="caption-attachment-49613" style="width: 417px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure043-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49613" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure043-1.png" alt="Figure 43" width="417" height="482" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure043-1.png 417w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure043-1-260x300.png 260w" sizes="auto, (max-width: 417px) 100vw, 417px" /></a><figcaption id="caption-attachment-49613" class="wp-caption-text">Figure 43</figcaption></figure>
<p><strong>Updated 13-Feb-2014</strong>:  I have added some explanations and more PowerShell to this section on adding logon.</p>
<p><del>Click the database on the mirror server and failover back to the principal server.</del>  Don&#8217;t failover back to the principal just yet.  Let me show you something.</p>
<p>Why are logons needed?  When Studio created the Site database it added the Controllers computer account as a login account on the SQL server.  When others Controllers are added to the Site, Studio asks if you want the Site database updated.  If the answer is Yes then Studio adds the new Controller as a login account on the SQL server.</p>
<p>Here is my principal SQL server&#8217;s login accounts after both Controllers are in the Site.</p>
<figure id="attachment_49614" aria-describedby="caption-attachment-49614" style="width: 400px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49614" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1.png" alt="Figure 44" width="400" height="400" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1.png 400w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1-300x300.png 300w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1-150x150.png 150w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure044-1-100x100.png 100w" sizes="auto, (max-width: 400px) 100vw, 400px" /></a><figcaption id="caption-attachment-49614" class="wp-caption-text">Figure 44</figcaption></figure>
<p>Here are my mirror SQL server&#8217;s login accounts after the database is restored, mirroring configured, and failed over.</p>
<figure id="attachment_49617" aria-describedby="caption-attachment-49617" style="width: 419px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure045-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49617" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure045-1.png" alt="Figure 45" width="419" height="385" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure045-1.png 419w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure045-1-326x300.png 326w" sizes="auto, (max-width: 419px) 100vw, 419px" /></a><figcaption id="caption-attachment-49617" class="wp-caption-text">Figure 45</figcaption></figure>
<p>What does this mean?  While the database is failed over to the mirror server and the Site database is accessed, neither Controller has permission to access the database on the mirror server so <strong>nothing</strong> will work.  We can test this by running <strong>Get-BrokerController</strong> from the PowerShell session.</p>
<figure id="attachment_49618" aria-describedby="caption-attachment-49618" style="width: 850px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49618" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1.png" alt="Figure 46" width="850" height="166" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1.png 850w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1-530x104.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1-768x150.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure046-1-600x117.png 600w" sizes="auto, (max-width: 850px) 100vw, 850px" /></a><figcaption id="caption-attachment-49618" class="wp-caption-text">Figure 46</figcaption></figure>
<p>Failback to the principal server, wait about 1 minute and run <strong>Get-BrokerController</strong> again.</p>
<figure id="attachment_49619" aria-describedby="caption-attachment-49619" style="width: 877px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49619" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1.png" alt="Figure 47" width="877" height="643" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1.png 877w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1-409x300.png 409w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1-768x563.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure047-1-600x440.png 600w" sizes="auto, (max-width: 877px) 100vw, 877px" /></a><figcaption id="caption-attachment-49619" class="wp-caption-text">Figure 47</figcaption></figure>
<p>The command works now because the principal SQL server has login accounts for both controllers.</p>
<p>Do not fail back over to the mirror server yet.</p>
<p>Next, logons need to be created on the new database server.</p>
<p>Back on the Controller, run the following script (substituting your information).</p>
<pre class="brush: powershell; title: ; notranslate">
$mirrorServer = 'XD71SQL2'
$dbName = 'XD71Site'
$controllers = Get-BrokerController | %{$_.DNSName}

foreach ($controller in $controllers)
{
    Write-Host &quot;Make login for $controller on $mirrorServer ...&quot;

    Get-BrokerDBSchema –DatabaseName $dbName –ScriptType Login –AdminAddress $controller &amp;gt; add-login.sql
    sqlcmd -S $mirrorServer -Q ':r add-login.sql'
}
</pre>
<figure id="attachment_49620" aria-describedby="caption-attachment-49620" style="width: 768px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure048-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49620" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure048-1.png" alt="Figure 48" width="768" height="244" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure048-1.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure048-1-530x168.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure048-1-600x191.png 600w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a><figcaption id="caption-attachment-49620" class="wp-caption-text">Figure 48</figcaption></figure>
<p>Login accounts created on the mirror server</p>
<p>The new logins now exist on the mirror server.</p>
<figure id="attachment_49621" aria-describedby="caption-attachment-49621" style="width: 415px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure049-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49621" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure049-1.png" alt="Figure 49" width="415" height="343" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure049-1.png 415w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure049-1-363x300.png 363w" sizes="auto, (max-width: 415px) 100vw, 415px" /></a><figcaption id="caption-attachment-49621" class="wp-caption-text">Figure 49</figcaption></figure>
<p>Now failover to the mirror server, wait 1 minute, and run <strong>Get-BrokerController</strong>.</p>
<figure id="attachment_49622" aria-describedby="caption-attachment-49622" style="width: 849px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49622" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1.png" alt="Figure 50" width="849" height="447" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1.png 849w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1-530x279.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1-768x404.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure050-1-600x316.png 600w" sizes="auto, (max-width: 849px) 100vw, 849px" /></a><figcaption id="caption-attachment-49622" class="wp-caption-text">Figure 50</figcaption></figure>
<p>A new connection string is needed to configure XenDesktop for mirroring.</p>
<p>‘Server=&lt;dbserver1&gt;; Failover Partner=&lt;dbserver2&gt;; Initial Catalog=&lt;dbname&gt;; Integrated Security=True; Network=dbmssocn’</p>
<p>For my lab, that becomes ‘Server=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71Site; Integrated Security=True; Network=dbmssocn’</p>
<p>To test the new connection string and verify login permissions, run the following script.</p>
<pre class="brush: powershell; title: ; notranslate">
$cs = &quot;Data Source=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71Site; Integrated Security=True; Network=dbmssocn&quot;
$controllers = Get-BrokerController | %{$_.DNSName}

foreach ($controller in $controllers)
{
    Write-Host &quot;Testing controller $controller ...&quot;

    Test-ConfigDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-AcctDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-HypDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-ProvDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-BrokerDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-EnvTestDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-SfDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-MonitorDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-MonitorDBConnection -DataStore Monitor -DBConnection $cs -AdminAddress $Controller
    Test-AdminDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-LogDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-LogDBConnection -Datastore Logging -DBConnection $cs -AdminAddress $Controller
}
</pre>
<p>&nbsp;</p>
<figure id="attachment_49623" aria-describedby="caption-attachment-49623" style="width: 877px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49623" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1.png" alt="Figure 51" width="877" height="643" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1.png 877w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1-409x300.png 409w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1-768x563.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure051-1-600x440.png 600w" sizes="auto, (max-width: 877px) 100vw, 877px" /></a><figcaption id="caption-attachment-49623" class="wp-caption-text">Figure 51</figcaption></figure>
<p>Then this script is run.</p>
<pre class="brush: powershell; title: ; notranslate">
$cs = ‘Server=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71Site; Integrated Security=True; Network=dbmssocn’

foreach ($controller in $controllers)
{
Write-Host &quot;Reconnect controller $controller ...&quot;

    Set-SfDBConnection –DBConnection $cs –AdminAddress $controller
    Set-AcctDBConnection –DBConnection $cs –AdminAddress $controller
    Set-BrokerDBConnection –DBConnection $cs –AdminAddress $controller
    Set-ConfigDBConnection –DBConnection $cs –AdminAddress $controller
    Set-AdminDBConnection –DBConnection $cs –AdminAddress $controller
    Set-EnvtestDBConnection –DBConnection $cs –AdminAddress $controller
    Set-HypDBConnection –DBConnection $cs –AdminAddress $controller
    Set-ProvDBConnection –DBConnection $cs –AdminAddress $controller
}
</pre>
<p>Now for the final services.</p>
<pre class="brush: powershell; title: ; notranslate">
foreach ($controller in $controllers)
{
    Write-Host &quot;Processing&amp;nbsp;controller $controller ...&quot;

    Set-LogDBConnection $null –AdminAddress $controller
    Set-MonitorDBConnection -DBConnection $null –AdminAddress $controller

    Set-LogDBConnection –DBConnection $cs –AdminAddress $controller
    Set-MonitorDBConnection –DBConnection $cs –AdminAddress $controller

    Set-MonitorDBConnection -Datastore Monitor -DBConnection $null –AdminAddress $controller
    Set-LogDBConnection -DataStore Logging -DBConnection $null –AdminAddress $controller

    Set-MonitorDBConnection -Datastore Monitor –DBConnection $cs –AdminAddress $controller
    Set-LogDBConnection -DataStore Logging –DBConnection $cs –AdminAddress $controller
}
</pre>
<p><strong>Update</strong>: The reader says Citrix Support did not do this in two separate steps but in one. This is what they said Citrix Support had them run.</p>
<pre class="brush: powershell; title: ; notranslate">
foreach ($controller in $controllers)
{
    Write-Host &quot;Reconnect controller $controller ...&quot;

    Set-AdminDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-LogDBConnection -DBConnection $cs -AdminAddress $Controller Set-ConfigDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-AcctDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-HypDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-ProvDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-BrokerDBConnection -DBConnection $cs -AdminAddress $Controller Set-EnvTestDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-SfDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-MonitorDBConnection -DBConnection $cs -AdminAddress $Controller
    Set-MonitorDBConnection -DataStore Monitor -DBConnection $cs -AdminAddress $Controller
    Set-LogDBConnection -Datastore Logging -DBConnection $cs -AdminAddress $Controller
}
</pre>
<p>They also said that if there are any errors, go to HKLM\Software\Citrix\XDservices&#92;Datastore\Connections and manually clear the connection string that is in the registry (insert the usual editing the registry may hose your server disclaimer).</p>
<p><strong>Note from Webster</strong>: That did not work for me. I had to use the two-step process. Your mileage may vary but I wanted to let you know what the reader said Citrix Support had them do and it worked for them.</p>
<p>Is everything still working?  Rerun the testing script.</p>
<pre class="brush: powershell; title: ; notranslate">
$cs = &quot;Data Source=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71Site; Integrated Security=True; Network=dbmssocn&quot;
$controllers = Get-BrokerController | %{$_.DNSName}

foreach ($controller in $controllers)
{
    Write-Host &quot;Testing controller $controller ...&quot;

    Test-ConfigDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-AcctDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-HypDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-ProvDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-BrokerDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-EnvTestDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-SfDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-MonitorDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-MonitorDBConnection -DataStore Monitor -DBConnection $cs -AdminAddress $Controller
    Test-AdminDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-LogDBConnection -DBConnection $cs -AdminAddress $Controller
    Test-LogDBConnection -Datastore Logging -DBConnection $cs -AdminAddress $Controller
}
</pre>
<figure id="attachment_49624" aria-describedby="caption-attachment-49624" style="width: 877px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49624" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1.png" alt="Figure 52" width="877" height="643" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1.png 877w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1-409x300.png 409w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1-768x563.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure052-1-600x440.png 600w" sizes="auto, (max-width: 877px) 100vw, 877px" /></a><figcaption id="caption-attachment-49624" class="wp-caption-text">Figure 52</figcaption></figure>
<p>Yep, everything tests as OK.</p>
<p>A refresh of Studio shows the database now configured for mirroring.</p>
<figure id="attachment_49626" aria-describedby="caption-attachment-49626" style="width: 663px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure053-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49626" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure053-1.png" alt="Figure 53" width="663" height="349" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure053-1.png 663w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure053-1-530x279.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure053-1-600x316.png 600w" sizes="auto, (max-width: 663px) 100vw, 663px" /></a><figcaption id="caption-attachment-49626" class="wp-caption-text">Figure 53</figcaption></figure>
<p>Now for the next part, splitting the databases and letting Studio create the Logging and Monitoring databases.</p>
<p>According to eDocs:</p>
<p>&#8220;If you previously installed and configured a mirror database using Microsoft SQL Server tools, both the principal and mirror databases are set up.&#8221;</p>
<p>We shall see if that is true.</p>
<p>In Studio. click the Logging database and in the right pane click <em>Change Database</em>.</p>
<figure id="attachment_49627" aria-describedby="caption-attachment-49627" style="width: 852px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49627" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1.png" alt="Figure 54" width="852" height="349" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1.png 852w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1-530x217.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1-768x315.png 768w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure054-1-600x246.png 600w" sizes="auto, (max-width: 852px) 100vw, 852px" /></a><figcaption id="caption-attachment-49627" class="wp-caption-text">Figure 54</figcaption></figure>
<p>Enter a name for the Logging database and click <em>OK.</em></p>
<figure id="attachment_49628" aria-describedby="caption-attachment-49628" style="width: 424px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure055-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49628" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure055-1.png" alt="Figure 55" width="424" height="296" /></a><figcaption id="caption-attachment-49628" class="wp-caption-text">Figure 55</figcaption></figure>
<p>Click <em>OK</em> for Studio to create the database.</p>
<figure id="attachment_49629" aria-describedby="caption-attachment-49629" style="width: 480px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure056-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49629" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure056-1.png" alt="Figure 56" width="480" height="238" /></a><figcaption id="caption-attachment-49629" class="wp-caption-text">Figure 56</figcaption></figure>
<p>After the Logging database is created, Studio refreshes and we see that the mirror configuration does not appear to have been created.</p>
<figure id="attachment_49630" aria-describedby="caption-attachment-49630" style="width: 641px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure057-2.png"><img loading="lazy" decoding="async" class="size-full wp-image-49630" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure057-2.png" alt="Figure 57" width="641" height="169" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure057-2.png 641w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure057-2-530x140.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure057-2-600x158.png 600w" sizes="auto, (max-width: 641px) 100vw, 641px" /></a><figcaption id="caption-attachment-49630" class="wp-caption-text">Figure 57</figcaption></figure>
<p>Go to SQL Server Management Studio, <em>Refresh </em>and expand <em>Databases</em> for both the primary and mirror servers.</p>
<figure id="attachment_49631" aria-describedby="caption-attachment-49631" style="width: 414px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure058-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49631" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure058-1.png" alt="Figure 58" width="414" height="538" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure058-1.png 414w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure058-1-231x300.png 231w" sizes="auto, (max-width: 414px) 100vw, 414px" /></a><figcaption id="caption-attachment-49631" class="wp-caption-text">Figure 58</figcaption></figure>
<p>Do you see a Logging database on the mirror server?  I don&#8217;t.   It appears eDocs is incorrect and &#8220;both the principal and mirror databases are [NOT] set up&#8221;.</p>
<p>Let&#8217;s go ahead and create the Monitoring database using the same process.</p>
<p>And no surprise now, no Monitoring database mirror configuration&#8230;</p>
<figure id="attachment_49632" aria-describedby="caption-attachment-49632" style="width: 639px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure059-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49632" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure059-1.png" alt="Figure 59" width="639" height="173" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure059-1.png 639w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure059-1-530x143.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure059-1-600x162.png 600w" sizes="auto, (max-width: 639px) 100vw, 639px" /></a><figcaption id="caption-attachment-49632" class="wp-caption-text">Figure 59</figcaption></figure>
<p>and no Monitoring database was created on the mirror server.</p>
<figure id="attachment_49633" aria-describedby="caption-attachment-49633" style="width: 415px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure060-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49633" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure060-1.png" alt="Figure 60" width="415" height="512" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure060-1.png 415w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure060-1-243x300.png 243w" sizes="auto, (max-width: 415px) 100vw, 415px" /></a><figcaption id="caption-attachment-49633" class="wp-caption-text">Figure 60</figcaption></figure>
<p>Using the process shown earlier, change the Recovery Model to Full, backup the Logging and Monitoring databases, copy the files and restore them on the mirror server.</p>
<figure id="attachment_49634" aria-describedby="caption-attachment-49634" style="width: 416px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure061-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49634" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure061-1.png" alt="Figure 61" width="416" height="306" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure061-1.png 416w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure061-1-408x300.png 408w" sizes="auto, (max-width: 416px) 100vw, 416px" /></a><figcaption id="caption-attachment-49634" class="wp-caption-text">Figure 61</figcaption></figure>
<p>Using the process shown earlier, configure both the Logging and Monitoring databases for Mirroring.</p>
<figure id="attachment_49635" aria-describedby="caption-attachment-49635" style="width: 416px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure062-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49635" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure062-1.png" alt="Figure 62" width="416" height="548" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure062-1.png 416w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure062-1-228x300.png 228w" sizes="auto, (max-width: 416px) 100vw, 416px" /></a><figcaption id="caption-attachment-49635" class="wp-caption-text">Figure 62</figcaption></figure>
<p><strong>Update:</strong>  Oops, copy and paste error in the original PowerShell code here.  Two new connection strings are needed.  One for the Logging database and one for the Monitoring database.</p>
<p>Now run this script.</p>
<pre class="brush: powershell; title: ; notranslate">
$csL = &amp;nbsp;&quot;Data Source=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71_Logging; Integrated Security=True; Network=dbmssocn&quot;
$csM = &amp;nbsp;&quot;Data Source=XD71SQL1; Failover Partner=XD71SQL2; Initial Catalog=XD71_Monitoring; Integrated Security=True; Network=dbmssocn&quot;
foreach ($controller in $controllers)
{
    Write-Host &quot;Processing&amp;nbsp;controller $controller ...&quot;

    Set-LogDBConnection $null –AdminAddress $controller
    Set-MonitorDBConnection -DBConnection $null –AdminAddress $controller

    Set-LogDBConnection –DBConnection $csL –AdminAddress $controller
    Set-MonitorDBConnection –DBConnection $csM –AdminAddress $controller

    Set-MonitorDBConnection -Datastore Monitor -DBConnection $null –AdminAddress $controller
    Set-LogDBConnection -DataStore Logging -DBConnection $null –AdminAddress $controller

    Set-MonitorDBConnection -Datastore Monitor –DBConnection $csM –AdminAddress $controller
    Set-LogDBConnection -DataStore Logging –DBConnection $csL –AdminAddress $controller
}
</pre>
<p>Refresh Studio and all three databases show as configured for mirroring.</p>
<figure id="attachment_49636" aria-describedby="caption-attachment-49636" style="width: 641px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure063-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49636" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure063-1.png" alt="Figure 63" width="641" height="169" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure063-1.png 641w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure063-1-530x140.png 530w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure063-1-600x158.png 600w" sizes="auto, (max-width: 641px) 100vw, 641px" /></a><figcaption id="caption-attachment-49636" class="wp-caption-text">Figure 63</figcaption></figure>
<p>CTX127538 shows how to test if the mirroring configuration is successful.</p>
<p>Run the following script:</p>
<pre class="brush: powershell; title: ; notranslate">
$cs = Get-BrokerDBConnection
Set-BrokerDBConnection –DBConnection $null
Set-BrokerDBConnection –DBConnection $cs
Get-BrokerServiceStatus
</pre>
<p>And verify the output matches the following:</p>
<p>DBUnconfigured<br />
OK<br />
OK</p>
<figure id="attachment_49637" aria-describedby="caption-attachment-49637" style="width: 567px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure064-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49637" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure064-1.png" alt="Figure 64" width="567" height="328" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure064-1.png 567w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure064-1-519x300.png 519w" sizes="auto, (max-width: 567px) 100vw, 567px" /></a><figcaption id="caption-attachment-49637" class="wp-caption-text">Figure 64</figcaption></figure>
<p>Using the SQL Server Management Studio, force a mirror failover of all three databases using the process shown earlier.</p>
<figure id="attachment_49638" aria-describedby="caption-attachment-49638" style="width: 424px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure065-1.png"><img loading="lazy" decoding="async" class="size-full wp-image-49638" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure065-1.png" alt="Figure 65" width="424" height="543" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure065-1.png 424w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure065-1-234x300.png 234w" sizes="auto, (max-width: 424px) 100vw, 424px" /></a><figcaption id="caption-attachment-49638" class="wp-caption-text">Figure 65</figcaption></figure>
<p>Rerun the preceding script and verify the output is correct.</p>
<figure id="attachment_49639" aria-describedby="caption-attachment-49639" style="width: 520px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure066.png"><img loading="lazy" decoding="async" class="size-full wp-image-49639" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure066.png" alt="Figure 66" width="520" height="305" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure066.png 520w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure066-511x300.png 511w" sizes="auto, (max-width: 520px) 100vw, 520px" /></a><figcaption id="caption-attachment-49639" class="wp-caption-text">Figure 66</figcaption></figure>
<p>Failover all three databases again.</p>
<figure id="attachment_49640" aria-describedby="caption-attachment-49640" style="width: 417px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure067.png"><img loading="lazy" decoding="async" class="size-full wp-image-49640" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure067.png" alt="Figure 67" width="417" height="543" srcset="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure067.png 417w, https://www.carlwebster.com/wp-content/uploads/2014/02/Figure067-230x300.png 230w" sizes="auto, (max-width: 417px) 100vw, 417px" /></a><figcaption id="caption-attachment-49640" class="wp-caption-text">Figure 67</figcaption></figure>
<p>Rerun the preceding script again and verify the expected output.</p>
<figure id="attachment_49641" aria-describedby="caption-attachment-49641" style="width: 525px" class="wp-caption alignnone"><a href="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure068.png"><img loading="lazy" decoding="async" class="size-full wp-image-49641" src="https://www.carlwebster.com/wp-content/uploads/2014/02/Figure068.png" alt="Figure 68" width="525" height="296" /></a><figcaption id="caption-attachment-49641" class="wp-caption-text">Figure 68</figcaption></figure>
<p>Whew!,  and that is all there is to changing a production XenDesktop Site to use SQL Mirroring in less than 75 screenshots</p>
<p>Thanks</p>
<p>Webster</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carlwebster.com/changing-production-xendesktop-7x-site-use-sql-mirroring/feed/</wfw:commentRss>
			<slash:comments>49</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6943</post-id>	</item>
	</channel>
</rss>
