This article assumes you already have a basic understanding of SQL Server Audit, but if not, use this link to catch up on all the details. Are you required to have xp_cmdshell enabled on one of your servers? If so, then setup a SQL Audit now to track its use. Never mind the implications of enabling xp_cmdshell, as a DBA you are responsible for what happens on your servers and tracking the use of xp_cmdshell should be a priority. The first step is to create a server audit to hold the events that we collect. You’ll notice that we added a...
Continue reading...Patrick Keisler
SQL Server Morning Health Checks
Every now and again as a Microsoft PFE, you get a chance to make a big difference for a customer. One such occasion happened just recently when I was asked to help find a way to automate the daily checks the DBA had to perform every morning. The result was a PowerShell script that reduced that manual task down from an hour to less than a minute. You can read the full article here on MSDN. https://blogs.msdn.microsoft.com/samlester/2017/12/29/sql-server-dba-morning-health-checks/ The PowerShell script can be downloaded from here. https://github.com/PatrickKeisler/SQLMorningHealthChecks
Continue reading...Create a Whitelist for SQL Server – UPDATED!!!
A while back, I posted an article about creating a WhiteList for access to SQL Server. Since then I have received a bit of feedback that it was not working as designed. My apologies for taking so long, but I believe I have come up with a fix. The main issue is the trigger will block some or even all access to the server after it’s created. As it turns out, the issues were really permission being denied. To see it in action, let’s create everything using the original code from here. We’ll add 1 row to the WhiteList table...
Continue reading...Dear McAfee, Why are you destroying my buffer pool?
For the past few months, one my customers had been trying to diagnose an issue with SQL Server paging out the entire buffer pool each morning around 8AM. See the error below. Not only was this causing some serious performance issues, but it was also affecting every SQL Server in the environment. I began my investigation with the standard troubleshooting techniques for buffer pool paging. One of the main workarounds that’s recommended is to enable the “locked pages in memory” permission for the SQL Server service account; however, this was not possible for this customer. Enabling that permission would violate...
Continue reading...Blob Auditing for Azure SQL Database
In February 2017, Microsoft announced the general availability of Blob Auditing for Azure SQL Database. While auditing features were available before in Azure, this is a huge leap forward, especially in having more granular control over what audit records are captured. Before Blob Auditing, there was Table Auditing. This is something I like to equate to the C2 auditing feature of SQL Server. It’s only configurable options were ON or OFF. In reality, Table Auditing has a few more controls than that, but you get the idea. There was no way to audit actions against one specific table. Blob Auditing...
Continue reading...