<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7644743571887329287</id><updated>2026-04-24T20:35:32.924+02:00</updated><category term="PowerShell"/><category term="ARM"/><category term="Azure Resource Manager"/><category term="C#"/><category term="CmdLet"/><category term="Mirroring"/><category term="Move VM Storage"/><category term="SFTP"/><category term="SQL"/><category term="SQL 2008"/><category term="SQL 2008 R2"/><category term="Scripts"/><category term="Snap-In"/><category term="SnapIn"/><title type='text'>Kevin&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kevinrr3.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://kevinrr3.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11098891885527853934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7644743571887329287.post-8240562563249585873</id><published>2015-09-04T11:43:00.001+02:00</published><updated>2015-09-24T15:08:21.979+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure Resource Manager"/><category scheme="http://www.blogger.com/atom/ns#" term="Move VM Storage"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><title type='text'>Azure Resource Manager (ARM) : Move VM storage</title><content type='html'>&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hi All,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I`ve been working on a new hosting platform in Azure Resource Manager(ARM) for a new customer of ours.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After some weeks of deploying VM`s we came to the conclusion that using only one storage account for the VM`s wan`t the way to go. So we decided that we had to split up the storage.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This is when we found out that there isn`t an easy way to move the VM storage.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;To move/copy the VM storage you need to perform the following steps:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- Stop the VM&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- Save the VM config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- Copy the blob`s from one storage account to the other&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- Edit the VM config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- Remove the current VM&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;- And recreate the VM using the saved config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;But we`ve had already deployed 21 VM`s so i decided to create a powershell function and script to do this.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And here it is for the people who face&amp;nbsp;similar problem or just don`t want to go through the hassle of finding out how to move the storage&amp;nbsp; :-) :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; padding: .2em .6em; width: auto;overflow-x: scroll;word-wrap: normal;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; Copy-AzureVMStorage($vmName, $resourceGroup, $oldStorageContext, $newStorageContext, $srcContainer, $dstContainer, $location)
{
 &lt;span style=&quot;color: green;&quot;&gt;#Retrieve VM Config&lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;
 {
  $vm = Get-AzureVM -ResourceGroupName $resourceGroup -Name $vmName
  
   &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;($vm -eq $null)
   {
    &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
   }
 }
 &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;
 {
  &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
 }

 &lt;span style=&quot;color: green;&quot;&gt;#Check if container exists in destination storage account&lt;/span&gt;
 $container = Get-AzureStorageContainer -Name $dstContainer -Context $newStorageContext -ErrorAction Ignore
 &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;($container -eq $null)
 {
  New-AzureStorageContainer -Name $dstContainer -Context $newStorageContext
 }
 
 &lt;span style=&quot;color: green;&quot;&gt;#Stop the VM&lt;/span&gt;
 Stop-AzureVM -ResourceGroupName $resourceGroup -Name $vmName -Force
 
 &lt;span style=&quot;color: green;&quot;&gt;#Copy the vhd`s to their new location&lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;
 {
  $osDiskVHD = $vm.StorageProfile.OSDisk.Name + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.vhd&quot;&lt;/span&gt;
  $copy = Start-AzureStorageBlobCopy -SrcBlob $osDiskVHD -SrcContainer $srcContainer -DestContainer $dstContainer -DestBlob $osDiskVHD -Context $oldStorageContext -DestContext $newStorageContext -Force
  Get-AzureStorageBlobCopyState -Container $dstContainer -Blob $copy.Name -Context $copy.Context -WaitForComplete
  $newOSDiskEndPoint = $newStorageContext.BlobEndPoint + $dstContainer + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;/&quot;&lt;/span&gt; + $osDiskVHD
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;($vm.StorageProfile.OSDisk.OperatingSystemType -eq &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Linux&quot;&lt;/span&gt;)
  {
   Set-AzureVMOSDisk -VM $vm -Name $vm.StorageProfile.OSDisk.Name -VhdUri $newOSDiskEndPoint.Replace(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;https://&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;http://&quot;&lt;/span&gt;) -CreateOption attach -Linux
  }
  &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt;
  {
   Set-AzureVMOSDisk -VM $vm -Name $vm.StorageProfile.OSDisk.Name -VhdUri $newOSDiskEndPoint.Replace(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;https://&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;http://&quot;&lt;/span&gt;) -CreateOption attach -Windows
  }
  
  &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt;($dataDisk &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; $vm.StorageProfile.DataDisks)
  {
   $dataDiskVHD = $dataDisk.Name + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.vhd&quot;&lt;/span&gt;
   $copy = Start-AzureStorageBlobCopy -SrcBlob $dataDiskVHD -SrcContainer $srcContainer -DestContainer $dstContainer -DestBlob $dataDiskVHD -Context $oldStorageContext -DestContext $newStorageContext -Force
   Get-AzureStorageBlobCopyState -Container $dstContainer -Blob $copy.Name -Context $copy.Context -WaitForComplete
   $newDataDiskEndPoint = $newStorageContext.BlobEndPoint + $dstContainer + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;/&quot;&lt;/span&gt; + $dataDiskVHD
   Remove-AzureVMDataDisk -VM $vm -DataDiskNames $dataDisk.Name
   Add-AzureVMDataDisk -VM $vm -Name $dataDisk.Name -VhdUri $newDataDiskEndPoint.Replace(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;https://&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;http://&quot;&lt;/span&gt;) -Lun $dataDisk.Lun -CreateOption attach -DiskSizeInGB $dataDisk.DiskSizeGB
  }
 }
 &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;
 {
  &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
 }
 
 &lt;span style=&quot;color: green;&quot;&gt;#Clean up the VM config before recreating&lt;/span&gt;
 $vm.StorageProfile.ImageReference = $null
 $vm.OSProfile = $null
 
 &lt;span style=&quot;color: green;&quot;&gt;#Recreate VM&lt;/span&gt;
 Remove-AzureVM -ResourceGroupName $resourceGroup -Name $vmName -Force
 New-AzureVM -ResourceGroupName $resourceGroup -Location $location -VM $vm
}

&lt;span style=&quot;color: green;&quot;&gt;#Setup connection to ARM&lt;/span&gt;
Add-AzureAccount
&lt;span style=&quot;color: blue;&quot;&gt;Switch&lt;/span&gt;-AzureMode -Name AzureResourceManager
Select-AzureSubscription -SubscriptionName &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Contoso Subscription&quot;&lt;/span&gt;

&lt;span style=&quot;color: green;&quot;&gt;#Define storage accounts&lt;/span&gt;
$oldstoragecontext = New-AzureStorageContext -StorageAccountName &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;ContosoOld&quot;&lt;/span&gt; -StorageAccountKey &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&amp;lt;KEY&amp;gt;&quot;&lt;/span&gt;
$newstoragecontext = New-AzureStorageContext -StorageAccountName &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;ContosoNew&quot;&lt;/span&gt; -StorageAccountKey &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&amp;lt;KEY&amp;gt;&quot;&lt;/span&gt;

&lt;span style=&quot;color: green;&quot;&gt;#Copy the VM storage and edit its config&lt;/span&gt;
Copy-AzureVMStorage &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;ContosoVM&quot;&lt;/span&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;ContosoGroup&quot;&lt;/span&gt; $oldstoragecontext $newstoragecontext &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;vhds&quot;&lt;/span&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;vhds&quot;&lt;/span&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;westeurope&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevinrr3.blogspot.com/feeds/8240562563249585873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevinrr3.blogspot.com/2015/09/azure-resource-manager-arm-move-vm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/8240562563249585873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/8240562563249585873'/><link rel='alternate' type='text/html' href='http://kevinrr3.blogspot.com/2015/09/azure-resource-manager-arm-move-vm.html' title='Azure Resource Manager (ARM) : Move VM storage'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11098891885527853934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7644743571887329287.post-7574431216328571369</id><published>2013-02-28T13:58:00.001+01:00</published><updated>2013-04-17T23:14:43.454+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="CmdLet"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><category scheme="http://www.blogger.com/atom/ns#" term="SFTP"/><category scheme="http://www.blogger.com/atom/ns#" term="Snap-In"/><category scheme="http://www.blogger.com/atom/ns#" term="SnapIn"/><title type='text'>SFTP in PowerShell</title><content type='html'>Hi All,&lt;br /&gt;
&lt;br /&gt;
A while ago we where migrating customers from our old FTP server to our brand new SFTP server :-)&lt;br /&gt;
But one of those customers had an automated script(PowerShell) in place uploading files during the night.&lt;br /&gt;
So we where searching for an solution to script SFTP uploads(which&amp;nbsp;wasn&#39;t&amp;nbsp;easy).&lt;br /&gt;
There are a few payed solutions for implementing SFTP capability`s in PowerShell and you can also use application like WinSCP to &quot;fake&quot; SFTP capability`s.&lt;br /&gt;
But i thought it would be nice if someone created an free PowerShell Snap-In that implements SFTP capability`s.&lt;br /&gt;
&lt;br /&gt;
At this point I went in search for an open-source SFTP implementation for C#, I came across an open-source library that I used before(&lt;a href=&quot;http://sourceforge.net/projects/sharpssh/&quot; target=&quot;_blank&quot;&gt;SharpSSH&lt;/a&gt;).&lt;br /&gt;
This library was the perfect candidate to embed in the PowerShell Snap-In.&lt;br /&gt;
So after some coding this was what i came up with :&amp;nbsp;&lt;a href=&quot;http://www.k-tools.nl/&quot; target=&quot;_blank&quot;&gt;Download SFTP PowerShell Snap-In&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I can present this Snap-In to you with many thanks to &lt;a href=&quot;http://sourceforge.net/users/tamirgal&quot; target=&quot;_blank&quot;&gt;Tamir Gal&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/users/fitchwh&quot; target=&quot;_blank&quot;&gt;Will Fitch&lt;/a&gt;, these two guy`s created the great SharpSSH library on which the Snap-In is based !&lt;br /&gt;
&lt;br /&gt;
Kind Regards,&lt;br /&gt;
Kevin&lt;br /&gt;
&lt;br /&gt;
P.S.&lt;br /&gt;
Sample scripts to show you how the Snap-In works are included in the zip file. ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== UPDATE-2 16-4-2012 =====&lt;br /&gt;
Hi All,&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
I`m now in the testing phase of version 2 of the Snap-In.&lt;br /&gt;
Who would like to help and test it ?&lt;br /&gt;
You can download the v2-beta &lt;a href=&quot;http://www.k-tools.nl/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;!&lt;br /&gt;
There now is an extra CmdLet named Open-SFTPServerWithPublicKey&amp;nbsp;which&amp;nbsp;as the obvious name states allows you to authenticate with a public private key pair :-)&lt;br /&gt;
Please note that the private key must be in OpenSSH format and you must provide the full path to the file!&lt;br /&gt;
&lt;br /&gt;
==== UPDATE 16-4-2012 =====&lt;br /&gt;
Hi All,&lt;br /&gt;
&lt;br /&gt;
I uploaded a new version of the Snap-In, lets call it uhmmm v1.3 :-)&lt;br /&gt;
It includes port selection and PowerShell 3 support.&lt;br /&gt;
To get PowerShell 3 support i had to update the installer to include the right InstallUtil(With thanks to Rich Harrington).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== UPDATE 15-4-2012 =====&lt;br /&gt;
Hi All,&lt;br /&gt;
&lt;br /&gt;
I`m currently working on version 2 of the snap-in.&lt;br /&gt;
It`s going to include support for public-key authentication.&lt;br /&gt;
If there are any other feature requests please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://kevinrr3.blogspot.com/feeds/7574431216328571369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevinrr3.blogspot.com/2013/02/sftp-in-powershell.html#comment-form' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/7574431216328571369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/7574431216328571369'/><link rel='alternate' type='text/html' href='http://kevinrr3.blogspot.com/2013/02/sftp-in-powershell.html' title='SFTP in PowerShell'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11098891885527853934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7644743571887329287.post-3911140510514460168</id><published>2012-07-20T14:10:00.000+02:00</published><updated>2012-08-01T10:51:01.559+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mirroring"/><category scheme="http://www.blogger.com/atom/ns#" term="Scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL 2008 R2"/><title type='text'>SQL Mirroring Scripts for SQL Server 2008 R2 (SMME)</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;I have been setting up SQL mirror`s at customer sites
for some time now and I have&amp;nbsp;always been annoyed by the fact that you have to
mirror each database separately.&lt;br /&gt;
One day I decided that I should make some SQL scripts to do just this.&lt;br /&gt;
After some time of developing I’ve come up with the SMME (SQL Mirroring Made
Easy) Scripts.&lt;br /&gt;
Now I have used these scripts a few times in development and production
environments and I’m pretty happy with them so I decided to share them with
world :-)&lt;br /&gt;
If you guys/girls have any suggestion or you find something wrong with the
scripts please let me know. So I can make them better for you and the rest of
the world.&lt;br /&gt;
&lt;br /&gt;
P.S.&lt;br /&gt;
I`m not an DBA, just an SQL enthusiast.&lt;br /&gt;
&lt;br /&gt;
Script Usage:&lt;br /&gt;
&lt;br /&gt;
The zip package contains the following files:&lt;br /&gt;
&lt;br /&gt;
- 1. Create End-Points\SMME_EndPointScript.sql&lt;br /&gt;
-- This script creates the mirroring endpoints for the SQL environment.&lt;br /&gt;
- 2. Mirror databases\SMME_MirrorScript.sql&lt;br /&gt;
-- This script mirrors a single database if an database is already mirrored it
will break the mirror&lt;br /&gt;
-- and delete the mirror database on the partner server.&lt;br /&gt;
- 2. Mirror databases\SMME_MirrorAlldbsScript.sql&lt;br /&gt;
-- This script mirrors all databases and can be restricted by the use of an
prefix if an database is&lt;br /&gt;
-- already mirrored it will break the mirror and delete the mirror database on
the partner server.&lt;br /&gt;
- 3. Additional actions\SMME_FailOverAllScript.sql&lt;br /&gt;
-- This script fails all de mirrored databases over to the partner instance.&lt;br /&gt;
- 3. Additional actions\SMME_BreakAllMirrorScript.sql&lt;br /&gt;
-- This script breaks all the mirrors and deletes mirror databases on the
partner server.&lt;br /&gt;
&lt;br /&gt;
First before we can begin with the mirroring process we have to setup TCP
end-points on all the SQL Servers that are going to be a part of the mirror.&lt;br /&gt;
In my environment I’ve got the following SQL servers:&lt;br /&gt;
&lt;br /&gt;
- SQLPRINCIPAL&lt;br /&gt;
- SQLMIRROR&lt;br /&gt;
- SQLWITNESS&lt;br /&gt;
&lt;br /&gt;
And the following file server:&lt;br /&gt;
&lt;br /&gt;
- FILESERVER&lt;br /&gt;
&lt;br /&gt;
With the following share to save the SQL backup files to(This location must be accessible
from the Principal and the Mirror servers SQL Agent service account):&lt;br /&gt;
\\FILESERVER\SQLBackup$&lt;br /&gt;
&lt;br /&gt;
On all the SQL servers in my environment the SQL Agent is running under the
network service account.&lt;br /&gt;
To setup the endpoints we need to run the SMME_EndPointScript.sql script on all
the SQL Servers and adjust the following settings:&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Setting&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Explanation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@EndPointPort&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The endpoint port number e.g. 7022&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@EndPointName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The endpoint name e.g.
  EndPoint_Mirroring&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLAgentPrincipalServiceAccount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The principal SQL Server Agent service
  account&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLAgentMirrorServiceAccount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The mirror SQL Server Agent service
  account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLAgentWitnessServiceAccount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The witness SQL Server Agent service
  account&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 6; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@MirrorRole&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;The role of the current server where
  the script is executing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;br /&gt;
In my environment the settings look like this :&lt;br /&gt;
&lt;br /&gt;
DECLARE @EndPointPort VARCHAR(250) = &#39;7022&#39;;&lt;br /&gt;
DECLARE @EndPointName VARCHAR(250) = &#39;EndPoint_Mirroring&#39;;&lt;br /&gt;
DECLARE @SQLAgentPrincipalServiceAccount VARCHAR(250) =
&#39;MYDOMAIN\SQLPRINCIPAL$&#39;;&lt;br /&gt;
DECLARE @SQLAgentMirrorServiceAccount VARCHAR(250) = &#39;MYDOMAIN\SQLMIRROR$&#39;;&lt;br /&gt;
DECLARE @SQLAgentWitnessServiceAccount VARCHAR(250) = &#39;MYDOMAIN\SQLWITNESS$&#39;;&lt;br /&gt;
&lt;br /&gt;
And the @MirrorRole setting differs per SQL envrionment.&lt;br /&gt;
--Principal server&lt;br /&gt;
DECLARE @MirrorRole VARCHAR(250) = &#39;PRINCIPAL&#39;;&lt;br /&gt;
--Mirror server&lt;br /&gt;
DECLARE @MirrorRole VARCHAR(250) = &#39;MIRROR&#39;;&lt;br /&gt;
--Witness server&lt;br /&gt;
DECLARE @MirrorRole VARCHAR(250) = &#39;WITNESS&#39;;&lt;br /&gt;
&lt;br /&gt;
Once we&#39;ve ran this script the mirroring endpoints will be created.&lt;br /&gt;
&lt;br /&gt;
Now we can begin with the mirroring of the databases.&lt;br /&gt;
For this we are going to use the SMME_MirrorScript.sql script or the
SMME_MirrorAlldbsScript.sql script, the difference between these scripts is
that the first one will only mirror one database and the second one will mirror
all databases.&lt;br /&gt;
For the mirror scripts we need to adjust the following settings:&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Setting&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Explanation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@DBBackupLoc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set your backup location and make sure
  that the location is accessible and writable for the SQL Server agent`s&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLPrincipal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set your SQL Principal server
  end-point&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLMirror&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set your SQL Mirror server end-point&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@SQLWitness&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set your SQL Witness server end-point.
  If there is no witness available please set the @WitnessIsAvailible Server
  variable to &#39;FALSE&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@WitnessIsAvailible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set if you have a witness available
  (TRUE/FALSE)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 6;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@MirrorServer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set your Mirror server name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 7;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@ShrinkLogFiles&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set if you want to shrink the log
  files before mirroring (TRUE/FALSE)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 8; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;@DBPrefix (Only availible in the
  SMME_MirrorAlldbsScript.sql script)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; padding: 0cm 5.4pt; width: 230.3pt;&quot; valign=&quot;top&quot; width=&quot;307&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;Set the database prefix for the
  databases you want you mirror. Leave empty for all databases.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;br /&gt;
In my environment the settings look like this :&lt;br /&gt;
&lt;br /&gt;
DECLARE @DBBackupLoc VARCHAR(1000) = &#39;\\FILESERVER\SQLBackup$&#39;;&lt;br /&gt;
DECLARE @SQLPrincipal VARCHAR(1000) = &#39;TCP://SQLPRINCIPAL:7022&#39;;&lt;br /&gt;
DECLARE @SQLMirror VARCHAR(1000) = &#39;TCP://SQLMIRROR:7022&#39;;&lt;br /&gt;
DECLARE @SQLWitness VARCHAR(1000) = &#39;TCP://SQLWITNESS:7022&#39;;&lt;br /&gt;
DECLARE @WitnessIsAvailible VARCHAR(5) = &#39;TRUE&#39;;&lt;br /&gt;
DECLARE @MirrorServer VARCHAR(1000) = &#39;SQLMIRROR&#39;;&lt;br /&gt;
DECLARE @ShrinkLogFiles VARCHAR(5) = &#39;TRUE&#39;;&lt;br /&gt;
&lt;br /&gt;
The following setting can only be used when the SMME_MirrorAlldbsScript.sql
script is used.&lt;br /&gt;
DECLARE @DBPrefix VARCHAR(1000) = &#39;&#39;;&lt;br /&gt;
This setting can be useful if you`ve got multiple applications in one SQL
environment and the databases for the different applications are specified like
APP01_Something1, APP01_Something2 and you only want to mirror the databases
for that application.&lt;br /&gt;
&lt;br /&gt;
If you are using the SMME_MirrorScript.sql (Single database) script to mirror
your database you`ve got to run this script under the database you want to
mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span lang=&quot;NL&quot; style=&quot;color: #538cd6; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-ansi-language: NL; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL; mso-no-proof: yes; text-decoration: none; text-underline: none;&quot;&gt;&lt;v:shapetype coordsize=&quot;21600,21600&quot; filled=&quot;f&quot; id=&quot;_x0000_t75&quot; o:preferrelative=&quot;t&quot; o:spt=&quot;75&quot; path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; stroked=&quot;f&quot;&gt;
 &lt;v:stroke joinstyle=&quot;miter&quot;&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;&gt;
&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-X8HvHnCf1ug/UAlpcYSqHYI/AAAAAAAAABQ/pkhIQjLmIcE/s1600/img001.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-X8HvHnCf1ug/UAlpcYSqHYI/AAAAAAAAABQ/pkhIQjLmIcE/s1600/img001.png&quot; /&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;If you are using the
SMME_MirrorAlldbsScript.sql (Multiple databases) script to mirror your
databases you`ve got to run this script under the master database.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-9a01pTS_mzo/UAlqA_8PfVI/AAAAAAAAABY/NDDEEArPIUc/s1600/img002.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-9a01pTS_mzo/UAlqA_8PfVI/AAAAAAAAABY/NDDEEArPIUc/s1600/img002.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: NL;&quot;&gt;And
for the additional scripts you don’t have to define any settings just run them
under the master database.&lt;br /&gt;
One little side note for the SMME_FailOverAllScript.sql script you need to run
this on the SQL Server where the databases are active, so if my databases are
in principal mode on the mirror server&amp;nbsp;I need to run this script on the Mirror
server and vice versa.&lt;/span&gt;&lt;/div&gt;
Download scripts:&lt;br /&gt;
&lt;a href=&quot;https://dl.dropbox.com/u/92918892/SMME.zip&quot; target=&quot;_blank&quot;&gt;SMME.zip&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevinrr3.blogspot.com/feeds/3911140510514460168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevinrr3.blogspot.com/2012/07/sql-mirroring-scripts-for-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/3911140510514460168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7644743571887329287/posts/default/3911140510514460168'/><link rel='alternate' type='text/html' href='http://kevinrr3.blogspot.com/2012/07/sql-mirroring-scripts-for-sql-server.html' title='SQL Mirroring Scripts for SQL Server 2008 R2 (SMME)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11098891885527853934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-X8HvHnCf1ug/UAlpcYSqHYI/AAAAAAAAABQ/pkhIQjLmIcE/s72-c/img001.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>