<?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>SharePoint Hosting and Development : Disaster Recovery</title><link>http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx</link><description>Tags: Disaster Recovery</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Improving SharePoint with SQL Server 2008</title><link>http://blogs.msdn.com/mikewat/archive/2008/08/19/improving-sharepoint-with-sql-server-2008.aspx</link><pubDate>Tue, 19 Aug 2008 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8879521</guid><dc:creator>Michael Watson</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8879521.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8879521</wfw:commentRss><description>You might have noticed that SharePoint SP1 now supports SQL Server 2008 :-) http://blogs.msdn.com/sharepoint/archive/2008/08/15/sql-server-2008-support-for-sharepoint-products-and-technologies.aspx http://blogs.msdn.com/mikewat/archive/2008/08/19/sql-server-2008-is-now-officially-supported.aspx...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/08/19/improving-sharepoint-with-sql-server-2008.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8879521" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Hosting+_2800_General_2900_/default.aspx">Hosting (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+_2800_General_2900_/default.aspx">SharePoint (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Capacity+Planning/default.aspx">Capacity Planning</category></item><item><title>I’m Speaking at the SharePoint Best Practices Conference</title><link>http://blogs.msdn.com/mikewat/archive/2008/08/13/i-m-speaking-at-the-sharepoint-best-practices-conference.aspx</link><pubDate>Wed, 13 Aug 2008 20:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8859716</guid><dc:creator>Michael Watson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8859716.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8859716</wfw:commentRss><description>It’s official. I’ll be at the SharePoint Best Practices Conference September 15 th – 17 th in Washington DC. This will be a great conference. There are a lot of great speakers and sessions and the focus on best practices will cut out all the fluff. If...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/08/13/i-m-speaking-at-the-sharepoint-best-practices-conference.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8859716" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+_2800_General_2900_/default.aspx">SharePoint (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Capacity+Planning/default.aspx">Capacity Planning</category></item><item><title>SQL Mirroring Setup Made Easy</title><link>http://blogs.msdn.com/mikewat/archive/2008/07/30/sql-mirroring-setup-made-easy.aspx</link><pubDate>Thu, 31 Jul 2008 07:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8792885</guid><dc:creator>Michael Watson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8792885.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8792885</wfw:commentRss><description>In an ongoing effort to simplify mirroring I've decided to post the scripts I use to setup mirroring for myself. There are 9 easy steps to execute. The trick with most of these commands is that they output a script that you will need to copy into the...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/07/30/sql-mirroring-setup-made-easy.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8792885" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+_2800_General_2900_/default.aspx">SharePoint (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>DPM Search Backup White Paper.</title><link>http://blogs.msdn.com/mikewat/archive/2008/04/10/dpm-search-backup-white-paper.aspx</link><pubDate>Fri, 11 Apr 2008 07:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8378408</guid><dc:creator>Michael Watson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8378408.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8378408</wfw:commentRss><description>The DPM team released a whitepaper detailing how to backup MOSS search. http://www.microsoft.com/downloads/details.aspx?FamilyID=0150d17d-9f28-4ef6-8dc8-8fbb5fed5cfc&amp;amp;DisplayLang=en This is another feather in the DPM hat....(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/04/10/dpm-search-backup-white-paper.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8378408" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+_2800_General_2900_/default.aspx">SharePoint (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>More Clarification Needed? Geographic Separation of SharePoint Farm Components.</title><link>http://blogs.msdn.com/mikewat/archive/2008/04/03/more-clarification-needed-geographic-separation-of-sharepoint-farm-components.aspx</link><pubDate>Thu, 03 Apr 2008 20:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8354791</guid><dc:creator>Michael Watson</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8354791.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8354791</wfw:commentRss><description>I continue to hear questions and debate over how to build local or regional immunity into a single SharePoint farm. Enterprising SharePoint folks want to make sure that their SharePoint service remains online even if Dr. Evil fires the “laser” at their...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/04/03/more-clarification-needed-geographic-separation-of-sharepoint-farm-components.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8354791" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>The Newest Version of the Database Mirroring Whitepaper for SharePoint has been released</title><link>http://blogs.msdn.com/mikewat/archive/2008/03/03/the-newest-version-of-the-database-mirroring-whitepaper-for-sharepoint-has-been-released.aspx</link><pubDate>Mon, 03 Mar 2008 21:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8007501</guid><dc:creator>Michael Watson</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/8007501.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=8007501</wfw:commentRss><description>Using Database Mirroring with Office SharePoint Server and Windows SharePoint Services Wow! This one took a while to update. We added more prescriptive information on the type of supported topologies. It also recommends SQL connection aliasing for failover...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2008/03/03/the-newest-version-of-the-database-mirroring-whitepaper-for-sharepoint-has-been-released.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8007501" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Mirroring and Bandwidth</title><link>http://blogs.msdn.com/mikewat/archive/2007/11/16/mirroring-and-bandwidth.aspx</link><pubDate>Sat, 17 Nov 2007 03:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6322799</guid><dc:creator>Michael Watson</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/6322799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=6322799</wfw:commentRss><description>I just completed some testing to see how much network bandwidth between SQL nodes affects synchronous mirroring performance. The SQL mirroring white paper indicates that bandwidth does not matter much above 10Mbps, but that may lead you to the wrong conclusion...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2007/11/16/mirroring-and-bandwidth.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6322799" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>SQL Aliasing Pros and Cons</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/26/sql-aliasing-pros-and-cons.aspx</link><pubDate>Fri, 26 Oct 2007 22:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5744686</guid><dc:creator>Michael Watson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5744686.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5744686</wfw:commentRss><description>I wanted to write a quick note on the good and bad of using SQL aliasing for redirecting SharePoint between mirrored SQL nodes. Good - It's a very simple solution. Each application server in the farm simply needs to be configured with the alias information....(&lt;a href="http://blogs.msdn.com/mikewat/archive/2007/10/26/sql-aliasing-pros-and-cons.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5744686" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Restoring SQL Server. Model DB Restore gotcha</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/25/restoring-sql-server-model-db-gotcha.aspx</link><pubDate>Fri, 26 Oct 2007 04:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5725190</guid><dc:creator>Michael Watson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5725190.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5725190</wfw:commentRss><description>If somebody would have mentioned this, I would have 3 hours back. When recovering SQL server from a situation where you have lost the model database, make sure to remove the data and log files (if any exist) from the original directories before attempting...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2007/10/25/restoring-sql-server-model-db-gotcha.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5725190" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/Hosting+_2800_General_2900_/default.aspx">Hosting (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>DPM, SharePoint, and Database Mirroring</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/23/dpm-sharepoint-and-database-mirroring.aspx</link><pubDate>Wed, 24 Oct 2007 05:10:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5638799</guid><dc:creator>Michael Watson</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5638799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5638799</wfw:commentRss><description>Lately I've been working on System Center Data Protection Manager 2007 for protecting our SharePoint and SQL servers. If you are not familiar with DPM, DPM is all about protecting your servers by replicating block level differences to a disk based store....(&lt;a href="http://blogs.msdn.com/mikewat/archive/2007/10/23/dpm-sharepoint-and-database-mirroring.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5638799" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Are we planning for the wrong disasters?</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/21/are-we-planning-for-the-wrong-disasters.aspx</link><pubDate>Mon, 22 Oct 2007 09:13:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5592185</guid><dc:creator>Michael Watson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5592185.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5592185</wfw:commentRss><description>I've been building a DR solution to protect against some major disasters. Earthquakes, tsunamis, nuclear war, global destruction, you know the fun stuff, but maybe I should be planning for more immediate disasters. http://blogs.msdn.com/briankel/archive/2007/10/21/my-building-was-flooded.asp...(&lt;a href="http://blogs.msdn.com/mikewat/archive/2007/10/21/are-we-planning-for-the-wrong-disasters.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5592185" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Installing a SharePoint DR farm.</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/20/installing-a-sharepoint-dr-farm.aspx</link><pubDate>Sun, 21 Oct 2007 09:09:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5565519</guid><dc:creator>Michael Watson</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5565519.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5565519</wfw:commentRss><description>&lt;p&gt;I wanted to post a quick overview of how to install a DR farm to protect your main farm by log shipping your content databases to the second farm. The trick with the secondary farm is that the log shipped&amp;nbsp;databases will be attached to the web application from the get-go. This allows you to browse the content at anytime using the secondary farm's local url and as bonus you get to search the attached sites so that search is functional all the time as well. See my &lt;a href="http://blogs.msdn.com/mikewat/archive/2007/07/30/do-both-now-with-more-pics.aspx"&gt;earlier post&lt;/a&gt; for more information. &lt;/p&gt; &lt;p&gt;Here are the high level steps:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Install SQL&lt;/li&gt; &lt;li&gt;Configure log shipping for each content database that needs to be log shipped. Make sure to use the option to leave the database in standby mode and not to disconnect users when restoring logs. This particular configuration will not work without these settings.&lt;/li&gt; &lt;li&gt;Install SharePoint configuring the DR SQL instance as the default SQL server.&lt;/li&gt; &lt;li&gt;Patch to primary farm’s version.&lt;/li&gt; &lt;li&gt;Configure/Start all services. &lt;/li&gt; &lt;li&gt;Create SSP instance. Alternatively, you could restore the latest SSP backup to the farm. This would ensure all relevant settings are synchronized. &amp;nbsp;You’ll need to disable any content source crawl schedules that should not be crawled while the farm is inactive.&lt;/li&gt; &lt;li&gt;Configure profile import.&lt;/li&gt; &lt;li&gt;Create a new web application for each web application that exists on the primary farm. Specify any database name for the content database.&amp;nbsp;It will be deleted later.&lt;/li&gt; &lt;li&gt;Once the web application is created, DO NOT create a site collection. Instead, navigate to content databases and remove the default content database associated with each new web app.&lt;/li&gt; &lt;li&gt;Add each log shipped content database to the corresponding web application. Ensure the correct number of sites are displayed. &lt;/li&gt; &lt;li&gt;Export the primary farm’s SSL certificate (if applicable) and install it on the DR web servers.&lt;/li&gt; &lt;li&gt;Navigate to the web application AAM and add an AAM that corresponds to the primary site(s) url. Ensure SSL sites are referenced by “https://”&lt;/li&gt; &lt;li&gt;Open %windir%\system32\drivers\etc\hosts with notepad and add an entry for the AAM pointing at the local loopback address as follows:&lt;/li&gt;&lt;/ol&gt; &lt;blockquote&gt; &lt;p&gt;127.0.01&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; WebServerUrl&lt;/p&gt;&lt;/blockquote&gt; &lt;ol&gt; &lt;li&gt;Navigate to the SSP and click on search settings &amp;gt; Choose content sources and crawl schedules.&lt;/li&gt; &lt;li&gt;Locate the “local office server SharePoint sites” content source and choose edit.&lt;/li&gt; &lt;li&gt;Remove any url’s referring to the local farm or server(s) url. Replace with &lt;a href="http://%3cprimaryserverurl"&gt;http://&amp;lt;primaryserverurl&lt;/a&gt;&amp;gt;. Do the same for the profile content source. &amp;nbsp;sps3://primaryserverurl. Create or adjust the appropriate schedules and choose OK.&lt;/li&gt; &lt;li&gt;Navigate to mysite settings on the SSP site.&amp;nbsp;Make sure&amp;nbsp;the mysite&amp;nbsp;settings mirror the primary farm.&lt;/li&gt; &lt;li&gt;Finalize the farm by ensuring any specific customizations, modifications, and configurations are installed. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Now you should be able to browse any site and use all the features with the exception that the databases are read-only and functionality that requires alteration won't work until the databases are brought online. See &lt;a href="http://support.microsoft.com/kb/894631"&gt;this article&lt;/a&gt; for more information on the ramifications of read-only databases. Additionally, any new site creations created on the primary farm won't be available on the secondary farm until those databases containing the sites are reattached. See my &lt;a href="http://blogs.msdn.com/mikewat/archive/2007/07/30/do-both-now-with-more-pics.aspx"&gt;earlier post&lt;/a&gt; for more on this problem. I will post a slick solution that does this for you automatically in the coming days. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5565519" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>SharePoint and Mirroring: Taking action on failovers</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/19/sharepoint-and-mirroring-taking-action-on-failovers.aspx</link><pubDate>Sat, 20 Oct 2007 06:26:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5535489</guid><dc:creator>Michael Watson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5535489.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5535489</wfw:commentRss><description>&lt;p&gt;You might have seen the &lt;a href="http://technet2.microsoft.com/Office/en-us/library/80609398-b01d-4d0a-b429-040b74cae51c1033.mspx?mfr=true"&gt;database mirroring whitepaper for SharePoint.&lt;/a&gt; It mentions a &lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx"&gt;great article&lt;/a&gt; from the SQL folks on alerting on database mirroring events. One might think that monitoring the WMI events in SQL is a good or maybe the only way to take action on failovers. However, I propose a better method: Query the [Master].sys.database_mirroring view via&amp;nbsp;a task or process. Here's the query: &lt;/p&gt; &lt;p&gt;Select mirroring_role from sys.database_mirroring where mirroring_role is not null  &lt;p&gt;If the server is principal each database will return 1. If mirror, each database will return 2. Unfortunately, this isn't the only state you have to handle. Because each SQL server can be both the mirror for one database and principal for another, you have to monitor for this situation or SharePoint will be most unhappy. The query to do this is:  &lt;p&gt;Select count(distinct mirroring_role) from sys.database_mirroring where mirroring_role is not null  &lt;p&gt;If this query returns more than 1, you know that you have what we call a database mirroring split situation and you need to fail over some of the databases to return to a good state. However, you can't simply failover each principal database because it's assumed that the partial failover occurred for a reason. Take for instance, the situation where one of your content databases resides on a storage array that has failed. In that situation, you would not want to fail the database back over to the original node as it would not come online until the array is repaired. To handle that situation, you want to know the original state of SQL before running your failover logic. If the role is principal, but one of the databases has failed over, you want to fail over the rest of the databases. However, if the node is the mirror, you want to ignore the situation and let the principal handle it. This means your application or process to handle failovers needs to be stateful. I've been storing this state in a user created table called roles in the MSDB database, but I will be moving this to the registry as this seems like a more robust way to handle it.&amp;nbsp;&amp;nbsp;  &lt;p&gt;BTW.. I experimented with triggering off of the database mirroring events. I found that there were quite a few events that fired when a database fails over. It was confusing determining how to use this information. Additionally, the events didn't tell me the information I wanted to know. I ended up having to query the sys.database_mirroring table regardless. After spending some time on this, I decided it was best just to create a windows service that queries the table as described above. Additionally, I created a simple SQL agent job that tried to do the same thing as the service. Unfortunately, my SQL skills are pretty poor as I prefer C#, but it's the thought that counts right?&amp;nbsp;This TSQL sample&amp;nbsp;will create a SQL agent job that runs once a minute and writes the current state to a table called roles residing in MSDB. It will also attempt to handle a database mirroring split exception. This is where the code breaks down as I noticed that instead of failing over the database to the mirror, it fails it back over to the principal. Anyway's, here you go. Have fun. Oh.. and as always this code is unsupported and is provided as a sample for you to create your own failover mechanism. I left a gotcha in the code so that you'll have to clean it up before you can use it. ha HAAA! as Phil Seben says.&lt;/p&gt; &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; USE [msdb]&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; GO&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #008000"&gt;/****** Object:  Job [Mirroring_State_Monitor]    Script Date: 10/15/2007 11:46:50 ******/&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; BEGIN TRANSACTION&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; DECLARE @ReturnCode INT&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; SELECT @ReturnCode = 0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; &lt;span style="color: #008000"&gt;/****** Object:  JobCategory [[Uncategorized (Local)]]]    Script Date: 10/15/2007 11:46:51 ******/&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N&lt;span style="color: #006080"&gt;'[Uncategorized (Local)]'&lt;/span&gt; AND category_class=1)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; BEGIN&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; EXEC @ReturnCode = msdb.dbo.sp_add_category @&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;=N&lt;span style="color: #006080"&gt;'JOB'&lt;/span&gt;, @type=N&lt;span style="color: #006080"&gt;'LOCAL'&lt;/span&gt;, @name=N&lt;span style="color: #006080"&gt;'[Uncategorized (Local)]'&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; END&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; DECLARE @jobId BINARY(16)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; EXEC @ReturnCode =  msdb.dbo.sp_add_job @job_name=N&lt;span style="color: #006080"&gt;'Mirroring_State_Monitor'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;         @enabled=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         @notify_level_eventlog=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;         @notify_level_email=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;         @notify_level_netsend=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;         @notify_level_page=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;         @delete_level=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;         @description=N&lt;span style="color: #006080"&gt;'No description available.'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt;         @category_name=N&lt;span style="color: #006080"&gt;'[Uncategorized (Local)]'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  25:&lt;/span&gt;         @owner_login_name=N&lt;span style="color: #006080"&gt;'domain\username'&lt;/span&gt;, @job_id = @jobId OUTPUT&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  26:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  27:&lt;/span&gt; &lt;span style="color: #008000"&gt;/****** Object:  Step [Check State]    Script Date: 10/15/2007 11:46:52 ******/&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  28:&lt;/span&gt; EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N&lt;span style="color: #006080"&gt;'Check State'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  29:&lt;/span&gt;         @step_id=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  30:&lt;/span&gt;         @cmdexec_success_code=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  31:&lt;/span&gt;         @on_success_action=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  32:&lt;/span&gt;         @on_success_step_id=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  33:&lt;/span&gt;         @on_fail_action=2, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  34:&lt;/span&gt;         @on_fail_step_id=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  35:&lt;/span&gt;         @retry_attempts=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  36:&lt;/span&gt;         @retry_interval=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  37:&lt;/span&gt;         @os_run_priority=0, @subsystem=N&lt;span style="color: #006080"&gt;'TSQL'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  38:&lt;/span&gt;         @command=N&lt;span style="color: #006080"&gt;'&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  39:&lt;/span&gt; -- This script monitors the state of the mirror partners and takes action to fix any problems&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  40:&lt;/span&gt; -- This script uses a user created table [MSDB].dbo.role to store the state of the individual node&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  41:&lt;/span&gt; -- Principal = 1; Mirror = 2;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  42:&lt;/span&gt; --&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  43:&lt;/span&gt; -- Identify if we have a split state&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  44:&lt;/span&gt; -- Get the role from the role table and make sure we don'&lt;/span&gt;&lt;span style="color: #006080"&gt;'t have more than 1 database role&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  45:&lt;/span&gt; IF (Select r.role from [MSDB].dbo.role r ) = 1 AND (Select count(distinct mirroring_role) from sys.database_mirroring where mirroring_role is not null) &amp;gt; 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  46:&lt;/span&gt;     BEGIN&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  47:&lt;/span&gt;         --Generate list of principal databases&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  48:&lt;/span&gt;         DECLARE @principalDB as table(dbname varchar(255) NOT NULL);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  49:&lt;/span&gt;         --Insert the names of the principal databases into the table variable&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  50:&lt;/span&gt;         INSERT INTO @principalDB SELECT d.name&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  51:&lt;/span&gt;         from sys.database_mirroring s, sys.databases d&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  52:&lt;/span&gt;         WHERE s.database_id = d.database_id and s.mirroring_role = 1;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  53:&lt;/span&gt;         --Enumerate through the principal databases and fail over&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  54:&lt;/span&gt;         WHILE (Select count(*) from @principalDB) &amp;gt; 0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  55:&lt;/span&gt;             BEGIN&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  56:&lt;/span&gt;             --Get the first database name from the table&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  57:&lt;/span&gt;             DECLARE @dbName as varchar(100)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  58:&lt;/span&gt;             SET @dbName = (SELECT Top 1 dbname from @principalDB)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  59:&lt;/span&gt;             --Create a string to store the failover command&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  60:&lt;/span&gt;             Declare @cmdString as varchar(255)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  61:&lt;/span&gt;             Set @cmdString = '&lt;/span&gt;&lt;span style="color: #006080"&gt;'USE MASTER; ALTER DATABASE '&lt;/span&gt;&lt;span style="color: #006080"&gt;' + @dbName + '&lt;/span&gt;&lt;span style="color: #006080"&gt;' SET PARTNER FAILOVER;'&lt;/span&gt;&lt;span style="color: #006080"&gt;'&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  62:&lt;/span&gt;             --Execute the command string to failover the databases&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  63:&lt;/span&gt;             EXECUTE (@cmdString);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  64:&lt;/span&gt;             --Delete the database from the list since it has aleady been failed over&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  65:&lt;/span&gt;             DELETE FROM @principalDB WHERE dbname = @dbName&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  66:&lt;/span&gt;             END&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  67:&lt;/span&gt;         --Finally, update the role to mirror&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  68:&lt;/span&gt;         Update [MSDB].dbo.role SET role = 2&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  69:&lt;/span&gt;     END&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  70:&lt;/span&gt; ELSE IF (Select r.role from [MSDB].dbo.role r ) = 1 &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  71:&lt;/span&gt; AND (Select count(distinct mirroring_role) from sys.database_mirroring where mirroring_role is not null) = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  72:&lt;/span&gt; AND (Select count(mirroring_role) from sys.database_mirroring where mirroring_role = 1) = 0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  73:&lt;/span&gt;     -- This server is principal in name only but should be the mirror&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  74:&lt;/span&gt;     -- Update the role to mirror&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  75:&lt;/span&gt;     Update [MSDB].dbo.role SET role = 2&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  76:&lt;/span&gt; IF (Select r.role from [MSDB].dbo.role r ) = 2 &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  77:&lt;/span&gt; AND (Select count(distinct mirroring_role) from sys.database_mirroring where mirroring_role is not null) = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  78:&lt;/span&gt; AND (Select count(mirroring_role) from sys.database_mirroring where mirroring_role = 2) = 0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  79:&lt;/span&gt;     -- This server is mirror in name only but should be the principal&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  80:&lt;/span&gt;     -- Update role to principal&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  81:&lt;/span&gt;     Update [MSDB].dbo.role SET role = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  82:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  83:&lt;/span&gt; -- We are done&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  84:&lt;/span&gt; -- Other potential states exist, but we don'&lt;/span&gt;&lt;span style="color: #006080"&gt;'t need to perform any action.&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  85:&lt;/span&gt;     Update [MSDB].dbo.role SET role = 2&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  86:&lt;/span&gt; IF (Select r.role from [MSDB].dbo.role r ) = 2 &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  87:&lt;/span&gt; AND (Select count(distinct mirroring_role) from sys.database_mirroring where mirroring_role is not null) = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  88:&lt;/span&gt; AND (Select count(mirroring_role) from sys.database_mirroring where mirroring_role = 2) = 0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  89:&lt;/span&gt;     -- This server is mirror in name only but should be the principal&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  90:&lt;/span&gt;     -- Update role to principal&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  91:&lt;/span&gt;     Update [MSDB].dbo.role SET role = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  92:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  93:&lt;/span&gt; -- We are done&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  94:&lt;/span&gt; -- Other potential states exist, but we don'&lt;/span&gt;&lt;span style="color: #006080"&gt;'t need to perform any action.'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  95:&lt;/span&gt;         @database_name=N&lt;span style="color: #006080"&gt;'master'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  96:&lt;/span&gt;         @flags=0&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  97:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  98:&lt;/span&gt; EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  99:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 100:&lt;/span&gt; EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N&lt;span style="color: #006080"&gt;'Schedule 1'&lt;/span&gt;, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 101:&lt;/span&gt;         @enabled=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 102:&lt;/span&gt;         @freq_type=4, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 103:&lt;/span&gt;         @freq_interval=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 104:&lt;/span&gt;         @freq_subday_type=4, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 105:&lt;/span&gt;         @freq_subday_interval=1, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 106:&lt;/span&gt;         @freq_relative_interval=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 107:&lt;/span&gt;         @freq_recurrence_factor=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 108:&lt;/span&gt;         @active_start_date=20071015, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 109:&lt;/span&gt;         @active_end_date=99991231, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 110:&lt;/span&gt;         @active_start_time=0, &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 111:&lt;/span&gt;         @active_end_time=235959&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 112:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 113:&lt;/span&gt; EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N&lt;span style="color: #006080"&gt;'(local)'&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 114:&lt;/span&gt; IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 115:&lt;/span&gt; COMMIT TRANSACTION&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 116:&lt;/span&gt; GOTO EndSave&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 117:&lt;/span&gt; QuitWithRollback:&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 118:&lt;/span&gt;     IF (@@TRANCOUNT &amp;gt; 0) ROLLBACK TRANSACTION&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 119:&lt;/span&gt; EndSave:&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5535489" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Quick note about index backup</title><link>http://blogs.msdn.com/mikewat/archive/2007/10/19/quick-note-about-index-backup.aspx</link><pubDate>Sat, 20 Oct 2007 00:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5529160</guid><dc:creator>Michael Watson</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/5529160.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=5529160</wfw:commentRss><description>&lt;P&gt;As you may already know, the only way to restore an index without having to recrawl is to use the out-of-the-box backup mechanism either in the UI or via STSADM catastrophic backup option. Using STSADM allows you to schedule the backup, but I was asked a question the other day that I couldn't immediately answer. &lt;/P&gt;
&lt;P&gt;Does STSADM allow you to backup only selected items such as the index or do you have to perform a backup of everything?&lt;/P&gt;
&lt;P&gt;The concern was that in our current design the collab sites share the same farm with the SSP and that all the collab content would have to be backed up in addition to the SSP using the out-of-the-box mechanism. Obviously, that wouldn't be good for a large farm where you depend on some sort of differencing mechanism to ensure you can backup all content within the backup window. Well I tested it and found that the SharePoint folks were on top of this (as expected, right :-) ) and created an STSADM option that allows you to chose which item you want to backup just like you do in the GUI. The syntax is:&lt;/P&gt;
&lt;P&gt;stsadm -o backup -directory &lt;EM&gt;&amp;lt;SharePath&amp;gt;&lt;/EM&gt; -backupmethod &lt;EM&gt;&amp;lt;full | diff&amp;gt;&lt;/EM&gt; -item &lt;EM&gt;&amp;lt;object name&amp;gt;&lt;/EM&gt; 
&lt;P&gt;In our case &amp;nbsp;&lt;EM&gt;&amp;lt;object name&amp;gt;&lt;/EM&gt; is the SSP name which allows us to backup only the content needed to restore the ssp/index. Of course, you can chose any item you can see in the UI backup option, including individual content databases. 
&lt;P&gt;A note about capacity and backup performance. The MSIT index contains about 25 million items and the component sizes are as follows: 
&lt;P&gt;Search DB: ~370GB 
&lt;P&gt;SSP DB: ~65GB 
&lt;P&gt;Index (on the file system) ~150GB 
&lt;P&gt;When backing up this content (selecting just the SSP in backup) I'm told I need about 700GB of storage, but you'll notice that the cumulative size of this content is about 585GB. I'm not quite sure why it needs the additional 100GB of space, but I do know that the backup only consumes 413GB after it completes. More investigation is needed to understand the differences, however, my buddy Sam&amp;nbsp;Crewdson tells me that DB fragmentation contributes greatly to the overall backup size. When he defragment's the DB, the size of the backup files are reduced. 
&lt;P&gt;Regardless, backup performance&amp;nbsp;seems to be a&amp;nbsp;factor of&amp;nbsp;four things. How large is the content, what are the network limitations, what are the hardware limitations, and where is the backup share. For the longest time, MSIT backed up the index to a share on the index server. The problem with this approach is that the search DB (residing in SQL) is usually the largest component and has to be streamed from the SQL server across the network to the index server. That's not cool. Even with Gig/E, it can take quite a while to transfer that much data. A much better approach is to put the share on the SQL server. Now only the index file, which is usually the smaller of the two,&amp;nbsp;has to cross the network. After making the change IT saw a major decrease in backup duration. In the neighborhood of 60%. 
&lt;P&gt;So how long? Well in my lab with nothing else going on, I can backup the aforementioned SSP in about 4 hours. That's about 100GB/hour. That's with some pretty awesome hardware. Your mileage will vary of course. 
&lt;P&gt;Mike&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5529160" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+_2800_General_2900_/default.aspx">SharePoint (General)</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item><item><title>Do Both. Now with more pics.</title><link>http://blogs.msdn.com/mikewat/archive/2007/07/30/do-both-now-with-more-pics.aspx</link><pubDate>Tue, 31 Jul 2007 08:09:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4142385</guid><dc:creator>Michael Watson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mikewat/comments/4142385.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mikewat/commentrss.aspx?PostID=4142385</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;In a &lt;a href="http://blogs.msdn.com/mikewat/archive/2007/07/29/database-mirroring-vs-log-shipping-choose-both.aspx" target="_blank"&gt;previous post&lt;/a&gt;, I talked about how I was working on implementing mirroring inside the datacenter for high availability and log shipping between datacenters for disaster recovery. Well I wanted a reason to use my freshly installed &lt;a href="http://get.live.com/betas/writer_betas"&gt;live writer&lt;/a&gt; and its wicked cool capabilities so I decided to show a screenshot of that model. &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mikewat/WindowsLiveWriter/DoBoth.Nowwithmorepics_136AA/Capture%5B2%5D.jpg" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="226" src="http://blogs.msdn.com/blogfiles/mikewat/WindowsLiveWriter/DoBoth.Nowwithmorepics_136AA/Capture_thumb.jpg" width="457" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I apologize about the image size. Seems my blog format doesn't offer much real estate. You'll notice that the two large circles&amp;nbsp;represent two datacenters. In this model the datacenters are likely separated by hundreds or even thousands of miles. In the primary datacenter you'll find the minimal highly available&amp;nbsp;topology with two web servers, an index server, and mirrored SQL servers. You'll notice that all databases are mirrored including the configuration database. Now one thing to note about the mirroring configuration is that this isn't really supported yet so if you implement this right now, you are on your on. I do hope that testing will show this configuration is valid in the not too distant future. Also noteworthy is that the index server is also running SQL server and serves as the witness role for the highly available mirroring pair. &lt;/p&gt; &lt;p&gt;In the disaster recovery datacenter, you'll find a single SQL server and a combined SharePoint web/app/index server. Why not another highly available farm? Money. It costs money to build and maintain servers in the remote datacenter so this configuration saves money by discarding some flexibility. Note, I said flexibility, not performance. If you have two web servers you should really be able to support their load on a single server or your farm is not truly highly available. The same goes for SQL. The exception&amp;nbsp;in this model&amp;nbsp;is the index server role which can be intensive, but it is also one you can control through scheduling and throttling.&lt;/p&gt; &lt;p&gt;From a SQL perspective, the farm has its own local versions of all the standard databases with one exception. We are log shipping the content database(s) from the primary farm to the secondary farm. With each log shipped database in standby mode we can attach them to the local web application which the local SSP is configured to search. The trick here is to make the index think it's crawling the url of the primary datacenter, not the local url. You can do this by configuring an AAM for the primary site on the DR web app and adding an entry in the hosts file pointing the url to the localhost address. Finally, remove the local url from the index scope and replace with the AAM. Now schedule the crawl and you will have near seamless failover with instant query. One caveat. When log shipping content databases, any new sites added to your databases will not automatically be available. This is because each new site must also be registered in the configuration database, but without going through the normal process of site creation the only other way to make the site available is to reattach the containing content database. That's easy enough to script, but the problem is that every time you add or reattach a content database, that database gets a new GUID assigned. That doesn't sound bad, but it has major ramifications on search. Each time your content database gets a new GUID, the index server thinks the sites and content in that database are new. I need to continue testing the overall effects of this on search, but so far&amp;nbsp;the most obvious symptom is more crawling. &lt;/p&gt; &lt;p&gt;There are many alternatives to this approach. Check back often as I'm sure I'll be talking about these in the future. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4142385" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mikewat/archive/tags/SharePoint+Hosting/default.aspx">SharePoint Hosting</category><category domain="http://blogs.msdn.com/mikewat/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category></item></channel></rss>