SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

The Scary DBA

I have twenty+ years experience in IT. That time was spent in technical support, development and database administration. I work forRed Gate Software as a Product Evangelist. I write articles for publication at SQL Server Central, Simple-Talk, PASS Book Reviews and SQL Server Standard. I have published two books, ”Understanding SQL Server Execution Plans” and “SQL Server 2008 Query Performance Tuning Distilled.” I’m one of the founding officers of the Southern New England SQL Server Users Group and its current president. I also work on part-time, short-term, off-site consulting contracts. In 2009 and 2010 I was awarded as a Microsoft SQL Server MVP. In the past I’ve been called rough, intimidating and scary. To which I usually reply, “Good.” You can contact me through grant -at- scarydba dot kom (unobfuscate as necessary).

Wait Statistics on a Query

Wait statistics are a vital part of understanding what is causing your system to run slowly. Capturing them can be done through a variety of mechanisms from sys.dm_os_wait_stats (use this query for that) to sys.dm_db_wait_stats in Azure SQL Database. Those cover the system and the database, however, what about capturing… Read more

2 comments, 2,408 reads

Posted in The Scary DBA on 5 February 2018

Youtube Channel Update


I just wanted to take a moment to promote the work I’ve been doing with the YouTube Channel.

I’ve published four videos in the last week. The most popular was an introduction to the GDPR:

I’ll be talking about that quite a bit more in the coming weeks. Read more

1 comments, 191 reads

Posted in The Scary DBA on 29 January 2018

You Need a New Hobby

Not sure who this is that is attempting to hack into my blog so desperately, but seriously, time for a new hobby:

administrador 20 mins ago
administrador 1 hour 41 mins ago
administrador 3 hours 2 mins ago
administrador 4 hours 20 mins ago

Read more

10 comments, 198 reads

Posted in The Scary DBA on 23 January 2018

Database Fundamentals #16: Removing Data With T-SQL

Deleting data from a table using T-SQL works quite a lot like the UPDATE statement.

How it Works

In the same way you supply the statement, DELETE, and then the table name. You’re not going to specify columns in any way because deleting data is all about removing a… Read more

4 comments, 2,039 reads

Posted in The Scary DBA on 22 January 2018

Updated YouTube Channel

Hello all,

I’ve recently updated my YouTube channel. I’m going to be posting a lot more videos up there. If you would like to take advantage of it, please go here and click on the subscribe button. I’ll be covering pretty much the same type of thing there that I… Read more

4 comments, 190 reads

Posted in The Scary DBA on 16 January 2018

Getting Started in a SQL Server 2017 VM in Azure

You say you’re ready to dip your toes in the Azure ocean? Come on in, the water’s fine!

Oh, you want to really dip your toes. You’re starting with Virtual Machines? OK. I guess. It’s not where the real excitement is. You should be checking out Azure SQL Database and… Read more

2 comments, 970 reads

Posted in The Scary DBA on 15 January 2018

Statistics Use, Extended Events and Execution Plans

Query tuning ain’t easy.

Figuring out which index is getting used is one step, and generally simple, look at the execution plan to see which index is in use and whether it’s being used in a SEEK or a SCAN. Done. However, when your index isn’t being used, how do… Read more

2 comments, 1,482 reads

Posted in The Scary DBA on 8 January 2018

Snow, Heathrow Airport, Disaster Recovery

I recently flew from Boston to the UK through the Heathrow airport. It just happened to be on the day that the UK got about 1.5 inches of snow (sorry, 3.8 centimetres, according to Weather Underground though, just 15mm, not sure about that). I spent a little more than… Read more

0 comments, 524 reads

Posted in The Scary DBA on 2 January 2018

SQL Server Automatic Tuning and sys.dm_db_tuning_recommendations

In Azure SQL Database for quite some time and now available in SQL Server 2017, Microsoft has put a lot of the knowledge they’ve gleaned from running more databases that any of the rest of us ever will to work with Automatic Tuning.

Automatic Tuning

The core of automatic… Read more

3 comments, 491 reads

Posted in The Scary DBA on 26 December 2017

