<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SQLOS &amp; Cloud Infrastructure Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sqlosteam/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sqlosteam/feed.xml</link>
    <description>Notes from the SQL Server Cloud Infrastructure team.</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:28:55 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>MSA accounts used with SQL</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/msa-accounts-used-with-sql</link>
      <pubDate>Wed, 19 Feb 2014 07:45:37 GMT</pubDate>
      <dc:creator><![CDATA[G Bowerman (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2014/02/19/msa-accounts-used-with-sql/</guid>
      <description><![CDATA[Here's a note from Anne Labbe, a premier field&nbsp;engineer in Charlotte who's been looking into...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Here's a note from Anne Labbe, a premier field&nbsp;engineer in Charlotte who's been looking into managed service accounts..</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">After painstaking research and tracking this down to the product team this is what I found:</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">1. Managed Service Accounts (MSA) are different from Group Managed Service Accounts (gMSA). &nbsp;The reason I&rsquo;m calling this out is because a number of the references floated around are for gMSA and not MSA. &nbsp;</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">2. gMSA are not yet available, are not yet supported for SQL Server. &nbsp;gMSA exist and are available and supported in Windows Server 2012 and higher.&nbsp;&nbsp;SQL does not support them , but from an OS perspective, they exist and are supported. &nbsp; &nbsp;</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">3. MSA are supported from Windows 2008 on for specific applications and for specific purposes.</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">4. MSA are supported from SQL 2012 on for use running SQL service accounts (all SQL Services) where they are confined to a SINGLE machine. &nbsp;This means that this account can NOT be used across multiple machines.</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">The confusion came (for me at least) because the installation code was changed to check for the use of MSA. Since the code was not in the setup for SQL 2008, I was able to install an instance using a MSA. The product team has reiterated that although I could do this it is NOT supported and has NOT BEEN TESTED.</span></p>
<p style="background: #f7f7f7;"><span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">- Anne</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Manage SQL Server Connectivity through Windows Azure Virtual Machines Remote PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/manage-sql-server-connectivity-through-windows-azure-virtual-machines-remote-powershell</link>
      <pubDate>Tue, 25 Jun 2013 05:31:04 GMT</pubDate>
      <dc:creator><![CDATA[Madhan Arumugam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/06/25/manage-sql-server-connectivity-through-windows-azure-virtual-machines-remote-powershell/</guid>
      <description><![CDATA[Manage SQL Server Connectivity through Windows Azure Virtual Machines Remote PowerShell Blog
This...]]></description>
      <content:encoded><![CDATA[<p class="Publishwithline"><strong><span style="font-size: large;"><span style="color: #262626;"><span style="font-family: Calibri;">Manage SQL Server Connectivity through Windows Azure Virtual Machines Remote PowerShell Blog</span></span></span></strong></p>
<p><span style="font-family: Calibri;">This blog post comes from Khalid Mouss, Senior Program Manager in Microsoft SQL Server.</span></p>
<p><strong><span style="font-family: Calibri;">Overview </span></strong></p>
<p><span style="font-family: Calibri;">The goal of this blog is to demonstrate how we can automate through PowerShell connecting multiple SQL Server deployments in Windows Azure Virtual Machines. We would configure TCP port that we would open (and close) though Windows firewall from a remote PowerShell session to the Virtual Machine (VM). This will demonstrate how to take the advantage of the remote PowerShell support in Windows Azure Virtual Machines to automate the steps required to </span><a href="https://msdn.microsoft.com/en-us/library/windowsazure/jj823131.aspx"><span style="color: #0563c1; font-family: Calibri;">connect SQL Server in the same cloud service</span></a><span style="font-family: Calibri;"> and in </span><a href="https://msdn.microsoft.com/en-us/library/windowsazure/jj823131.aspx"><span style="color: #0563c1; font-family: Calibri;">different cloud services</span></a><span style="font-family: Calibri;">.<br />&nbsp;<br /> </span><strong><span style="font-family: Calibri;">Scenario 1: VMs connected through the same Cloud Service</span></strong></p>
<p><span style="font-family: Calibri;">2 Virtual machines configured in the same cloud service. </span><span style="font-family: Calibri;">Both VMs running different SQL Server instances on them.</span></p>
<p><span style="font-family: Calibri;">Both VMs configured with remote PowerShell turned on to be able to run PS and other commands directly into them remotely in order to re-configure them to allow incoming SQL connections from a remote VM or on premise machine(s).</span></p>
<p><em><span style="font-family: Calibri;">Note: RDP (Remote Desktop Protocol) is kept configured in both VMs by default to be able to remote connect to them and check the connections to SQL instances for demo purposes only; but not actually required.</span></em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5543.image1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5543.image1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5543.image1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5543.image1.png" alt="" border="0" /></a></p>
<p><strong><span style="font-family: Calibri;">Step 1 &ndash; Provision VMs and Configure Ports</span></strong></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;">Provision VM1; named <em>DemoVM1</em> as follows (see examples screenshots below if using the portal):</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/8233.image2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/8233.image2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/8233.image2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/8233.image2.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/7345.image3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/7345.image3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/7345.image3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/7345.image3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;">Provision VM2 (DemoVM2) with PowerShell Remoting enabled and connected to DemoVM1 above (see examples screenshots below if using the portal):</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/4111.image4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/4111.image4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/4111.image4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/4111.image4.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri;">After provisioning of the 2 VMs above, here is the default port configurations for example:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0081.image5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0081.image5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0081.image5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0081.image5.png" alt="" border="0" /></a></p>
<p><strong><span style="font-family: Calibri;">Step2 &ndash; Verify / Confirm the TCP port used by the database Engine</span></strong></p>
<p><span style="font-family: Calibri;">By the default, the port will be configured to be 1433 &ndash; this can be changed to a different port number if desired.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;">1. RDP to each of the VMs created below &ndash; this will also ensure the VMs complete SysPrep(ing) and complete configuration</span></p>
<p><span style="font-family: Calibri;">2. Go to SQL Server Configuration Manager -&gt; SQL Server Network Configuration -&gt; Protocols for &lt;SQL instance&gt; -&gt; TCP/IP - &gt; IP Addresses</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5807.image6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5807.image6.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5807.image6.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5807.image6.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;">3.</span>&nbsp;<span style="font-family: Calibri;">Confirm the port number used by SQL Server Engine; in this case 1433</span></p>
<p><span style="font-family: Calibri;">4.</span>&nbsp;<span style="font-family: Calibri;">Update from Windows Authentication to Mixed mode</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1884.image7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1884.image7.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1884.image7.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1884.image7.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;">5.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: Calibri;">Restart SQL Server service for the change to take effect</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5670.image8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5670.image8.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5670.image8.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5670.image8.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri;">6.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: Calibri;">Repeat steps 3., 4., and 5. For the second VM: <em>DemoVM2</em></span></p>
<p><strong><span style="font-family: Calibri;">Step 3 &ndash; Remote Powershell to DemoVM1</span></strong></p>
<p>Enter-PSSession -ComputerName condemo.cloudapp.net -Port 61503 -Credential &lt;username&gt; -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck)</p>
<p><span style="font-family: Calibri;">Your will then be prompted to enter the password.</span></p>
<p><strong><span style="font-family: Calibri;">Step 4 &ndash; Open 1433 port in the Windows firewall</span></strong></p>
<p>netsh advfirewall firewall add rule name="DemoVM1Port" dir=in localport=1433 protocol=TCP action=allow</p>
<p>Output:</p>
<p>netsh advfirewall firewall show rule name=DemoVM1Port</p>
<p>Rule Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DemoVM1Port</p>
<p>----------------------------------------------------------------------</p>
<p>Enabled:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</p>
<p>Direction:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In</p>
<p>Profiles:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Domain,Private,Public</p>
<p>Grouping:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>LocalIP:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>RemoteIP:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>Protocol:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP</p>
<p>LocalPort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1433</p>
<p>RemotePort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>Edge traversal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No</p>
<p>Action:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow</p>
<p>Ok.</p>
<p><strong><span style="font-family: Calibri;">Step 5 &ndash; Now connect from DemoVM2 to DB instance in DemoVM1</span></strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1538.image9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1538.image9.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1538.image9.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1538.image9.png" alt="" border="0" /></a></p>
<p><strong><span style="font-family: Calibri;">Step 6 &ndash; Close port 1433 in the Windows firewall</span></strong></p>
<p>netsh advfirewall firewall delete rule name=DemoVM1Port</p>
<p>Output:</p>
<p>Deleted 1 rule(s).</p>
<p>Ok.</p>
<p>netsh advfirewall firewall show&nbsp; rule name=DemoVM1Port</p>
<p>No rules match the specified criteria.</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri;"><strong>Step 7 &ndash; Try to connect from DemoVM2 to DB Instance in DemoVM1<br />&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5417.image10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5417.image10.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5417.image10.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5417.image10.png" alt="" border="0" /></a></strong></span></p>
<p><span style="font-family: Calibri;">Because port 1433 has been closed (in step 6) in the Windows Firewall in VM1 machine, we can longer connect from VM3 remotely to VM1.</span></p>
<p><strong><span style="font-family: Calibri;">Scenario 2: VMs provisioned in different Cloud Services</span></strong></p>
<p><span style="font-family: Calibri;">2 Virtual machines configured in different cloud services. </span><span style="font-family: Calibri;">Both VMs running different SQL Server instances on them. </span><span style="font-family: Calibri;">Both VMs configured with remote PowerShell turned on to be able to run PS and other commands directly into them remotely in order to re-configure them to allow incoming SQL connections from a remote VM or on on-premise machine(s).</span></p>
<p><em><span style="font-family: Calibri;">Note: RDP (Remote Desktop Protocol) is kept configured in both VMs by default to be able to remote connect to them and check the connections to SQL instances for demo purposes only; but not actually needed.</span></em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/6201.image11.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/6201.image11.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/6201.image11.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/6201.image11.png" alt="" border="0" /></a></p>
<p><strong><span style="font-family: Calibri;">Step 1 &ndash; Provision new VM3 </span></strong></p>
<p><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/7801.image12.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/7801.image12.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/7801.image12.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/7801.image12.png" alt="" border="0" /></a></span></p>
<p><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0508.image13.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0508.image13.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0508.image13.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0508.image13.png" alt="" border="0" /></a></span><span style="font-family: Calibri;"></span></p>
<p><span style="font-family: Calibri;">Provision VM3; named <em>DemoVM3</em> as follows (see examples screenshots below if using the portal):</span></p>
<p><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/3034.image14.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/3034.image14.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/3034.image14.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/3034.image14.png" alt="" border="0" /></a></span></p>
<p><span style="font-family: Calibri;">After provisioning is complete, here is the default port configurations:</span></p>
<p><strong><span style="font-family: Calibri;">Step 2 &ndash; Add public port to VM1 connect to from VM3&rsquo;s DB instance</span></strong></p>
<p><span style="font-family: Calibri;">Since VM3 and VM1 are not connected in the same cloud service, we will need to specify the full DNS address while connecting between the machines which includes the public port. We shall add a public port 57000 in this case that is linked to private port 1433 which will be used later to connect to the DB instance.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/2728.image15.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/2728.image15.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/2728.image15.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/2728.image15.png" alt="" border="0" /></a></p>
<p><strong><span style="font-family: Calibri;">Step 3 &ndash; Remote Powershell to DemoVM1</span></strong></p>
<p>Enter-PSSession -ComputerName condemo.cloudapp.net -Port 61503 -Credential &lt;UserName&gt; -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck)</p>
<p><span style="font-family: Calibri;">You will then be prompted to enter the password.</span></p>
<p>&nbsp;</p>
<p><strong><span style="font-family: Calibri;">Step 4 &ndash; Open 1433 port in the Windows firewall</span></strong></p>
<p>netsh advfirewall firewall add rule name="DemoVM1Port" dir=in localport=1433 protocol=TCP action=allow </p>
<p>Output:</p>
<p>Ok.</p>
<p>netsh advfirewall firewall show rule name=DemoVM1Port</p>
<p>Rule Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DemoVM1Port</p>
<p>----------------------------------------------------------------------</p>
<p>Enabled:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</p>
<p>Direction:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In</p>
<p>Profiles:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Domain,Private,Public</p>
<p>Grouping:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>LocalIP:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>RemoteIP:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>Protocol:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP</p>
<p>LocalPort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1433</p>
<p>RemotePort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any</p>
<p>Edge traversal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No</p>
<p>Action:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow</p>
<p>Ok.</p>
<p>&nbsp;</p>
<p><strong><span style="font-family: Calibri;">Step 5 &ndash; Now connect from DemoVM3 to DB instance in DemoVM1</span></strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1651.image16.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1651.image16.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1651.image16.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1651.image16.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/6281.image17.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/6281.image17.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/6281.image17.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/6281.image17.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri;">RDP into VM3, launch SSM and Connect to VM1&rsquo;s DB instance as follows. You must specify the full server name using the DNS address and public port number configured above.</span></p>
<p><strong><span style="font-family: Calibri;">Step 6 &ndash; Close port 1433 in the Windows firewall</span></strong></p>
<p>netsh advfirewall firewall delete rule name=DemoVM1Port</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Output:</span></p>
<p>Deleted 1 rule(s).</p>
<p>Ok.</p>
<p>netsh advfirewall firewall show&nbsp; rule name=DemoVM1Port</p>
<p>No rules match the specified criteria.<strong><span style="font-family: Calibri; font-size: small;">&nbsp;</span></strong></p>
<p><span style="font-family: Calibri;"><strong>Step 7 &ndash; Try to connect from DemoVM2 to DB Instance in DemoVM1<br />&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/2656.image18.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/2656.image18.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/2656.image18.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/2656.image18.png" alt="" border="0" /></a></strong></span></p>
<p><span style="font-family: Calibri;">Because port 1433 has been closed (in step 6) in the Windows Firewall in VM1 machine, we can no longer connect from VM3 remotely to VM1.</span></p>
<p><strong><span style="font-family: Calibri;">Conclusion</span></strong></p>
<p><span style="font-family: Calibri;">Through the new support for remote PowerShell in Windows Azure Virtual Machines, one can script and automate many Virtual Machine and SQL management tasks. In this blog, we have demonstrated, how to start a remote PowerShell session, re-configure Virtual Machine firewall to allow (or disallow) SQL Server connections.</span></p>
<p><strong><span style="font-family: Calibri;">References</span></strong></p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj823132.aspx"><span style="color: #0563c1; font-family: Calibri; font-size: small;">SQL Server in Windows Azure Virtual Machines</span></a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server 2014 CTP1 now available for download as well as in Windows Azure Image Gallery</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/sql-server-2014-ctp1-now-available-for-download-as-well-as-in-windows-azure-image-gallery</link>
      <pubDate>Tue, 25 Jun 2013 04:50:00 GMT</pubDate>
      <dc:creator><![CDATA[Madhan Arumugam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/06/25/sql-server-2014-ctp1-now-available-for-download-as-well-as-in-windows-azure-image-gallery/</guid>
      <description><![CDATA[Exciting news - At TechEd Europe 2013 keynote today, we announced that SQL Server 2014 CTP1 is now...]]></description>
      <content:encoded><![CDATA[<p>Exciting news - At TechEd Europe 2013 keynote today, we announced that SQL Server 2014 CTP1 is now available for download as well as in Windows Azure Image Gallery. Try it out now and give us feedback.</p>
<p><a href="https://www.microsoft.com/en-us/sqlserver/sql-server-2014.aspx">https://www.microsoft.com/en-us/sqlserver/sql-server-2014.aspx</a></p>
<p><a href="https://europe.msteched.com/#fbid=bdRdsIPwIgn">https://europe.msteched.com/#fbid=bdRdsIPwIgn</a> - Watch the Keynote again</p>
<p>&nbsp;</p>
<p>thanks,</p>
<p>Madhan</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server in Windows Azure Infrastructure Services: Performance Guidance Whitepaper and other TechEd NA 2013 updates</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/sql-server-in-windows-azure-infrastructure-services-performance-guidance-whitepaper-and-other-teched-na-2013-updates</link>
      <pubDate>Mon, 03 Jun 2013 06:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Madhan Arumugam]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/06/03/sql-server-in-windows-azure-infrastructure-services-performance-guidance-whitepaper-and-other-teched-na-2013-updates/</guid>
      <description><![CDATA[Greetings,
We are excited to announce the release of our new whitepaper, Performance Guidance for...]]></description>
      <content:encoded><![CDATA[<p>Greetings,</p>
<p>We are excited to announce the release of our new whitepaper, <a href="https://go.microsoft.com/fwlink/?LinkId=306266">Performance Guidance for SQL Server in Windows Azure Virtual Machines</a>. This paper provides you guidance to optimize your SQL Server workloads running in Windows Azure Infrastructure Services.&nbsp;Additionally, if you are attending <a href="https://channel9.msdn.com/">TechEd North America 2013</a> in New Orleans this week, be sure to stop by DBI-B311 on Day 4 (details below) to learn these strategies in person!</p>
<p>We also have a bunch of other sessions in TechEd North America 2013 to learn more about running SQL Server in Windows Azure Virtual Machines. Please see the full list of Breakout Sessions below.&nbsp;</p>
<p>&nbsp;</p>
<p>Day 1 - Monday June 3<sup>rd</sup></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="73">
<p>4:45 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B201">DBI-B201: Lap Around Windows Azure SQL Database and Microsoft SQL Server in Windows<br />&nbsp; Azure Virtual Machines</a></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Day 2 - Tuesday June 4<sup>th</sup></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="73">
<p>3:15 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/MDC-B406">MDC-B406: Achieve High Availability with Microsoft SQL Server on Windows Azure Virtual<br />&nbsp; Machines</a></p>
</td>
</tr>
<tr>
<td valign="top" width="73">
<p>5:00 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B206">DBI-B206: Private Cloud &ndash; Better Together: Microsoft SQL Server 2012, Windows Server<br />&nbsp; 2012 and System Center 2012</a></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Day 3 - Wednesday June 5<sup>th</sup></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="73">
<p>8:30 AM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B316">DBI-B316: Running BI Workloads on Windows Azure Virtual Machines</a></p>
</td>
</tr>
<tr>
<td valign="top" width="73">
<p>10:15 AM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B306">DBI-B306: Microsoft SQL Server High Availability and Disaster Recovery on Windows Azure</a></p>
</td>
</tr>
<tr>
<td valign="top" width="73">
<p>5:00 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B329">DBI-B329: Overview, Best Practices and Lessons Learned on Microsoft SQL Server in<br />&nbsp; Windows Azure Virtual Machines</a></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Day 4 - Thursday June 6<sup>th</sup></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="73">
<p>10:15 AM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B311">DBI-B311:&nbsp;Performance Tuning Microsoft SQL Server in Windows Azure Virtual Machines</a></p>
</td>
</tr>
<tr>
<td valign="top" width="73">
<p>1:00 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DBI-B310">DBI-B310:&nbsp;Windows Azure Virtual Machines and SQL Unplugged</a></p>
</td>
</tr>
<tr>
<td valign="top" width="73">
<p>2:45 PM</p>
</td>
<td valign="top" width="517">
<p><a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/MDC-B361">MDC-B361:&nbsp;Best Practices from Real Customers: Deploying to Windows Azure Infrastructure<br />&nbsp; Services (IaaS)</a></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Hope to see you there!</p>]]></content:encoded>
    </item>
    <item>
      <title>Enhancements to SQL Server Backup to Cloud in SQL Server 2012 SP1 CU4</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/enhancements-to-sql-server-backup-to-cloud-in-sql-server-2012-sp1-cu4</link>
      <pubDate>Fri, 31 May 2013 14:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Karthika [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/05/31/enhancements-to-sql-server-backup-to-cloud-in-sql-server-2012-sp1-cu4/</guid>
      <description><![CDATA[Cumulative Update 4 for SQL Server 2012 Service Pack 1 includes enhancements to improve the SQL...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;"><span style="font-family: Calibri;">Cumulative Update 4 for SQL Server 2012 Service Pack 1 includes enhancements to improve the SQL Server Backup and Restore to Cloud user experience.&nbsp; The enhancements include performance improvements, cleaning up invalid blobs when backups fail or are interrupted, and PowerShell support.&nbsp;</span></span>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">To request this update, see </span><a href="https://go.microsoft.com/fwlink/?LinkId=296580"><span style="font-family: Calibri; font-size: small;">this knowledgebase article</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.</span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Performance Improvements:</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Performance improvements include faster return of restore metadata operations.&nbsp; The affected operations include:</span></span></p>
<div>
<ul>
<li>RESTORE HEADERONLY</li>
<li>RESTORE FILELISTONLY</li>
<li>RESTORE LABELONLY</li>
</ul>
</div>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Cleaning up invalid blobs after an interrupted or failed backup:</span></span></span></h2>
<p><span style="font-family: Calibri; font-size: small;">If backup operation fails, it may result in an incomplete or invalid blob.SQL Server Backup to URL process attempts to cleanup cleaning blobs that result from a failed backup.&nbsp;&nbsp; However, if the backup fails due to prolonged or sustained network connectivity failure, backup to URL process may not be able gain access to the blob and the blob may remain orphaned.&nbsp; In such cases, you have to manually release the lease and delete the blob.&nbsp;</span><span style="font-size: small;"><span style="font-family: Calibri;">This&nbsp;</span></span><a href="https://msdn.microsoft.com/en-us/library/jj919145.aspx"><span style="font-family: Calibri; font-size: small;">topic</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> has the details on how.</span></span></p>
<h2>&nbsp;<span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">PowerShell Support:</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">This cumulative update also includes PowerShell support for the backup to cloud feature with changes to existing cmdlets and 4 new cmdlets.&nbsp; Following is a brief overview of the changes and sample syntax.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">For more information and code examples, see&nbsp; the following topics:</span></span></p>
<p style="padding-left: 30px;">&nbsp;<span style="font-size: small;"><span style="font-family: Calibri;"><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi;"><a href="https://msdn.microsoft.com/en-us/library/dn223322.aspx">Use PowerShell to Backup Multiple Databases to Windows Azure Blob Storage Service</a></span></span></span></p>
<p style="padding-left: 30px;">&nbsp;<a href="https://msdn.microsoft.com/en-us/library/jj919148.aspx">SQL Server Backup and Restore to Windows Azure Blob Storage Service</a></p>
<p>&nbsp;</p>
<h3><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Existing cmdlet changes: </span></span></span></h3>
<p><span style="font-size: small;"><span style="font-family: Calibri;">The <strong>Backup-SqLDatabase</strong>, and <strong>Restore-SqlDatabase</strong> cmdlets have new parameters to support creating a SQL Server backup to or restore from a Windows Azure Storage Container.&nbsp; The following are the new parameters:</span></span></p>
<p><span style="text-decoration: underline;"><span style="font-size: small;"><span style="font-family: Calibri;"><strong>BackupContainer:</strong></span></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Using this parameter you can specify the URL of the container as the location for your backup files and let the Backup to URL process generate the file names.&nbsp; Alternatively you can use the <strong>BackupFile</strong> parameter to specify both the location and the name of the file. You can also use this parameter to set locations for a folder on a disk backup device. This parameter can be useful when backing up multiple databases in a given instance.</span></span></p>
<p><span style="text-decoration: underline;"><strong><span style="font-size: small;"><span style="font-family: Calibri;">SqlCredential:</span></span></strong></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">This parameter allows you to specify the SQL Credential name of object that stores the Windows Azure Storage authentication information.</span></span></p>
<h4><em><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sample Syntax: </span></span></span></em></h4>
<ul>
<li>This command backs up all databases on the server instance 'Computer\Instance' to the Windows Azure Blob storage container using the <strong>BackupContainer</strong> parameter.</li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri; font-size: small;">&nbsp;</span><span style="font-size: small;"><span style="font-family: Calibri;">Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase &ndash;BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName"</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<ul>
<li>This command creates a full backup of the database 'MyDB'. It uses the <strong><span style="color: #808080;">BackupFile</span></strong> parameter to specify the location (URL) and the backup file name. The <strong><span style="color: #808080;">SqlCredential</span></strong> parameter is used to specify the name of the SQL Server credential.</li>
</ul>
<p class="DdueNormal" style="padding-left: 60px;">&nbsp;<span style="font-size: small;"><span style="font-family: Calibri;">Backup-SqlDatabase &ndash;ServerInstance "Computer\Instance" &ndash;Database &ndash;"MyDB" -BackupFile "https://storageaccountname.blob.core.windows.net/containername/MyDB.bak" -SqlCredential "SQLCredentialName"</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<ul>
<li>This command restores the full database 'MyDB' from the file on the Windows Azure Blob storage service to a SQL Server instance.</li>
</ul>
<p class="DdueNormal" style="padding-left: 60px;"><span style="font-family: Verdana; font-size: x-small;">&nbsp;</span><span style="font-size: small;"><span style="font-family: Calibri;">Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak"&nbsp; -SqlCredential "mySqlCredential"</span></span></p>
<h3><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">New cmdlets:</span></span></span></h3>
<p><span style="text-decoration: underline;"><strong><span style="font-size: small;"><span style="font-family: Calibri;">New-SQLCredential</span></span></strong></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">The New-SqlCredential cmdlet creates a new SQL Server Credential object. The SQL Server credential is required when backing up to or restoring from the Windows Azure storage service, and is used to store the Windows Azure storage account name and access key information.</span></span></p>
<h4><em><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Sample Syntax:</span></span></span></em></h4>
<ul>
<li>This command creates SQL Credential &ldquo;mysqlcredential&rdquo; on the current instance of SQL Server.</li>
</ul>
<p style="padding-left: 30px;"><span style="font-family: Calibri; font-size: small;">&nbsp;</span><span style="font-size: small;"><span style="font-family: Calibri;">New-SqlCredential &ndash; name "mysqlcredential" &ndash;Identity "storageAccount" &ndash;secret &ldquo;storageAccessKey&rdquo;</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="text-decoration: underline;"><strong><span style="font-size: small;"><span style="font-family: Calibri;">Set-SqlCredential</span></span></strong></span></p>
<p class="DdueNormal">You can set the Identity and password properties for a SQL Credential object using this cmdlet. This cmdlet supports the two following modes of operation:</p>
<p class="DdueNormal" style="padding-left: 30px;">By specifying the path or location of the credential including the credential name using the &ndash;path parameter.</p>
<p class="DdueNormal" style="padding-left: 30px;">By passing a Smo.Credential object to the object using the &ndash;InputObject.</p>
<h4><em><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Sample Syntax:</span></span></span></em></h4>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">This command sets the identity of MySqlCredential to &lsquo;mystorageaccount&rsquo;.</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;">Set-SqlCredential -Path "SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential" &ndash;Identity "mystorageaccount"</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">This command retrieves the credential object from the <strong>Get-Credential</strong> cmdlet and then pipes it to the <strong>Set-Sql Credential</strong> cmdlet to set the identity of mySqLCrendential to&nbsp; &lsquo;mystorageaccount&rsquo;.</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;">$cred = Get-SqlCredential -Name MySqlCredential</span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;">$cred | Set-SqlCredential &ndash;Identity <span style="font-family: Calibri;">"mystorageaccount"</span></span></p>
<p><span style="text-decoration: underline;"><strong><span style="font-size: small;"><span style="font-family: Calibri;">Get-SqlCredential</span></span></strong></span></p>
<p class="DdueNormal">The <strong>Get-SqlCredential</strong> returns the SQL credential object.&nbsp; This cmdlet supports the following modes of operation:&nbsp;</p>
<p class="DdueNormal" style="padding-left: 30px;">By specifying the name of the SQL credential and the path of the instance.</p>
<p class="DdueNormal" style="padding-left: 30px;">By specifying the name of the SQL Credential and the server object.</p>
<p class="DdueNormal"><span style="font-family: Verdana;">&nbsp;</span></p>
<h4><em><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Sample Syntax:</span></span></span></em></h4>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">This command returns the credential object.</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri;"><span style="font-size: small;">Get-SqlCredential &ndash;Name </span>"<span style="font-size: small;">mycredential</span>"</span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="text-decoration: underline;"><strong><span style="font-size: small;"><span style="font-family: Calibri;">Remove-SqlCredential</span></span></strong></span></p>
<p class="DdueNormal">The <strong>Remove-SqlCredential</strong> cmdlet deletes a SQL Server credential object. This cmdlet supports the following two modes of operation:</p>
<p class="DdueNormal" style="padding-left: 30px;">By specifying the path or location of the credential and the credential name using the <strong>&ndash;path</strong> parameter.</p>
<p class="DdueNormal" style="padding-left: 30px;">By passing a Smo.Credential object to the object using the <strong>&ndash;InputObject</strong> parameter.</p>
<p class="DdueNormal"><span style="font-family: Verdana; font-size: x-small;">&nbsp;</span></p>
<h4><em><span style="font-size: small;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Sample Syntax:</span></span></span></em></h4>
<ul>
<li>
<div class="DdueNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The command retrieves the credential object from the <strong>Get-Credential</strong> cmdlet and then pipes it to the <strong>Remove-Sql Credential</strong> cmdlet to delete the SQL Credential &lsquo;MySqlCredential&rsquo;.</span></span></div>
</li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;">$cred = Get-SqlCredential -Name "MySqlCredential"</span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;">$cred | Remove-SqlCredential</span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">This blog post is about the changes that were made in the Cumulative Update 4 for SQL Server 2012 SP1 release and assumes some amount of familiarity with SQL Server native backup to cloud functionality released in SQL Server 2012 SP1 CU2.&nbsp; For information on&nbsp; SQL Server Backup and Restore to Cloud, see the following articles:</span></span></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><a href="https://blogs.msdn.com/b/windowsazure/archive/2013/01/23/sql-server-backup-and-restore-to-cloud-simplified.aspx"><span style="font-family: Calibri; font-size: small;">SQL Server Backup and Restore to Cloud Simplified</span></a></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><a href="https://msdn.microsoft.com/en-us/library/jj720558.aspx"><span style="font-family: Calibri; font-size: small;">Getting Started Tutorial</span></a></p>
<p>&nbsp;</p>
<div><hr align="left" size="1" width="33%" /></div>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server in Windows Azure Infrastructure Services – Updated Documentation and Best Practices for GA, Upcoming Blogs</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/sql-server-in-windows-azure-infrastructure-services-updated-documentation-and-best-practices-for-ga-upcoming-blogs</link>
      <pubDate>Wed, 24 Apr 2013 16:04:16 GMT</pubDate>
      <dc:creator><![CDATA[G Bowerman (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/04/24/sql-server-in-windows-azure-infrastructure-services-updated-documentation-and-best-practices-for-ga-upcoming-blogs/</guid>
      <description><![CDATA[It&rsquo;s been just over a week since Windows Azure announced the GA of Infrastructure Services,...]]></description>
      <content:encoded><![CDATA[<p>It&rsquo;s been just over a week since Windows Azure announced the GA of <a href="https://www.windowsazure.com/en-us/home/scenarios/infrastructure-services/">Infrastructure Services</a>, marking the beginning of a fully supported Infrastructure as a Service in Windows Azure, with SQL Server as a major component.</p>
<p>Pre-installed SQL Server VMs are available for pay-per-hour usage in the Windows Azure gallery. Currently Enterprise, Standard and Web edition VMs running on Windows Server 2008 R2 SP1 are available, with more SQL Server editions coming soon. SQL Server editions running on Windows Server 2012 images are also on the way. For more details on the scenarios and benefits of running SQL Server workloads on Windows Azure Virtual Machines, please visit the SQL Server blog post <a href="https://blogs.technet.com/b/dataplatforminsider/archive/2013/04/16/develop-and-test-new-sql-server-apps-scale-existing-apps-and-unlock-hybrid-scenarios-with-windows-azure-infrastructure-services.aspx" target="_blank">here</a>.</p>
<p>We are very happy to announce that the updated technical documentation for deploying and running SQL Server in Windows Azure Infrastructures Services is now available online. When deploying SQL Server in Windows Azure Virtual Machines, we recommend that you follow the detailed guidance given in the new <a href="https://go.microsoft.com/fwlink/?linkid=294719&amp;clcid=0x409" target="_blank">SQL Server in Windows Azure Virtual Machines</a> documentation in the library. This documentation includes a series of articles and tutorials that provide detailed guidance on:</p>
<ul>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294720&amp;clcid=0x409" target="_blank">Getting Started with SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294721&amp;clcid=0x409" target="_blank">Getting Ready to Migrate to SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294722&amp;clcid=0x409" target="_blank">SQL Server Deployment in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294723&amp;clcid=0x409" target="_blank">Connectivity Considerations for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294724&amp;clcid=0x409" target="_blank">Performance Considerations for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294725&amp;clcid=0x409" target="_blank">Security Considerations for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294726&amp;clcid=0x409" target="_blank">Troubleshooting and Monitoring for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294727&amp;clcid=0x409" target="_blank">High Availability and Disaster Recovery for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://go.microsoft.com/fwlink/?linkid=294728&amp;clcid=0x409" target="_blank">Backup and Restore for SQL Server in Windows Azure Virtual Machines</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windowsazure/jj992719.aspx" target="_blank">SQL Server Business Intelligence in Windows Azure Virtual Machines</a></li>
</ul>
<p>Over the next few weeks we are planning a series of blog posts to provide more detailed information on specific SQL Server topics. Subjects in the pipeline include: high availability, disaster recovery, performance, application migration and security. Let us know what topics you would like to see covered in this series by adding comments to this post.</p>
<p>SQL Server Team&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server Backup to Cloud – Managing Interrupted backups</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/sql-server-backup-to-cloud-managing-interrupted-backups</link>
      <pubDate>Tue, 12 Mar 2013 15:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Karthika [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/03/12/sql-server-backup-to-cloud-managing-interrupted-backups/</guid>
      <description><![CDATA[Writer: Karthika Raman

Technical Reviewers: Guy Bowerman, Pat Schaefer, Andrew...]]></description>
      <content:encoded><![CDATA[<div>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Writer: Karthika Raman</span></span></p>
</div>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Technical Reviewers: Guy Bowerman, Pat Schaefer, Andrew Cherry</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">On January 24, 2013, the SQL Server engineering team released new functionality in SQL Server 2012 SP1 CU2, enabling </span><a href="https://blogs.msdn.com/b/windowsazure/archive/2013/01/24/sql-server-backup-and-restore-to-cloud-simplified.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">SQL Server native backup to cloud</span></a><span style="font-size: small;"><span style="font-family: Calibri;">. The steps to creating a SQL Server backup to Windows Azure Blob storage are simple, but if a backup is interrupted it can leave behind blob files that require additional steps to delete.&nbsp; Some of this information along with other best practices and troubleshooting tips is addressed in the &nbsp;</span></span><a href="https://msdn.microsoft.com/en-us/library/jj919149.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Best Practices topic</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> in SQL Server Books online.&nbsp; In this blog post, we focus on the interrupted backup scenario, identifying locked blobs that might be partial or corrupt as a result of interrupted backups, and deleting them. </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">The&nbsp;<span style="color: #0000ff;">Blob, Blob Leases, and SQL Server</span></span><span style="font-family: Calibri; font-size: small;">&nbsp;section provides background information about blobs and leases in relation to SQL Server Backup to cloud. The&nbsp;<span style="color: #0000ff;">Managing Interrupted Backup</span></span><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;section discusses managing interrupted backups and a sample PowerShell code you can use to get started.</span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Blobs, Blob Leases, and SQL Server</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">In order to get exclusive write access to a blob, a lease is acquired. Acquiring a lease helps avoid accidental overwrites or deletes when there is already another process accessing a blob. Blob leases are two types:&nbsp; One type of lease has a set duration.&nbsp; This duration can be anywhere from 15 to 60 seconds. The lease is active for the time of duration, but can be reacquired before it expires, to complete the backup or restore process, by specifying the existing lease Id.&nbsp;&nbsp; The other type where there is no set duration is an infinite lease.&nbsp; Infinite leases are active unless explicitly released or broken.&nbsp; In effect, the infinite lease on a blob acts like a lock.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">SQL Server acquires an infinite lease for backup and restore processes.&nbsp; In the case of backup, a unique lease Id is used, and in the case of restore, a known lease id &lsquo;BAC2BAC2BAC2BAC2BAC2BAC2BAC2BAC2&rsquo; is used.&nbsp; Once the backup or restore process is successfully completed, the lease is released.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">What happens when a backup or restore is interrupted?</span> </span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">During restores, the restore process always attempts to release the lease unless the network is interrupted.&nbsp; If the lease remains active, overwrites or deletes cannot be performed until the lease is broken or released through a subsequent restore.&nbsp; So an interrupted restore may not often be something that requires close monitoring.&nbsp; However, interrupted backups present a different scenario.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">If the backup process is interrupted, it can result in a partial or corrupt blob with an active lease which remains, blocking any overwrites, or deletes.&nbsp; It also prevents any restores using this file, since the restore process needs to acquire a lease with the well-known lease Id, but the existing active backup lease prevents this &ndash; which is probably a desirable result as the file could be partial or corrupt.&nbsp; So with an active lease on the blob, the blob remains locked until the lease is explicitly broken.</span>&nbsp;&nbsp; </span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Managing Interrupted Backups</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">As stated in the section above, interrupted backups need to be monitored and managed.&nbsp; This section walks through the process of monitoring interrupted backups, identifying locked blobs, and breaking the lease using PowerShell scripts. </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Backups can be interrupted due to several reasons such as network failures, process canceled by the user, power outage etc.&nbsp; As interrupted backups can result in a partial blob with an active lease, in order to overwrite this file or delete it, you must first identify such blobs and break the lease.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">One way to identify such blobs is to actively monitor backup return codes/errors and interrupted backups.&nbsp; Below is a list of error/return codes that are returned from SQL Server Backup and restore process, which you can use to monitor for blob files with active leases.</span></span></p>
<p style="padding-left: 30px;"><span style="color: #ff6600; font-size: small;"><span style="font-family: Calibri;">Msg 3202, Level 16, State 1, Line 1</span></span></p>
<p style="padding-left: 30px;"><span style="font-family: Calibri; font-size: small;">Write on "</span><a href="https://mystorage.blob.core.windows.net/mycontainer/test.bak"><span style="color: #0000ff; font-family: Calibri; font-size: small;">https</span></a><a href="https://mystorage.blob.core.windows.net/mycontainer/test.bak"><span style="color: #0000ff; font-family: Calibri; font-size: small;">://mystorage.blob.core.windows.net/mycontainer/test.bak</span></a><span style="font-size: small;"><span style="font-family: Calibri;">" failed: Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: <span style="color: #ff6600;">(412)</span> There is currently a lease on the blob and no lease ID was specified in the request.</span></span></p>
<p style="padding-left: 30px;"><span style="font-family: Calibri; font-size: small;">BackupIoRequest::ReportIoError: read failure on backup device </span><a href="https://mystorage.blob.core.windows.net/mycontainer/test.bak"><span style="color: #0000ff; font-family: Calibri; font-size: small;">https://mystorage.blob.core.windows.net/mycontainer/test.bak </span></a><span style="font-size: small;"><span style="font-family: Calibri;">'. Operating system error Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: <span style="color: #ff6600;">(409)</span> Conflict..</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">This method won&rsquo;t catch cases where the backup process is aborted or the machine goes down.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Another way is to run a script periodically to look for blobs with active leases in the storage account.&nbsp; The PowerShell script example included here is a good starting point.&nbsp; The PowerShell script establishes an authenticated connection to the storage account, looks for all files in a specified container that are in a &lsquo;locked&rsquo; state and filters out restore leases using the well-known lease Id.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Below is the PowerShell example to identify locked blobs and breaking the lease. </span></span><span style="font-family: Calibri; font-size: small;">A downloadable version of the code is available on the </span><a href="https://gallery.technet.microsoft.com/Breaking-leases-on-locked-28f896dc"><span style="color: #0000ff; font-family: Calibri; font-size: small;">TechNet code gallery</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.</span></span></p>
<p><em><span style="font-size: small;">Important Note:&nbsp; </span></em></p>
<p><em><span style="font-size: small;">This example is intended to show how to break a lease, but running this while a backup is running will cause the backup to fail as it will break the lease that SQL Server acquired to do the backup.&nbsp; Before running this script or scheduling it, ensure that no backup is running at the same time.</span></em></p>
<p><span style="color: #000080;">param</span>(</p>
<p style="padding-left: 60px;">[<span style="color: #00ccff;">Parameter</span>(Mandatory<span style="color: #c0c0c0;">=</span><span style="color: #ff0000;">$true</span>)]</p>
<p style="padding-left: 60px;">[string]<span style="color: #ff0000;">$storageAccount</span>,</p>
<p style="padding-left: 60px;">[<span style="color: #00ccff;">Parameter</span>(Mandatory<span style="color: #c0c0c0;">=</span><span style="color: #ff0000;">$true</span>)]</p>
<p style="padding-left: 60px;">[string]<span style="color: #ff0000;">$storageKey</span>,</p>
<p style="padding-left: 60px;">[<span style="color: #00ccff;">Parameter</span>(Mandatory<span style="color: #c0c0c0;">=</span><span style="color: #ff0000;">$true</span>)]</p>
<p style="padding-left: 60px;">[string]<span style="color: #ff0000;">$blobContainer</span>,</p>
<p style="padding-left: 60px;">[<span style="color: #00ccff;">Parameter</span>(Mandatory<span style="color: #c0c0c0;">=</span><span style="color: #ff0000;">$true</span>)]</p>
<p style="padding-left: 60px;">[string]<span style="color: #ff0000;">$storageAssemblyPath</span></p>
<p>)</p>
<p><span style="color: #008000;"># Well known Restore Lease ID</span></p>
<p><span style="color: #ff0000;">$restoreLeaseId</span> <span style="color: #c0c0c0;">=</span> <span style="color: #800000;">"BAC2BAC2BAC2BAC2BAC2BAC2BAC2BAC2"</span></p>
<p><span style="color: #008000;"># Load the storage assembly without locking the file for the duration of the PowerShell session</span></p>
<p><span style="color: #ff6600;">$bytes</span> = <span style="color: #008080;">[System.IO.File]</span><span style="color: #c0c0c0;">::</span>ReadAllBytes(<span style="color: #ff0000;">$storageAssemblyPath</span>)</p>
<p><span style="color: #008080;">[System.Reflection.Assembly]</span><span style="color: #c0c0c0;">::</span>Load(<span style="color: #ff0000;">$bytes</span>)</p>
<p><span style="color: #ff0000;">$cred</span> <span style="color: #c0c0c0;">=</span> <span style="color: #3366ff;">New-Object </span><span style="color: #800000;">'Microsoft.WindowsAzure.Storage.Auth.StorageCredentials' </span><span style="color: #ff0000;">$storageAccount</span>, <span style="color: #ff0000;">$storageKey</span></p>
<p><span style="color: #ff0000;">$client</span> <span style="color: #c0c0c0;">=</span> <span style="color: #3366ff;">New-Object</span> <span style="color: #800000;">'Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient' "https://</span><span style="color: #ff0000;">$storageAccount</span>.blob.core.windows.net", <span style="color: #ff0000;">$cred</span></p>
<p><span style="color: #ff0000;">$container</span><span style="color: #c0c0c0;"> =</span> <span style="color: #ff0000;">$client</span>.GetContainerReference(<span style="color: #ff0000;">$blobContainer</span>)</p>
<p><span style="color: #008000;">#list all the blobs</span></p>
<p><span style="color: #ff0000;">$allBlobs</span> <span style="color: #c0c0c0;">=</span> <span style="color: #ff0000;">$container</span>.ListBlobs()</p>
<p><span style="color: #ff0000;">$lockedBlobs</span> <span style="color: #c0c0c0;">=</span> @()</p>
<p><span style="color: #008000;"># filter blobs that are have Lease Status as "locked"</span></p>
<p><span style="color: #000080;">foreach</span>(<span style="color: #ff0000;">$blob</span><span style="color: #000080;"> in </span><span style="color: #ff0000;">$allBlobs</span>)</p>
<p>{</p>
<p><span style="color: #ff0000;">$blobProperties</span> <span style="color: #c0c0c0;">=</span> <span style="color: #ff0000;">$blob</span>.Properties</p>
<p>if(<span style="color: #ff0000;">$blobProperties</span>.LeaseStatus <span style="color: #c0c0c0;">-eq</span> <span style="color: #800000;">"Locked"</span>)</p>
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 60px;"><span style="color: #ff0000;">$lockedBlobs</span> <span style="color: #c0c0c0;">+=</span> $blob</p>
<p style="padding-left: 30px;">}</p>
<p>}</p>
<p>if (<span style="color: #ff0000;">$lockedBlobs</span>.Count <span style="color: #c0c0c0;">-eq </span><span style="color: #800000;">0</span>)</p>
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 60px;"><span style="color: #3366ff;">Write-Host</span> <span style="color: #800000;">" There are no blobs with locked lease status"</span></p>
<p style="padding-left: 30px;">}</p>
<p>if(<span style="color: #ff0000;">$lockedBlobs</span>.Count -gt 0)</p>
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 60px;"><span style="color: #3366ff;">write-host</span> <span style="color: #800000;">"Breaking leases"</span></p>
<p style="padding-left: 60px;"><span style="color: #000080;">foreach</span>(<span style="color: #ff0000;">$blob</span> <span style="color: #000080;">in</span> <span style="color: #ff0000;">$lockedBlobs</span> )</p>
<p style="padding-left: 60px;">{</p>
<p style="padding-left: 90px;">try</p>
<p style="padding-left: 90px;">{</p>
<p style="padding-left: 120px;"><span style="color: #ff0000;">$blob</span>.AcquireLease(<span style="color: #ff0000;">$null</span>, <span style="color: #ff0000;">$restoreLeaseId</span>,<span style="color: #ff0000;"> $null</span>, <span style="color: #ff0000;">$null</span>, <span style="color: #ff0000;">$null</span>)</p>
<p style="padding-left: 120px;"><span style="color: #3366ff;">Write-Host</span> <span style="color: #800000;">"The lease on</span> $(<span style="color: #ff0000;">$blob</span>.Uri) <span style="color: #800000;">is a restore lease"</span></p>
<p style="padding-left: 90px;">}</p>
<p style="padding-left: 90px;">catch <span style="color: #008080;">[Microsoft.WindowsAzure.Storage.StorageException]</span></p>
<p style="padding-left: 90px;">{</p>
<p style="padding-left: 120px;">if(<span style="color: #ff0000;">$</span>_.Exception.RequestInformation.HttpStatusCode <span style="color: #c0c0c0;">-eq </span><span style="color: #800000;">409</span>)</p>
<p style="padding-left: 120px;">{</p>
<p style="padding-left: 150px;"><span style="color: #3366ff;">Write-Host</span> <span style="color: #800000;">"The lease on</span> $(<span style="color: #ff0000;">$blob</span>.Uri) <span style="color: #800000;">is not a restore lease"</span></p>
<p style="padding-left: 120px;">}</p>
<p style="padding-left: 90px;">}</p>
<p style="padding-left: 90px;"><span style="color: #3366ff;">Write-Host</span> <span style="color: #800000;">"Breaking lease on</span> $(<span style="color: #ff0000;">$blob</span>.Uri)<span style="color: #800000;">"</span></p>
<p style="padding-left: 90px;"><span style="color: #ff0000;">$blob</span>.BreakLease($(<span style="color: #3366ff;">New-TimeSpan</span>), <span style="color: #ff0000;">$null</span>, <span style="color: #ff0000;">$null</span>, <span style="color: #ff0000;">$null</span>) <span style="color: #c0c0c0;">|</span> <span style="color: #3366ff;">Out-Null</span></p>
<p style="padding-left: 60px;">}</p>
<p style="padding-left: 30px;">}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><em><span style="color: #4f81bd;"><span style="font-family: Cambria;"><span style="font-size: small;">How to test the interrupted backup scenario using the script.</span></span></span></em></h4>
<p><span style="font-family: Calibri;"><span style="font-size: small;">The following is a self-guided walkthrough of creating a locked blob by interrupting a backup process, and using the script to release the lease to successfully delete the blob file that resulted from the interrupted backup.</span></span></p>
<p>&nbsp;</p>
<ul>
<li><span style="font-size: small;"><span style="font-size: small;"><span style="font-family: Calibri;">The script prompts for storage account name, storage access key, container name, and the path and file name of the Windows Azure Storage Assembly.&nbsp; You can either choose to provide these interactively or you can replace the params () section like this:&nbsp;</span></span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="color: #008000; font-size: small;"><span style="font-family: Calibri;">#provide values for parameters</span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: #ff0000;">$storageAccount</span> <span style="color: #c0c0c0;">=</span> <span style="color: #800000;">"mycloudstorage"</span></span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: #ff0000;">$storageKey</span> <span style="color: #c0c0c0;">=</span> <span style="color: #800000;">"&lt;primary/secondary access key value of the storage account&gt;&rdquo;</span></span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: #ff0000;">$blobContainer</span> <span style="color: #c0c0c0;">=</span> <span style="color: #800000;">"sqlbackup"</span></span></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: #ff0000;">$storageAssemblyPath</span><span style="color: #c0c0c0;"> =</span> <span style="color: #800000;">"C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\Microsoft.WindowsAzure.Storage.dll"</span></span></span></p>
<p style="padding-left: 60px;"><span style="color: #3366ff; font-size: small;"><span style="font-family: Calibri;">Note:&nbsp; The storage assembly is stored in the Binn folder of the SQL Server 2012 SP1 CU2 instance. In the above example, it is the default SQL Server instance.</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Create a SQL Server Backup to Windows Azure blob storage which completes successfully.</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1817.InterruptedBackup_Step2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1817.InterruptedBackup_5F00_Step2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/1817.InterruptedBackup_Step2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/1817.InterruptedBackup_5F00_Step2.jpg" alt="" border="0" /></a></span></span></p>
<ul>
<li><span style="font-family: Calibri; font-size: small;">Run the PowerShell script.&nbsp; It returns a message that says that there are no locked blobs.</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0871.InterruptedBackup_Step3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0871.InterruptedBackup_5F00_Step3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0871.InterruptedBackup_Step3.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0871.InterruptedBackup_5F00_Step3.jpg" alt="" border="0" /></a></span></p>
<ul>
<li><span style="font-family: Calibri; font-size: small;">Now run another SQL Server backup but stop it before it can complete to simulate interrupted backup scenario.</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/3678.InterruptedBackup_Step4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/3678.InterruptedBackup_5F00_Step4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/3678.InterruptedBackup_Step4.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/3678.InterruptedBackup_5F00_Step4.jpg" alt="" border="0" /></a></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Check to see if the file was created on the storage account.</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0083.InterruptedBackup_Step5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0083.InterruptedBackup_5F00_Step5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0083.InterruptedBackup_Step5.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0083.InterruptedBackup_5F00_Step5.jpg" alt="" border="0" /></a></span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Try to overwrite the file &ndash; see error:</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0118.InterruptedBackup_Step6.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0118.InterruptedBackup_5F00_Step6.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0118.InterruptedBackup_Step6.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0118.InterruptedBackup_5F00_Step6.jpg" alt="" border="0" /></a></span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Try to delete &ndash; see error:</span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5025.InterruptedBackup_Step7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5025.InterruptedBackup_5F00_Step7.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/5025.InterruptedBackup_Step7.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/5025.InterruptedBackup_5F00_Step7.jpg" alt="" border="0" /></a></span></span></p>
<ul>
<li><span style="font-family: Calibri; font-size: small;">Run the PowerShell script again.&nbsp; This time you should see that locked blob is identified, and after checking that it is not a restore lease, the lease is broken.</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0724.InterruptedBackup_Step8.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0724.InterruptedBackup_5F00_Step8.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/83/23/0724.InterruptedBackup_Step8.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-23/0724.InterruptedBackup_5F00_Step8.jpg" alt="" border="0" /></a></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Try overwriting or deleting the file.&nbsp; It should work! </span></span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri;"><span style="font-size: small;">Here are some ways you can enhance this script to automate this process:</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Output the list of all blobs that are locked to a report (ex: excel file).</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Break the active leases and report out the list. </span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Break the active leases and report out the list, but remove the filter for restore lease.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Delete the blobs with active backup leases and report out the list.</span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Times New Roman;">NOTE: <em>If you are running PowerShell 2.0, you may have problems loading the Microsoft WindowsAzure.Storage.dll assembly. We recommend that you upgrade to Powershell 3.0 to solve the issue. You may also use the following workaround for PowerShell 2.0: </em></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Times New Roman;">Create or modify the powershell.exe.config file to load .NET 2.0 and .NET 4.0 assemblies at runtime with the following:</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&lt;?xml version="1.0"?&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&lt;configuration&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&nbsp;&lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&nbsp;&lt;supportedRuntime version="v4.0.30319"/&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&nbsp;&lt;supportedRuntime version="v2.0.50727"/&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&nbsp;&lt;/startup&gt; </span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: Courier New;">&lt;/configuration&gt; </span></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">For more information on best practices, see </span><a href="https://msdn.microsoft.com/en-us/library/jj919149.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">SQL Server Backup and Restore Best Practices (Windows Azure Blob Storage Service)</span></a></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>When will my SQL Server Evaluation Edition expire?</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/when-will-my-sql-server-evaluation-edition-expire</link>
      <pubDate>Sun, 17 Feb 2013 17:43:00 GMT</pubDate>
      <dc:creator><![CDATA[G Bowerman (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/02/17/when-will-my-sql-server-evaluation-edition-expire/</guid>
      <description><![CDATA[&nbsp;The SQL Server Evaluation Edition&nbsp;is a great way to&nbsp;get a fully functional and free...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;<span style="color: #000000; font-size: small;">The <a href="https://www.microsoft.com/en-us/download/details.aspx?id=29066">SQL Server Evaluation Edition</a>&nbsp;is a great way to&nbsp;get a fully functional and free instance of SQL Server for learning and developing solutions. The edition has a built in expiry of 6 months from the time that you install it. I often install an Eval edition on a machine to set up a test or demo, and then 6 months later it comes as a complete surprise when it suddenly stops working.</span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;">Needless to say this can be&nbsp;mildly inconvenient, as it typically expires on the day you plan to demo it. It would be nice to get some kind warning.&nbsp;</span>&nbsp;</p>
<p><span style="font-size: small;">This problem&nbsp;is exacerbated in the SQL Server&nbsp;virtual machine&nbsp;images in the Windows Azure gallery. While Azure VM's are in preview the SQL Server platform images are created with Evaluation edition, but the 6 month counter starts ticking&nbsp;when the VM is created rather than when you deploy it. This came to a head recently as a few months went by&nbsp;between platform image refreshes, so people deploying SQL VM images in Windows Azure were seeing them expire a few days later. See <a href="https://social.msdn.microsoft.com/Forums/en-US/WAVirtualMachinesforSQLServer/thread/bd89b9c5-7f3c-4bb6-96c7-439a4f94c008">this thread</a> for more details. Since then the SQL Server platform image has been refreshed so it won't be expiring for several months.</span></p>
<p><span style="font-size: small;"><br />The problem with Azure VM's will go away soon as fully licensed pay-per-hour images will be available soon, and free trial offers will be available.&nbsp;</span></p>
<p><span style="font-size: small;">What happens when your&nbsp;SQL instance does expire? What are the options? Particularly if you've developed a working solution and want to put it into production?</span></p>
<p><span style="font-size: small;">One option is to purchase a license and&nbsp;enter the license key in <span style="color: #0000ff;">SQL Server Installation Center-&gt;Maintenance-&gt;Upgrade License</span>.</span></p>
<p><span style="font-size: small;">If you're using an Azure VM another option would be to migrate your application to a new VM.</span></p>
<p><span style="font-size: small;">One thing we've learned from this is&nbsp;that as long as&nbsp;time-bombed images are being used we need to be better at communicating and setting expectations about their expiration. <br /><br /></span><span style="font-size: small;">If you're running an Evaluation edition now, how can you tell when it's due to expire? One way is to run this query...&nbsp;&nbsp;</span></p>
<p>&nbsp;&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-size: small;">sp_configure <span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;">'show advanced options'</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">,</span></span></span><span style="font-family: Consolas;"><span style="font-family: Consolas;"> 1</span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">;<br /></span></span></span><span style="color: #0000ff;">RECONFIGURE</span></span><br /><span style="color: #0000ff; font-size: small;">GO</span><br /><br /><span style="font-size: small;">sp_configure <span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;">'Agent XPs'</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">,</span></span></span><span style="font-family: Consolas;"><span style="font-family: Consolas;"> 1</span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">;<br /></span></span></span><span style="color: #0000ff;">RECONFIGURE</span></span><br /><span style="color: #0000ff; font-size: small;">GO</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><span style="color: #0000ff;">DECLARE</span>&nbsp;<span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@daysleft </span></span></span><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;">int<br /></span></span></span><span style="color: #0000ff;">DECLARE&nbsp;</span><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@instancename </span></span></span><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;">sysname<br /></span></span></span><span style="color: #0000ff;">SELECT</span>&nbsp;<span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@instancename </span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">= </span></span></span><span style="color: #ff00ff; font-family: Consolas;"><span style="color: #ff00ff; font-family: Consolas;"><span style="color: #ff00ff; font-family: Consolas;">CONVERT</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">(</span></span></span><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas;">sysname</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">, </span></span></span><span style="color: #ff00ff; font-family: Consolas;"><span style="color: #ff00ff; font-family: Consolas;"><span style="color: #ff00ff; font-family: Consolas;">SERVERPROPERTY</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">(</span></span></span><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;">'InstanceName'</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">))<br /></span></span></span><span style="color: #0000ff;">EXEC</span>&nbsp;<span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@daysleft </span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">= </span></span></span><span style="color: #800000; font-family: Consolas;"><span style="color: #800000; font-family: Consolas;"><span style="color: #800000; font-family: Consolas;">xp_qv </span></span></span><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;">'2715127595'</span></span></span><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;"><span style="color: #808080; font-family: Consolas;">, </span></span></span><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@instancename<br /></span></span></span><span style="color: #0000ff;">SELECT</span>&nbsp;<span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;"><span style="color: #008080; font-family: Consolas;">@daysleft </span></span></span><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;"><span style="color: #ff0000; font-family: Consolas;">'Number of days left'</span></span></span></span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff; font-size: small;">GO</span></p>
<p><span style="font-size: small;"><br />That will give you an&nbsp;answer in days until expiry. As of today,&nbsp;the SQL Server gallery image I&nbsp;launched a few days ago has 122 days left, which gives me a few months to&nbsp;do my&nbsp;demos and then forget that it's going to expire. Hopefully by that time I'll have either upgraded it&nbsp;or started with a refreshed or pay per hour image.</span></p>
<p><span style="font-size: small;">- Guy</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Backup and Restore to Cloud Simplified in SQL Server 2012 SP1 CU2</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/backup-and-restore-to-cloud-simplified-in-sql-server-2012-sp1-cu2</link>
      <pubDate>Thu, 24 Jan 2013 11:47:00 GMT</pubDate>
      <dc:creator><![CDATA[G Bowerman (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2013/01/24/backup-and-restore-to-cloud-simplified-in-sql-server-2012-sp1-cu2/</guid>
      <description><![CDATA[SQL Server 2012 SP1 Cumulative Update 2 includes new functionality that simplifies the backup...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<div>
<p>SQL Server 2012 SP1 Cumulative Update 2 includes new functionality that simplifies the backup and restore capability of an on-premises SQL Server database to Windows Azure.&nbsp;&nbsp; You can now directly create a backup to Windows Azure Storage using SQL Server Native Backup functionality. Read the information below to get a brief introduction to the new functionality and follow the links for more in-depth information.</p>
</div>
<p>To download the update, go to the <a href="https://go.microsoft.com/fwlink/?LinkId=271608">SQL Release Services Blog</a>&nbsp;or to <span style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><a href="https://support.microsoft.com/kb/2792921">Download SQL Server 2012 SP1 CU2</a>.</span></p>
<h1>Overview:</h1>
<p>In addition to disk and tape you can now use SQL Server native backup functionality to back up your SQL Server Database to the Windows Azure Blob storage service.&nbsp; In this release, backup to Windows Azure Blob storage is supported using T-SQL and<br />SMO.&nbsp; SQL Server Databases on an on premises instance of SQL Server or in a hosted environment such as an instance of SQL Server running in Windows Azure VMs can take advantage of this<br />functionality.</p>
<h1>Benefits:</h1>
<ul>
<li>Flexible, reliable, and limitless off-site storage for improved disaster recovery: Storing your backups on Windows Azure Blob service can be a convenient, flexible and easy to access off-site option. Creating off-site storage for your SQL Server backups can be as easy as modifying your existing scripts/jobs. Off-site storage should typically be far enough from the production database location to prevent a single disaster that might impact both the off-site and production database locations. You can also restore the backup to a SQL Server Instance running in a Windows Azure<br />Virtual Machine for disaster recovery of your on-premises database.&nbsp; By choosing to geo-replicate the Blob storage you have an extra layer of protection in the event of a disaster that could affect the whole region. In addition, backups are available from anywhere and at any time and can easily be accessed for restores.</li>
<li>Backup Archive: The Windows Azure Blob Storage service offers a better alternative to the often used tape option to archive backups. Tape storage might require physical transportation to an off-site facility and measures to protect the media. Storing your backups in Windows Azure Blob Storage provides an instant, highly available and durable archiving option.</li>
<li>No overhead of hardware management: There is no overhead of hardware management with Windows Azure storage service. Windows Azure services manage the hardware and provides geo-replication for redundancy and protection against hardware failures.</li>
<li>Currently for instances of SQL Server running in a Windows Azure Virtual Machine, backing up to Windows Azure Blob storage services can be done by creating attached disks. However, there is a limit to the number of disks you can attach to a Windows Azure Virtual Machine. This limit is 16 disks for an extra-large instance and fewer for smaller instances. By enabling a direct backup to Windows Azure Blob Storage, you can bypass the 16 disk limit.</li>
<li>In addition, the backup file which now is stored in the Windows Azure Blob storage service is directly available to either an on-premises SQL Server or another SQL Server running in a Windows Azure Virtual Machine, without the need for database attach/detach or downloading and attaching the VHD.</li>
<li>Cost Benefits: Pay only for the service that is used. Can be cost-effective as an off-site and backup archive option.</li>
</ul>
<p class="DdueNormal">The <a href="https://go.microsoft.com/fwlink/?LinkId=277060">Windows Azure pricing calculator</a> can help estimate your costs.</p>
<p class="DdueNormal">Storage: Charges are based on the space used and are calculated on a graduated scale and the level of redundancy. For more details, and up-to-date information, see the <a href="https://www.windowsazure.com/en-us/pricing/details/#header-4">Data Management</a> section of the <a href="https://go.microsoft.com/fwlink/?LinkId=277059">Pricing Details</a> article.</p>
<p class="DdueNormal">Data Transfers: Inbound data transfers to Windows Azure are free. Outbound transfers are charged for the bandwidth use and calculated based on a graduated region-specific scale. For more details, see the <a href="https://go.microsoft.com/fwlink/?LinkId=277061">Data Transfers</a> section of the Pricing Details article.</p>
<h1>How it works:</h1>
<p>Backup to Windows Azure Storage is engineered to behave much like a backup device (Disk/Tape).&nbsp; Using the Microsoft Virtual Backup Device Interface (VDI), Windows Azure Blob storage is coded like a &ldquo;virtual backup device&rdquo;, and the URL format used to access the Blob storage is treated as a device.&nbsp; The main reason for supporting Azure storage as a destination device is to provide a consistent and seamless backup and restore experience, similar to what we have today with disk and tape. When the Backup or restore process is invoked, and the Windows Azure Blob storage is specified using the URL &ldquo;device type&rdquo;, the engine invokes a VDI client process that is part of this feature.&nbsp; The backup data is sent to the VDI client process, which sends the backup data to Windows Azure Blob storage.</p>
<p>As previously mentioned, the URL is much like a backup device used today, but it is not a physical device, so there are some limitations.&nbsp; For a full list of the supported options, see <a href="https://go.microsoft.com/fwlink/?LinkID=271617">SQL Server Backup and Restore with Windows Azure Blob Storage Service</a>.</p>
<h1>How to use it</h1>
<p>To write a backup to Windows Azure Blob storage you must first create a Windows Azure Storage account, create a SQL Server Credential to store storage account authentication information. By using Transact-SQL or SMO you can issue backup and restore commands.</p>
<p>The following Transact-SQL examples illustrate creating a credential, doing a full database backup and restoring the database from the full database backup. For a complete walkthrough of creating a storage account and performing a simple restore, see <a href="https://go.microsoft.com/fwlink/?LinkID=271615">Tutorial: Getting Started with SQL Server Backup and Restore to Windows Azure Blob Storage Service</a>.</p>
<p>&nbsp;</p>
<p class="DdueTitle"><strong>Create a Credential</strong></p>
<p class="DdueNormal">The following example creates a credential that stores the Windows Azure Storage authentication information.</p>
<p class="DdueNormal">&nbsp;</p>
<p class="Code" style="padding-left: 30px;">IF NOT EXISTS</p>
<p class="Code" style="padding-left: 30px;">(SELECT * FROM sys.credentials WHERE credential_identity = 'mycredential')</p>
<p class="Code" style="padding-left: 30px;">CREATE CREDENTIAL mycredential<br />WITH IDENTITY = 'mystorageaccount'</p>
<p class="Code" style="padding-left: 30px;">,SECRET = '&lt;storage access key&gt;' ;</p>
<p class="Code">&nbsp;</p>
<p class="DdueTitle"><strong>Backing up a complete database</strong></p>
<p class="DdueNormal">The following example backs up the AdventureWorks2012 database to the Windows Azure Blob storage service.</p>
<p class="DdueNormal">&nbsp;</p>
<p class="Code" style="padding-left: 30px;">BACKUP DATABASE AdventureWorks2012</p>
<p class="Code" style="padding-left: 30px;">TO URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012.bak'</p>
<p class="Code" style="padding-left: 30px;">WITH CREDENTIAL = 'mycredential'</p>
<p class="Code" style="padding-left: 30px;">,STATS = 5;</p>
<p class="Code">&nbsp;</p>
<p class="DdueNormal">&nbsp;</p>
<p class="DdueTitle"><strong>Restoring a database</strong></p>
<p class="DdueNormal">To restore a full database backup, use the following steps.</p>
<p class="DdueNormal">&nbsp;</p>
<p class="Code" style="padding-left: 30px;">RESTORE DATABASE AdventureWorks2012 FROM URL =<br />'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012.bak'</p>
<p class="Code" style="padding-left: 30px;">WITH CREDENTIAL = 'mycredential',&nbsp; STATS = 5</p>
<p class="Code">-&nbsp;- Note that&nbsp;options like STATS, COMPRESS, FORMAT&nbsp;etc.. can be used or omitted as for any T-SQL BACKUP command.</p>
<p>&nbsp;</p>
<h1>Resources:</h1>
</div>
<p><a href="https://go.microsoft.com/fwlink/?LinkID=271617">Concepts/Script Examples</a></p>
<p><a href="https://go.microsoft.com/fwlink/?LinkID=272394">Best Practices /Troubleshooting</a></p>
<p><a href="https://go.microsoft.com/fwlink/?LinkID=271615">Getting Started Tutorial</a></p>
<p>Please send your feedback on the feature and or<br />documentation to karaman @ Microsoft.com&nbsp;or&nbsp;guybo @ microsoft.com.</p>
<p>&nbsp;</p>
<div><hr align="left" size="1" width="33%" />
<div>
<div>
<p><span style="font-size: small;"><strong>- Karthika Raman</strong></span></p>
</div>
</div>
<div>
<div>
<p>&nbsp;</p>
</div>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>SQLOS and Cloud Infrastructure sessions at PASS Summit 2012</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlosteam/sqlos-and-cloud-infrastructure-sessions-at-pass-summit-2012</link>
      <pubDate>Wed, 07 Nov 2012 17:47:00 GMT</pubDate>
      <dc:creator><![CDATA[G Bowerman (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlosteam/2012/11/07/sqlos-and-cloud-infrastructure-sessions-at-pass-summit-2012/</guid>
      <description><![CDATA[The SQL Pass Summit 2012, the&nbsp;largest yet,&nbsp;is in full swing. Here's a summary of the...]]></description>
      <content:encoded><![CDATA[<p>The SQL Pass Summit 2012, the&nbsp;largest yet,&nbsp;is in full swing. Here's a summary of the sessions this week on cloud infrastructure and SQLOS topics. Some of these were today, and you can catch the recordings. One more session takes place on Friday covering SQL Server solution patterns in Windows Azure VMs...</p>
<p>Also, catch&nbsp;Thursday's keynote with Quentin Clark which will feature a cool IaaS demo!</p>
<p>&nbsp;</p>
<p><strong><span style="color: #000080; font-size: small;">SQL Server in Windows Azure VM Sessions</span></strong></p>
<p><strong>CLD-309-A SQLCAT: Best Practices and Lessons Learned on SQL Server in an Azure VM</strong></p>
<p>Steve Howard, Arvind Ranasaria - Wednesday 11/6 10:15</p>
<p>This session looked at some best practices to optimize Networking, Memory, Disk IO and high availability based on lessons learned during SQLCat work with customer deployments. Well worth catching the recording.</p>
<p>&nbsp;</p>
<p><strong>SQL Server in Azure VM patterns: Hybrid Disaster Recovery, data movement and BI</strong></p>
<p>Guy Bowerman, Peter Saddow, Michael Washam, Ross LoForte - <span style="color: #ff0000;"><strong>Friday 11/9 9:45 Rm 613</strong></span></p>
<p>[Note: In the guides this has an outdated title.]</p>
<p>This session has a focus on SQL Server Azure VM solutions. Starting with the basics and then going deeper into:</p>
<p>- New features in the Microsoft Assessment and Planning Toolkit 8.0 to help plan and size SQL VM migrations.<br />- A Look at a Windows Azure&nbsp;VM SQL Server&nbsp;app making use of load balancing and SQL Server high availability features.<br />- A BI case study running SQL BI components in Azure VMs and making use of Windows 8 tiles.<br />- A training class in a VM case study.</p>
<p>&nbsp;</p>
<p><span style="color: #000080; font-size: small;"><strong>SQLOS Sessions</strong></span></p>
<p><strong>DBA-500-HD Inside SQLOS 2012 (half-day session)</strong></p>
<p>Bob Ward - Wednesday 11/6 1:30pm</p>
<p>Bob Ward from CSS applies his wealth of experience to look at the internals of SQLOS and what's changed in the various SQL 2012 components, including memory, resource governor, scheduler.</p>
<p>&nbsp;</p>
<p><strong>DBA-403-M: SQLCAT: Memory Manager Changes in SQL Server 2012</strong></p>
<p>Gus Apostol, Jerome Halmans - 1:30pm</p>
<p>Covers the redesigned SQLOS memory manager in SQL Server 2012 including the new page allocator for any size pages (and all that implies), DMVs, demo's. Not sure why this was placed at the same time as the SQLOS half-day session, but since it's recorded it's available for catch-up.</p>
<p>&nbsp;</p>
<p>- Guy</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>