<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Fort SQL</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/fort_sql/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/fort_sql/feed.xml</link>
    <description>Information about SQL Server security.</description>
    <lastBuildDate>Fri, 17 Apr 2015 17:17:16 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SQL Server Transparent Database Encryption (TDE)</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/sql-server-transparent-database-encryption-tde</link>
      <pubDate>Tue, 01 Oct 2013 07:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2013/10/01/sql-server-transparent-database-encryption-tde/</guid>
      <description><![CDATA[Overview of TDE with some details on major administrative issues.
Many people who've played around...]]></description>
      <content:encoded><![CDATA[<h4>Overview of TDE with some details on major administrative issues.</h4>
<p>Many people who've played around with TDE seem to have had trouble with restoring a TDE database on an alternate server, and the confusion seems to stem primarily from the deep encryption heirarchy for TDE. It's not too hard, however, once you realize that you can ignore most of the stack. The lynchpin is the certificate that is just above the TDE database in the heirarchy. If you use the certificate backup option to export the certificate's private key and protect it by password, then you can restore the certificate to any instance of SQL Server of the same version or later. Once the certificate has been restored, you should also be able to restore the TDE database that was protected by that certificate.</p>
<p>I've attached a .zip with a detailed document and a T-SQL script to help you experiment with TDE. Here are the topics in the document:</p>
<ul>
<li>What is Transparent Database Encryption (TDE)?</li>
<li>Limitations of TDE</li>
<li>Costs of TDE</li>
<li>Alternatives to TDE</li>
<li>When to use TDE</li>
<li>How to enable TDE</li>
<li>How to backup a TDE database</li>
<li>How to restore a TDE database to the same server</li>
<li>How to restore a TDE database to an alternate server</li>
<li>TDE/Encryption-Related System Tables</li>
<li>TDE's Encryption Hierarchy</li>
</ul>
<p>Before you invest a lot of time with TDE, consider my standard lecture #8: Since there are many good alternatives to using TDE and since there are costs imposed by using TDE, it shouldn't be used unless there are specific reasons for which the alternatives are inadequate and the costs are justifiable. In practice, this means that TDE should rarely be implemented.</p>
<p>See Also:<br /><a href="http://blogs.technet.com/b/fort_sql/archive/2012/02/23/does-the-dod-stig-require-transparent-database-encryption-tde.aspx">http://blogs.technet.com/b/fort_sql/archive/2012/02/23/does-the-dod-stig-require-transparent-database-encryption-tde.aspx</a><br />&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/7622/00/00/03/51/43/04/TDE%20overview%20and%20example%20script.zip" original-url="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-7622-00-00-03-51-43-04/TDE-overview-and-example-script.zip">TDE overview and example script.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server 2012 Virtual Labs</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/sql-server-2012-virtual-labs</link>
      <pubDate>Tue, 23 Oct 2012 06:57:44 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/10/23/sql-server-2012-virtual-labs/</guid>
      <description><![CDATA[Want to try SQL Server 2012 without even installing it? Easy... use SQL Server 2012 Virtual Labs at...]]></description>
      <content:encoded><![CDATA[<p>Want to try SQL Server 2012 without even installing it? Easy... use SQL Server 2012 Virtual Labs at <a href="http://technet.microsoft.com/en-us/video/Hh913731">http://technet.microsoft.com/en-us/video/Hh913731</a>!</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Hiding SQL Server from External Crackers</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/hiding-sql-server-from-external-crackers</link>
      <pubDate>Mon, 15 Oct 2012 07:24:33 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/10/15/hiding-sql-server-from-external-crackers/</guid>
      <description><![CDATA[We&nbsp;harden SQL Server to minimize the threats to SQL Server from rouges/hackers and crackers,...]]></description>
      <content:encoded><![CDATA[<p>We&nbsp;harden SQL Server to minimize the threats to SQL Server from rouges/hackers and crackers, but it may be&nbsp;equally important to harden systems other than SQL Server to protect our data. For example, coders and DBA's need to ensure that calls to SQL Server are protected from SQL Injection attacks. Another valuable tactic is to prevent bad guys from finding the servers with SQL Server on them, and we can help guard against that by disabling NetBIOS and Small Message Blocks (SMB) on Internet-connected servers that don't need them.</p>
<p>The Database STIG makes clear that any unnecessary network protocols should be disabled on the server hosting an instance of SQL Sever, but what I'm pointing out in this post is that network protocols on other servers may also need to be secured to provide maximum security for SQL Server.</p>
<p>If you have a web server or DNS server exposed to the Internet, as is very common, they normally don't need NetBIOS or SMB. If they're enabled and a cracker compromises one of them, they may be able to use them to find instances of SQL Server. The MSDN article "Security Considerations for a SQL Server Installation" (<a href="http://msdn.microsoft.com/en-us/library/ms144228(v=sql.105).aspx">http://msdn.microsoft.com/en-us/library/ms144228(v=sql.105).aspx</a>) covers this issue, among others.</p>
<p>If you want to harden your web servers and DNS servers, here are links to articles descibing how to disable NetBIOS and SMB. Note that in Device Manager, you may have an entry of "NETBT" instead of "NetBios over TCP/IP" (both represent netbt.sys).</p>
<p>How to Disable NetBIOS<br />(Netbt.sys)<br /><a href="http://msdn.microsoft.com/en-us/library/ms143696(v=SQL.90).aspx">http://msdn.microsoft.com/en-us/library/ms143696(v=SQL.90).aspx</a></p>
<p>How to Disable SMB<br /><a href="http://msdn.microsoft.com/en-US/library/ms143455(v=sql.90).aspx">http://msdn.microsoft.com/en-US/library/ms143455(v=sql.90).aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Managed Service Accounts</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/managed-service-accounts</link>
      <pubDate>Tue, 04 Sep 2012 09:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/09/04/managed-service-accounts/</guid>
      <description><![CDATA[Doh! Never mind the post below. If I had read more thoroughly (or if I had tested using MSAs with...]]></description>
      <content:encoded><![CDATA[<p><strong>Doh! Never mind the post below. If I had read more thoroughly (or if I had tested using MSAs with SQL Server) before posting, I would have realized MSAs are NOT supported with SQL Server. </strong>At least, not according to the article in the first link below. Sorry to mislead you, and hopefully this will be able to work with SQL Server sooner or later.</p>
<p>====================================================================================</p>
<p>I've recently learned there's such as a thing as Managed Service Accounts (MSAs) in Active Directory if your domain controller is using Window Server 2008 R2 or Windows 7, and these accounts can significantly improve security. Why didn't I hear about this before? Probably because I'm a SQL Server specialist, not a Windows or Active Directory specialist. At any rate, I thought I'd pass this along in case I'm not the last person on the planet to get clued in.</p>
<p>For an MSA, Active Directory will assign a 120-random-character password, change the password every 30 days, and manage the Service Principal Names (SPNs). The account can't be locked out, and system administrators don't have to maintain it.</p>
<p>Security is improved because the passwords don't have to be maintained by humans and because an MSA can only be used by a service on one computer. It does take a little extra work in the beginning, though, as seen in this 4-step process:</p>
<ol>
<li>Create an MSA in Active Directory.</li>
<li>Associate the MSA with a single computer.</li>
<li>Install the MSA on its computer.</li>
<li>Configure the service (e.g. SQL Server) to use the MSA.</li>
</ol>
<p>This isn't in the Database STIG yet, but I expect it will show up there as a security best practice sooner or later.</p>
<p>For more information on MSAs, start here <a href="http://technet.microsoft.com/en-us/library/ff641729(v=ws.10)">http://technet.microsoft.com/en-us/library/ff641729(v=ws.10)</a>&nbsp;or here&nbsp;<a href="http://technet.microsoft.com/en-us/library/dd548356(v=WS.10).aspx">http://technet.microsoft.com/en-us/library/dd548356(v=WS.10).aspx</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Alert On Low Disk Space, Including Mount Points</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/alert-on-low-disk-space-including-mount-points</link>
      <pubDate>Wed, 01 Aug 2012 05:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/08/01/alert-on-low-disk-space-including-mount-points/</guid>
      <description><![CDATA[A common task for many database administrators (DBAs) is to set up alert emails to notify themselves...]]></description>
      <content:encoded><![CDATA[<p>A common task for many database administrators (DBAs) is to set up alert emails to notify themselves when free disk space falls below a certain threshold (e.g. 10%). Before SQL Server ran on Windows clusters that included mount-points, there were a number of methods for checking free disk space, but most didn't report on the free space in mount point based disks. The easiest way to check free space on mount points is via Windows Management Instrumentation (WMI), and the easiest way to use WMI and create an alert is with PowerShell.</p>
<p>Attached to this article is a WMI-PowerShell script that checks disk free space, including mount points. It's written to be used in a SQL Server Agent job, and send an email alert via SQL Server's Database Mail. You can run it against any number of servers from one script, and you'll need to replace several items in the script: Server name(s), the Database Mail profile name, the recipient email address(es), and optionally&nbsp;change the warning threshold. It works like any other Agent job except you choose a job step Type of "PowerShell". Detailed notes on how to tweak and use the script are included as in-line notes in the script file.</p>
<p>If you're not familiar with PowerShell and you'd like to view the code in color-coded formating, use the PowerShell ISE (Start menu/Accessories/Windows PowerShell/Windows PowerShell ISE). (ISE stands for Integrated Scripting Environment.)</p>
<p>Here's a security-related wrinkle to WMI calls via PowerShell that's run by SQL Server Agent... If the service account that SQL Server Agent runs under has local admin permissions/privileges and you only run the script against the local server, you probably won't have any access-denied problems. Under any other scenarios, such as the Agent having limited local permissions or you target the script against remote servers and the Agent service account doesn't have admin permissions on those servers, you'll have to grant a WMI "Remote Execute" persmission to the Agent account on each server. To assign Remote Execute, run <strong>wmimgmt.msc</strong> from the Start menu's Run box or from a command prompt, then&nbsp;right-click on Properties, then select the Security tab, then expand the Root node, then select&nbsp;the CIMV2 node, then click the Security button, then add the Agent account and scroll down to find and check the box for the "Remote Enable" permission. Simple, right? You were probably going to guess that anyway. ;)</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/7622/00/00/03/51/04/34/Check%20disk%20free%20space%20including%20mount%20points.ps1" original-url="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-7622-00-00-03-51-04-34/Check-disk-free-space-including-mount-points.ps1">Check disk free space including mount points.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Enabling SSL on SQL Server Connections on Failover Clusters</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/enabling-ssl-on-sql-server-connections-on-failover-clusters</link>
      <pubDate>Thu, 05 Jul 2012 09:18:49 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/07/05/enabling-ssl-on-sql-server-connections-on-failover-clusters/</guid>
      <description><![CDATA[With high-security SQL Server configurations we usually want to encyrpt the data-in-transit between...]]></description>
      <content:encoded><![CDATA[<p>With high-security SQL Server configurations we usually want to encyrpt the data-in-transit between SQL Server and the application servers. It's a little more trouble with a Failover Cluster Instance (FCI) than a stand-alone instance, and this post is primarily just a link to help me make sure I can easily find this article: <a href="http://msdn.microsoft.com/en-us/library/ms191192.aspx">http://msdn.microsoft.com/en-us/library/ms191192.aspx</a>.</p>
<p>I'll point out a critical factor in the article is that <strong>you must be logged into the server with the SQL Server service account</strong> when you open the SQL Server Configuration Manager to select the certificate, if the SQL Server service account is a domain account (and it should be if you're complying with the DoD Database STIG).</p>
<p>Also, a community comment contains another critical element, that <strong>you have to edit the registry on each node</strong>. See the note for more info and links to the details.</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server Ports</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/sql-server-ports</link>
      <pubDate>Tue, 03 Jul 2012 06:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/07/03/sql-server-ports/</guid>
      <description><![CDATA[&nbsp;Quick cheat sheet for port numbers used by SQL Server services or services that SQL...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;Quick cheat sheet for port numbers used by SQL Server services or services that SQL Server&nbsp;may depend on:</p>
<table style="border: black 2px solid;" border="1" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>21</td>
<td>TCP</td>
<td>FTP (replication)</td>
</tr>
<tr>
<td>80</td>
<td>TCP</td>
<td>HTTP endpoints, Reporting Services, HTTP replication</td>
</tr>
<tr>
<td>135</td>
<td>TCP &amp; UDP</td>
<td>RPC, WMI, MSDTC, SQL Agent file copy,&nbsp;and TSQL Debugger (RPC used for multiple purposes including SSIS and clustering.)</td>
</tr>
<tr>
<td>137</td>
<td>UDP</td>
<td>File &amp; Print Sharing (replication) and Cluster Admin</td>
</tr>
<tr>
<td>138</td>
<td>UDP</td>
<td>File &amp; Print Sharing (replication)</td>
</tr>
<tr>
<td>139</td>
<td>TCP</td>
<td>FileStream and NetBIOS Session Service (clustering)</td>
</tr>
<tr>
<td>443</td>
<td>TCP</td>
<td>HTTPS endpoints and Reporting Services</td>
</tr>
<tr>
<td>445</td>
<td>TCP &amp; UDP</td>
<td>FileStream, SMB (clustering), and File &amp; Print Sharing</td>
</tr>
<tr>
<td>500</td>
<td>UDP</td>
<td>IPSec</td>
</tr>
<tr>
<td>860</td>
<td>TCP</td>
<td>iSCSI</td>
</tr>
<tr>
<td>1024-5000</td>
<td>TCP</td>
<td>Original dynamic ports for named instances. (WinSock standard.)(See ports 49152-65535.) The DoD Database STIG requires static ports.</td>
</tr>
<tr>
<td>1433</td>
<td>TCP</td>
<td>SQL Server database engine</td>
</tr>
<tr>
<td>1434</td>
<td>TCP &amp; UDP</td>
<td>SQL Server database engine, DAC,&nbsp;and SQL Server's "Browse" button.</td>
</tr>
<tr>
<td>2382</td>
<td>UDP</td>
<td>Analysis Serviceswhen using dynamic ports with named instances</td>
</tr>
<tr>
<td>2383</td>
<td>TCP</td>
<td>Analysis Services</td>
</tr>
<tr>
<td>2393-2394</td>
<td>TCP</td>
<td>Analysis Services version 7</td>
</tr>
<tr>
<td>2725</td>
<td>TCP</td>
<td>Analysis Services</td>
</tr>
<tr>
<td>3260</td>
<td>TCP</td>
<td>iSCSI</td>
</tr>
<tr>
<td>3343</td>
<td>UDP</td>
<td>Cluster network driver</td>
</tr>
<tr>
<td>3389</td>
<td>TCP</td>
<td>Remote Desktop Protocol (RDP)</td>
</tr>
<tr>
<td>3882</td>
<td>TCP</td>
<td>DTS/SSIS</td>
</tr>
<tr>
<td>4022</td>
<td>TCP</td>
<td>Conventional port for the SQL Broker service</td>
</tr>
<tr>
<td>4500</td>
<td>UDP</td>
<td>IPSec</td>
</tr>
<tr>
<td>5000-5099</td>
<td>UDP</td>
<td>Clustering</td>
</tr>
<tr>
<td>5022</td>
<td>TCP</td>
<td>AlwaysOn's default port for primary and secondary replicas</td>
</tr>
<tr>
<td>7022</td>
<td>TCP</td>
<td>Conventional port for Database Mirroring</td>
</tr>
<tr>
<td>8011-8031</td>
<td>UDP</td>
<td>Clustering internode RPC</td>
</tr>
<tr>
<td>49152-65535</td>
<td>TCP</td>
<td>Latest dynamic ports for named instances. (WinSock standard.)(See ports 1024-5000.) The DoD Database STIG requires static ports.</td>
</tr>
</tbody>
</table>
<p>Microsoft recommends non-default ports for maximum security.</p>
<p>Check ports in use: SELECT ServerProperty("ProcessID")<br />At a command prompt: "netstat -ano"</p>
<p><b>AlwaysOn Ports</b></p>
<ul>
<li>Each instance w an Availability Group (AG) must have a database mirroring endpoint, and they endpoints bust be started (query sys.database_mirroring_endpoints and sys.tcp_endpoints).</li>
<li>Logins from a remote server must have CONNECT permission. Each instance must have access to ports on all partners.</li>
</ul>
<p>Resources: <a href="http://msdn.microsoft.com/en-us/library/cc646023.aspx">Windows Firewall &amp; SQL Server</a>, <a href="http://www.sqlservercentral.com/articles/networking/75481/">Ports that DBAs Need to Know</a>, and <a href="http://support.microsoft.com/kb/968872">KB968872</a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Capture Custom Events in Profiler for Troubleshooting</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/capture-custom-events-in-profiler-for-troubleshooting</link>
      <pubDate>Thu, 21 Jun 2012 10:05:35 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/06/21/capture-custom-events-in-profiler-for-troubleshooting/</guid>
      <description><![CDATA[User configurable events have been available in SQL Server since at least version 2000, but aren't...]]></description>
      <content:encoded><![CDATA[<p>User configurable events have been available in SQL Server since at least version 2000, but aren't often used, I suspect just because DBA's aren't familiar with them. Here's a screen shot of the Events Selection page of the Trace Properties for a SQL Server Profiler trace:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/22/3603.Profiler_UserConfigurable.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-22/3603.Profiler_5F00_UserConfigurable.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/22/3603.Profiler_UserConfigurable.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-22/3603.Profiler_5F00_UserConfigurable.png" /></a></p>
<p>Despite having all of the user configurable events selected, nothing will show up in the trace if you don't create custom events to feed the trace. The easiest way is to use sp_trace_generateevent in your T-SQL code, such as inside a trigger. Here's an example from inside a trigger:</p>
<p>EXEC sp_trace_generateevent 82, N'Trigger fired.'</p>
<p>You can use 82-91 as the first argument, which corresponds to UserConfigurable events 0-9, and then a unicode message (just put an N right before your single-quote delimited message).</p>
<p>When you use custom events like this, you'll often want to capture only the UserConfigurable events, thereby cutting out all the events you don't care about.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/22/4428.Profiler_UserConfigurable2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-22/4428.Profiler_5F00_UserConfigurable2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/22/4428.Profiler_UserConfigurable2.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-22/4428.Profiler_5F00_UserConfigurable2.png" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Note to self on AlwaysOn...</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/note-to-self-on-alwayson</link>
      <pubDate>Wed, 09 May 2012 07:57:00 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/05/09/note-to-self-on-alwayson/</guid>
      <description><![CDATA[I came up with the idea that perhaps we could let clients connect to a database in an AlwaysOn...]]></description>
      <content:encoded><![CDATA[<p>I came up with the idea that perhaps we could let clients connect to a database in an AlwaysOn Availability Group (AG) by the current instance name instead of the virtual network name (VNN)&nbsp;if the cluster service crashed.&nbsp;This idea&nbsp;does <b>not</b> work.</p>
<div>Microsoft Consultant Don Scott&nbsp;set up&nbsp;a very simple 2-node cluster with a stand-alone instance of SQL Server 2012 on each node and 1 availability group with 1 database in it, and we could connect to the database by it's&nbsp;VNN&nbsp;or by connecting to the current instance name, as expected. However, when we turned off the cluster service on both nodes to simulate a cluster service failure, we could no longer connect to the database by it's virtual name, as expected, but we could also not connect to the database through the current instance name. In SQL Server Management Studio (SSMS), the database icon listed "Recovery pending" after the name of the database, even though this was the primary replica. The secondary replica didn't even show up in SSMS with the cluster service off.</div>
<div>&nbsp;</div>
<div>Even though the "recovery pending" status didn't make sense to us, we tried "RESTORE DATABASE &lt;dbname&gt; WITH RECOVERY" and got a very strange error message: "Msg 3148, Level 16, State 3; This restore statement is invalid in the current context. The 'Recover Data Only' option is only defined for secondary filegroups when the database is in an online state. When the database is in an offline state filegroups cannot be specified." This is strange because this database only had the default primary filegroup and it was online. We checked SSMS to confirm the database was online, and the "Bring Online" option was not available in SSMS, but the "Take Offline" option was available, confirming the database was still online despite the error message.</div>
<div>&nbsp;</div>
<div>Moral of the story: When using AlwaysOn, keep at least half your cluster nodes/witness healthy, because if the cluster goes down completely, AlwaysOn goes down.</div>
<div>&nbsp;</div>
<div><strong>Other notes:</strong>
<ul>
<li>With this test configuration (2-node cluster, each with Non-FCI, 1 availability group, all functioning correctly): When we evicted the primay replica node from the cluster and restarted the node, we expected the availability group to be disabled, but instead it completely ceased to exist (no trace of it remained to&nbsp;be displayed&nbsp;in SSMS). The database was&nbsp;then a&nbsp;normal database without an availability group.</li>
<li>When creating or altering an Availability Group, SQL Server interacts with the Windows cluster service to automatically create the Virtual Network Name for the AG in the cluster service.</li>
</ul>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Installing SQL Server in a High-Security Domain, Part II</title>
      <link>https://docs.microsoft.com/archive/blogs/fort_sql/installing-sql-server-in-a-high-security-domain-part-ii</link>
      <pubDate>Wed, 04 Apr 2012 12:13:29 GMT</pubDate>
      <dc:creator><![CDATA[Quantum John]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fort_sql/2012/04/04/installing-sql-server-in-a-high-security-domain-part-ii/</guid>
      <description><![CDATA[In this article, I pointed out some of the most common permissions failures when installing SQL...]]></description>
      <content:encoded><![CDATA[<p>In <a href="http://blogs.technet.com/b/fort_sql/archive/2009/12/17/installing-reporting-services-2008.aspx">this article</a>, I pointed out some of the most common permissions failures when installing SQL Server in an environment where security has been hardened, such as the removal of the Debug Programs permission. In my experience, "hardened" usually means some default permissions have been removed from various accounts.</p>
<p>Recently some colleagues had failures while attempting to install SQL Server 2008 R2 on a VMware virtual Windows cluster, even though they had ensured their installation account&nbsp;had the 3 privileges I covered in the previous article. One of the difficulties with these types of failures is that you don't get an error saying something clear like "Sorry, you don't have the Debug Privileges permission," so it can be a little troublesome to figure out exactly which permissions&nbsp;are missing, if any. In this case, my colleagues were able to successfully install SQL Server after adding the "Act as part of the operating system" and "Logon as a service" permissions to the installation account. I'm going to repeat myself to emphasize they added these permissions to the<strong> installation account</strong> (the account they were logged in as while running the installer). That difference&nbsp;allowed their install to succeed, but if you use this remedy, remember to remove those permissions from the installation account after you finish the install.</p>
<p>Did they need both of those are just one of them? We don't know, they didn't uninstall and reinstall with just one of them to narrow it down. If you gain any insight on what security settings cause this problem, and whether or not only one of these permissions is needed to succeed, please let me know.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>