Query Store Wait Statistics with sys.query_store_wait_stats

The second best thing to questions that people ask is when I sit down to write a book. It’s so easy to miss things in the day-to-day grind of doing work. Then, late at night, you’re working on a chapter, so you read up on the documentation to ensure that… Read more

8 comments, 221 reads

Posted in The Scary DBA on 18 December 2017

Execution Plan Metrics and Units of Measure

Have you ever looked at the properties inside an execution plan and wondered what the units of measure were? I know I have. I also get the question pretty frequently about all sorts of properties. What does EstimatedAvailableMemoryGrant display it’s units in anyway? For that matter, what the heck is… Read more

2 comments, 1,201 reads

Posted in The Scary DBA on 11 December 2017

SQL in the City 2017

Redgate is once again hosting a live, virtual event for SQL in the City. We’re going to give you a lot of educational content on DevOps, SQL Server, Monitoring, GDPR and compliance. We’ll also be doing all this with Redgate tools. Here’s my promotional video for the event:

I… Read more

1 comments, 214 reads

Posted in The Scary DBA on 8 December 2017

Why I Use AdventureWorks for Demos

I know that when some people see AdventureWorks, their vision turns all red around the edges, their blood pressure spikes and they begin to foam at the mouth. I do understand. AdventureWorks, Microsoft’s very old, near ubiquitous, sample database suffers from a lot off issues.

What’s The Matter With AdventureWorks?

Read more

9 comments, 230 reads

Posted in The Scary DBA on 4 December 2017

Automating T-SQL Code Analysis

With all the options available within T-SQL these days, it’s more and more imperative that our code be clear and consistent. For example, there are clustered indexes and nonclustered indexes. Oh, but those are rowstore indexes. You also have clustered columnstore and nonclustered columnstore indexes. When you write T-SQL that… Read more

2 comments, 1,969 reads

Posted in The Scary DBA on 28 November 2017

Database Fundamentals #15: Modifying Data With T-SQL

The preferred method for modifying your data within a database is T-SQL. While the last Fundamentals post showed how to use the GUI to get that done, it’s not a very efficient mechanism. T-SQL is efficient.


The command for updating information in your tables is UPDATE. This command doesn’t… Read more

6 comments, 1,623 reads

Posted in The Scary DBA on 27 November 2017

I May Never Be a Data Scientist

Chances are extremely high that I’ll never put down Data Scientist as my job. Considering what you do and what you know, I’ll bet a healthy percentage of you are in a similar situation. That’s OK. You know why? You know a lot about data, data movement and data processing… Read more

3 comments, 279 reads

Posted in The Scary DBA on 22 November 2017

Get That Profiler Feel in Extended Events

I know. You love Profiler. I hear you. You’re wrong, but that’s OK. Kidding… mostly.

Unfortunately though, I think a lot of what passes for issues and problems with Extended Events is actually a lack of knowledge about how they work. Let’s take an example and run with it.


Read more

3 comments, 1,214 reads

Posted in The Scary DBA on 20 November 2017

Presenting Azure Vs. Working With Azure

I have a real infatuation with Azure. I’m especially interested in the Platform as a Service (PaaS) offerings in and around the Data Platform. I truly believe that these are the subversive elements that are going to change how a lot of us get our jobs done with data. I’ve… Read more

2 comments, 193 reads

Posted in The Scary DBA on 15 November 2017

All Day Query Tuning Class at SQLSaturday Virginia

March 23rd, 2018, I’ll be teaching an all day class on Query Tuning Tools in Richmond Virginia. I hope to see you there. However, I have to warn you, there is very limited seating. If you want to take this class, I suggest you register for it as soon as… Read more

2 comments, 242 reads

Posted in The Scary DBA on 14 November 2017

The GDPR and You

Ever heard of the General Data Protection Regulation? If not, go and read the Wiki. I’ll wait.

I can already hear what you’re thinking. “Grant, this doesn’t apply to me because my company is in the <insert non-EU country here>.” How do I know you’re thinking that? Because every… Read more

6 comments, 209 reads

Posted in The Scary DBA on 13 November 2017

Newer posts

Older posts