Michael J. Swart

November 21, 2016

Do You Have Check Constraints On Your Start and End Dates?

Filed under: Miscelleaneous SQL,SQL Scripts,SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 10:13 am

Adam Machanic tweeted this advice last week:

Are you missing any of these check constraints? Run this query to check.
This query looks for any columns in the same table that begin with “Start” and “End”. It then looks for check constraints that reference both these columns. If it doesn’t find them, it suggests a check constraint.

WITH StartColumnNames AS
    SELECT object_id,
           name AS column_name
      FROM sys.columns
     WHERE name like 'start%'
EndColumnNames AS
    SELECT object_id,
           name AS column_name
      FROM sys.columns
     WHERE name like 'end%'
SELECT t.object_id,            
       OBJECT_SCHEMA_NAME(t.object_id) AS [schema_name], 
       t.[name] AS table_name,
       s.column_name AS start_column,
       e.column_name AS end_column,
       N'ALTER TABLE ' + QUOTENAME(OBJECT_SCHEMA_NAME(t.object_id)) + N'.' + QUOTENAME(t.name) + 
           N' ADD CONSTRAINT ' + 
           QUOTENAME(N'CK_' + t.name + N'_' + s.column_name + N'_' + e.column_name) + 
           N' CHECK (' + QUOTENAME(s.column_name) + N' <= ' + QUOTENAME(e.column_name) + N');' as check_suggestion
  FROM StartColumnNames s
  JOIN EndColumnNames e
       ON s.object_id = e.object_id
       AND s.column_id <> e.column_id
       AND REPLACE(s.column_name, 'start', 'end') = e.column_name        
  JOIN sys.tables t
       ON t.object_id = s.object_id
           SELECT *
             FROM sys.check_constraints c
             JOIN sys.sql_expression_dependencies start_dependency
                  ON start_dependency.referencing_id = c.object_id
                  AND start_dependency.referenced_id = t.object_id
                  AND start_dependency.referenced_minor_id = s.column_id
             JOIN sys.sql_expression_dependencies end_dependency
                  ON end_dependency.referencing_id = c.object_id
                  AND end_dependency.referenced_id = t.object_id
                  AND end_dependency.referenced_minor_id = e.column_id
            WHERE c.parent_object_id = t.object_id


Don’t blindly run scripts that you got from some random guy’s blog. Even if that someone is me. That’s terribly irresponsible.

But this query may be useful if you do want to look for a very specific, simple kind of constraint that may match your business specs. These constraints are just suggestions and may not match your business rules. For example, when I run this query on Adventureworks, I get one “missing” check constraint for HumanResources.Shift(StartTime, EndTime) and when I look at the contents of the Shift table, I get this data:
Notice that I can’t create a constraint on this table because of the night shift. The constraint doesn’t make sense here.

Creating constraints on existing tables may take time if the table is huge. Locks may be held on that table for an uncomfortably long time.

Of course if your table has data that would violate the constraint, you can’t create it. But now you have to make some other choices. You can correct or delete the offending data or you can add the constraint with NOCHECK.

November 8, 2016

I’m Trying To Kick My “Undo Button” Habit

Filed under: SQLServerPedia Syndication — Michael J. Swart @ 8:15 am

T-SQL Tuesday Logo
Thank you Andy Yun for hosting this month’s T-SQL Tuesday. Andy asks us to write about speaking which is a bit apropos because like Andy I got to speak the PASS Summit this year.

If you have visited any post on this site, you’ll realize two things very quickly. (1) I love writing about SQL Server and (2) I like drawing. When doing either of those things, I rely heavily on the undo button. Whether it’s Ctrl+Z or Backspace. It helps me be fearless. Fearless when drawing, fearless when writing. It helps me be perfect at the cost of efficiency – or at least as close to perfect as I want to be.


But there’s no undo button when speaking. Speaking is a kind of performance and I think I get hung up on that which makes me nervous. So this post then is kind of a narrative essay of my experience speaking at the PASS Summit.

Applying to Speak

Back in January, I set a goal for myself, write once a week and speak once a month. This meant looking for places to speak. So when the call PASS Summit call for speakers came around I decided to apply. I read two or three blog posts on what makes a compelling abstract and followed most of the advice. The piece of advice I followed most closely was “talk about what you know”. So I signed up with one abstract (only one) on a topic near and dear to my heart, SQL Server concurrency.

The thing I knew I had going for me was that I live this topic. At work we’ve successfully refactored a legacy system that has handled a peak load of over 50,000 transactions per second (And that’s without Hekaton). Most of the talk includes lessons we’ve learned and things I wish I knew earlier.

Getting Accepted

So I got accepted. I have to describe the experience of getting accepted, because the notification comes via email and is nothing like a college letter. College acceptance letters usually start with words like “Congratulations”, or “I am pleased to inform…”. While College rejection letters start with “We regret” or “Unfortunately”.

Well, the letter from PASS is nothing like that. It’s a form letter where they introduce definitions of Accepted/Alternate/Not Accepted. And then 250 words later (scroll scroll scroll on my phone) I see a tiny word beside my session title: “accepted”. That was celebration time.

Do you know when a rookie manages to get a hit at their first at bat in the majors? For a few minutes at least, they’re batting a thousand. That’s me right now. I realize how fortunate that makes me.

The Big Room

So a week before the summit, I hopped onto the speaker orientation conference call where Allan White tells us about which rooms are being recorded. He mentions one room which is set up for PASS TV. Room 6E. I checked the schedule and found my name. Now to check the room, (scroll, scroll, scroll) 6E Gulp!

In the end, the room was a blessing and a curse. It was huge. I figure it could have held maybe 1000 people. There’s no way that was going to be full on the second last session right after lunch on a Friday afternoon! And although the audience was probably the largest audience I’ve ever had, it felt empty.

The Talk

The talk went well. It started out rocky but once I got into the SQL, I got more comfortable. I had friends in the audience and I really appreciated their presence. The questions after were great. One lesson I’m taking for next time is to end maybe five or ten minutes early so I’m not in such a rush to get off the stage. There were many people who were waiting to ask me a question that never got a chance to.

It was a good experience and I want to do more of it. That means more practice. I’m double lucky because this week, I get to give the talk again for work! D2L is hosting an internal conference and I’m excited to deliver it to the home team.

Look for more talks in the near future.

October 26, 2016

My 2016

Filed under: SQLServerPedia Syndication — Michael J. Swart @ 11:59 am

2016 was a blast at work.

For most of 2016, I worked with a small team of three called the Samurai team. The team name was taken from the wandering Samurai who wanders from village to village doing good where ever injustice was found. Our job was to go around doing good wherever technical debt was found.


And that was the point. It was wherever we found the technical debt. It was an exercise in trust I suppose. They trusted us to do what was important. We had more autonomy then I’ve ever enjoyed before. There was still accountability and everything we did was data-driven and pragmatic. But I really enjoyed the experience.

We did a lot of work and on the database scalability side, we focused on these things:

  • Avoiding queries
  • Tuning queries
  • Stabilizing execution plans
  • Concurrency

Database Concurrency

In 2016, more than ever before, I got to exercise my database concurrency skills in a real practical sense. It was cool to find out what rules of thumb were true and what rules of thumb didn’t matter.

Developing Highly Concurrent Databases

That’s why I’m really excited to talk about database concurrency at the PASS Summit. Developing Highly Concurrent Databases I’m here in Seattle this week and I get to deliver my talk called talk on Friday at 2PM.

But if you’re not in Seattle, you can choose to watch me on PASS TV! They’re live streaming one session room throughout the conference. And I’m fortunate enough to be presenting in that room.

If you’re here at PASS, mark your schedule for room 6E on Friday at 2PM (Pacific).
And if you’re not, you can still catch me and other presenters on PASStv (Friday at 5PM Eastern)

September 23, 2016

Build Your Own Tools

There are so many ways to look inside SQL Server. New extended events and dynamic management views are introduced every version. But if you want to collect something that’s unavailable, with a little bit of creativity, you can create your own tools.

Inspired by Richie Rump’s latest project, I’m going to describe a tool I wrote and the process I took to get there.

The Problem To Tackle

I had a deadlock graph I wanted to tackle, but I was having trouble reproducing it. I needed to know more about the queries involved. But the query plans were no longer in cache. So here’s the problem

Can I collect the execution plans that were used for the queries involved in a deadlock graph?

I want to use that information to reproduce – and ultimately fix – the deadlock.

The Right Tool For the Job

If you don’t have enough data to get to the root cause of an issue, put something in place for next time.

Can I Use Out-Of-The-Box Extended Events?
I’m getting used to extended events and so my first thought was “Is there a query plan field I can collect with the deadlock extended event? There is not. Which isn’t too surprising. Deadlock detection is independent of any single query.

So How Do I Get To The Execution Plans?
So when I look at a deadlock graph, I can see there are sql_handles. Given that, I can grab the plan_handle and then the query plan from the cache, but I’m going to need to collect it automatically at the time the deadlock is generated. So I’m going to need

  • XML shredding skills
  • Ability to navigate DMVs to get at the cached query plans
  • A way to programatically respond to deadlock graph events (like an XE handler or a trigger)

Responding Automatically to Extended Events
This is when I turned to #sqlhelp. And sure enough, six minutes later, Dave Mason helped me out:

I had never heard of Event Notifications, so after some googling, I discovered two things. The first thing is that I can only use Event Notifications with DDL or SQLTrace events rather than the larger set of extended events. Luckily deadlock graphs are available in both. The second thing is that Event Notifications aren’t quite notifications the way alerts are. They’re a way to push event info into a Service Broker queue. If I want automatic actions taken on Service Broker messages, I have to define and configure an activation procedure to process each message. In pictures, here’s my plan so far:

My Plan

Will It Work?
I think so, I’ve had a lot of success creating my own tools in the past such as

Also, looking at the different pieces, they’re probably robust enough to do what I need them to do. One surprise involved security concerns for activated procedures that need to access system views

The Deadlock Logging Script

Here’s the tool!

Create the Database

USE master;
IF (DB_ID('DeadlockLogging') IS NOT NULL)
    DROP DATABASE DeadlockLogging;

Create the Service Broker Objects
I’ve never used Service Broker before, so a lot of this comes from examples found in Books Online.

use DeadlockLogging;
CREATE QUEUE dbo.LogDeadlocksQueue;
CREATE SERVICE LogDeadlocksService
    ON QUEUE dbo.LogDeadlocksQueue 
CREATE ROUTE LogDeadlocksRoute
    WITH SERVICE_NAME = 'LogDeadlocksService',
-- add server level notification
IF EXISTS (SELECT * FROM sys.server_event_notifications WHERE [name] = 'LogDeadlocks')
    FOR deadlock_graph -- name of SQLTrace event type
    TO SERVICE ''LogDeadlocksService'', ''' + CAST(service_broker_guid as nvarchar(max))+ ''';'
FROM sys.databases 
WHERE [name] = DB_NAME();
EXEC sp_executesql @SQL;

The dynamic SQL is used to fetch the database guid of the newly created database.

a Place to Store Deadlocks

-- Create a place to store the deadlock graphs along with query plan information
CREATE SEQUENCE dbo.DeadlockIdentity START WITH 1;
CREATE TABLE dbo.ExtendedDeadlocks 
    DeadlockId bigint not null,
    DeadlockTime datetime not null,
    SqlHandle varbinary(64),
    StatementStart int,
    [Statement] nvarchar(max) null,
    Deadlock XML not null,
    FirstQueryPlan XML
    ON dbo.ExtendedDeadlocks(DeadlockTime, DeadlockId);

The Procedure That Processes Queue Messages

CREATE PROCEDURE dbo.ProcessDeadlockMessage
    WAITFOR ( 
        RECEIVE TOP(1)
            @RecvMsgTime = message_enqueue_time,
            @RecvMsg = message_body
        FROM dbo.LogDeadlocksQueue
    ), TIMEOUT 5000;
    IF (@@ROWCOUNT = 0)
    DECLARE @DeadlockId BIGINT = NEXT VALUE FOR dbo.DeadlockIdentity;
    DECLARE @RecsvMsgXML XML = CAST(@RecvMsg AS XML);
    DECLARE @DeadlockGraph XML = @RecsvMsgXML.query('/EVENT_INSTANCE/TextData/deadlock-list/deadlock');
    WITH DistinctSqlHandles AS
        SELECT DISTINCT node.value('@sqlhandle', 'varchar(max)') as SqlHandle
        FROM @RecsvMsgXML.nodes('//frame') AS frames(node)            
    INSERT ExtendedDeadlocks (DeadlockId, DeadlockTime, SqlHandle, StatementStart, [Statement], Deadlock, FirstQueryPlan)
    SELECT @DeadlockId,
    FROM DistinctSqlHandles s
    LEFT JOIN sys.dm_exec_query_stats qs 
        on qs.sql_handle = CONVERT(VARBINARY(64), SqlHandle, 1) 
    OUTER APPLY sys.dm_exec_query_plan(qs.plan_handle) qp
    OUTER APPLY sys.dm_exec_sql_text (CONVERT(VARBINARY(64), SqlHandle, 1)) st
      SELECT SUBSTRING(st.[text],(qs.statement_start_offset + 2) / 2,
             WHEN qs.statement_end_offset = -1  THEN LEN(CONVERT(NVARCHAR(MAX), st.text)) * 2
             ELSE qs.statement_end_offset + 2
             END - qs.statement_start_offset) / 2)) as sqlStatement([statement]);
    -- clean up old deadlocks
    SELECT DISTINCT TOP (500) @limit = DeadlockId 
    FROM ExtendedDeadlocks 
    ORDER BY DeadlockId DESC;
    DELETE ExtendedDeadlocks 
    WHERE DeadlockId < @limit;

Activating the Procedure

ALTER QUEUE dbo.LogDeadlocksQueue
    ( STATUS = ON,
      PROCEDURE_NAME = dbo.ProcessDeadlockMessage,

Clean Up
And when you’re all done, this code will clean up this whole experiment.

use master;
if (db_id('DeadlockLogging') is not null)
    alter database DeadlockLogging set single_user with rollback immediate 
    drop database DeadlockLogging
if exists (select * from sys.server_event_notifications where name = 'DeadlockLogging')

July 27, 2016

Do you Use CLR in SQL Server?

Filed under: Miscelleaneous SQL,SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 11:11 am

We don’t use CLR assemblies in SQL Server. For us, programming in the database means that maybe “you’re doing it wrong”. But there have been rare circumstances where I’ve wondered about what the feature can do for us.

For example, creating a CLR assembly to do string processing for a one-time data migration might be preferable to writing regular SQL using SQL Server’s severely limited built-in functions that do string processing.

Deployment Issues

I’ve always dismissed CLR as part of any solution because the deployment story was too cumbersome. We enjoy some really nice automated deployment tools. To create an assembly, SQL Server needs to be able to access the dll. And all of a sudden our deployment tools need more than just a connection string, the tools now need to be able to place a file where SQL Server can see it… or so I thought.

Deploy Assemblies Using Bits

CREATE ASSEMBLY supports specifying a CLR assembly using bits, a bit stream that can be specified using regular T-SQL. The full method is described in Deploying CLR Database Objects. In practice, the CREATE ASSEMBLY statement looks something like:

FROM 0x4D5A900003000000040000... -- truncated binary literal

This completely gets around the need for deployments to use the file system. I was unaware of this option until today.

Your Experience

So what’s your experience? My mistaken assumptions kept me from evaluating CLR properly. I wonder if anyone is in the same position I was in and I wonder if this accounts for the low adoption in general of CLR in SQL Server. Answer this survey, Which option best describes you?

External Link to Survey Monkey survey.

Update July 29 Here are the answers so far:

July 20, 2016

Simplified Order Of Operations

Filed under: Miscelleaneous SQL,SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 8:00 am

I recently learned that when combining multiple operators in a SQL expression, AND has a higher precedence than OR but & has the same precedence as |. I expected the precedence rules for the logical operators to be consistent with the bitwise operators.

Even Stephen Sondheim seemed to struggle with this.

AND is Always Evaluated Before OR

WHERE (1 = 1) OR (1 = 1) AND (1 = 0)
-- returns TRUE
WHERE (1 = 0) AND (1 = 1) OR (1 = 1) 
-- returns TRUE

& and | are Evaluated Left To Right

SELECT 1 | 1 & 0
-- returns 0
SELECT 0 & 1 | 1
-- returns 1

Here Are The Official Docs

Here what Microsoft says about SQL Server’s Operator Precedence.

  1. ~ (Bitwise NOT)
  2. * (Multiply), / (Division), % (Modulo)
  3. + (Positive), – (Negative), + (Add), (+ Concatenate), – (Subtract), & (Bitwise AND), ^ (Bitwise Exclusive OR), | (Bitwise OR)
  4. =, >, <, >=, <=, <>, !=, !>, !< (Comparison operators)
  5. NOT
  6. AND
  8. = (Assignment)

Practical Subset

I have a book on my shelf called Practical C Programming published by O’Reilly (the cow book) by Steve Oualline. I still love it today because although I don’t code in C any longer, the book remains a great example of good technical writing.

That book has some relevance to SQL today. Instead of memorizing the full list of operators and their precedence, Steve gives a practical subset:

  1. * (Multiply), / (Division)
  2. + (Add), – (Subtract)
  3. Put parentheses around everything else.

July 19, 2016

PASS Summit 2016: Developing High Concurrency Databases

Filed under: SQLServerPedia Syndication — Michael J. Swart @ 10:26 am

My session has been accepted!

Double Double excited

I’m excited that my talk Developing Highly Concurrent Databases got accepted as a session in this year’s PASS Summit in Seattle. This October.

You’ve heard the advice “write what you know”. I’ve applied that advice to my choice of topic. For the past nine years, I’ve worked for D2L, a fast growing company facing a higher volume of database activity year after year.

We built a system that has handled a peak load of over 50,000 transactions per second. And that’s without using In-Memory OLTP yet. Much of the talk will include lessons we’ve learned and things I wish we knew earlier.

Maybe I’ll see you there!

July 7, 2016

Prioritize This List of Issues (Results)

Filed under: Miscelleaneous SQL,SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 8:00 am

Earlier this week I asked people to help me out prioritizing a list of issues. I was surprised by the number of people who participated. I think I missed an opportunity to crowd-source a large part of my job by including my real issues.


Thanks for participating. After the results started coming in, I realized that my question was a bit ambiguous. Does first priority mean tackle an issue first? Or does a higher numbered issue mean a higher priority? I clarified the question and took that into account for entries that picked sproc naming conventions as top priority.


The results were cool. I expected a variety of answers but I found that most people’s priorities lined up pretty nicely.

For example, even though I wrote a list of issues all with different severity, there were three issues that stood out as most critical: Corrupted databases, a SQL injection vulnerability and No automated backups. Keeping statistics up to date seemed to be the most important non-critical issue.

But there is one issue that I thought had a lot of variety, index fragmentation. I personally placed this one second last. I got a friend to take the survey and I got to hear him explain his choices. He wanted to tackle index fragmentation early because it’s so easily fixable. “It’s low hanging fruit right? Just fix it and move on.”

My friend also pointed out that this technique would work well as an interview technique. Putting priorities in an order is important but even better is that it invites so much discussion about the reasons behind the order.

Speaking of which, go check out Chuck Rummel’s submission. He wins the prize for most thorough comment on my blog.

My Priorities

Here they are:

  • Corrupted database – serving data is what databases are supposed to do
  • No automated backups – protect that data from disasters
  • A SQL injection vulnerability – protect the data from unauthorized users
  • Stale statistics – serve data efficiently
  • Cursors – a common cause of performance issues, but I’d want to be reactive
  • GUID identifiers – meh
  • NOLOCK hints – meh
  • Developers use a mix of parameterized SQL and stored procedures – It’s not a performance concern for me
  • Fragmented indexes – supposedly better performance?
  • Sprocs prefixed with “sp-” – aesthetics?

July 5, 2016

Prioritize This List of Issues

Filed under: Miscelleaneous SQL,SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 9:14 am

“One thing at a time / And that done well / Is a very good thing / As any can tell”

But life isn’t always that easy is it? I spend a lot of my workday juggling priorities. And I want to compare what I think to others. So I wrote a survey which explores the importance people place on different SQL Server issues. It’s easy to say avoid redundant indexes. But does it follow that it’s more important to clean up redundant indexes before rewriting cursors?

The List

Prioritize this list from greatest concern to least. So if an item appears above another item, then you would typically tackle that issue first.

  • Corrupted database
  • A SQL injection vulnerability
  • Stale statistics
  • Fragmented indexes
  • Developers use a mix of parameterized SQL and stored procedures
  • Sprocs prefixed with “sp_”
  • Cursors
  • GUID identifiers
  • NOLOCK hints
  • No automated backups

I want to hear what you think. Submit your prioritized list in the comments, or by using this survey: https://www.surveymonkey.com/r/MV9F9YT

I’ll be posting my own answers on Thursday, July 5, 2016.

Update: I’ve shared the results. Prioritize This List Of Issues (Results)

June 21, 2016

T-SQL Tuesday #079 Roundup: It’s 2016!

Filed under: Miscelleaneous SQL,SQLServerPedia Syndication — Michael J. Swart @ 7:54 pm

The invite post

Twenty Snazzy Bloggers!

There’s always some anxiety when throwing a party. Wondering whether it will be a smash. Well I had nothing to worry about with the twenty bloggers who participated last week. You guys hit it out of the park!

The Round Up

Let’s get to it:

Rob Farley
1. Rob Farley (@rob_farley) SQL Server 2016 Temporal Table Query Plan Behaviour
Rob digs into the query optimizer to highlight an interesting plan choice when temporal tables are involved. So extra care is needed when indexing and testing features that use temporal tables.
What I Thought: I really enjoy Rob’s posts that digs into query plans and the optimizer in general.

Did you know that Rob has participated in every single T-SQL Tuesday? Even the rotten months when there’s like only three participants. Rob’s one of them.

Ginger Grant
2. Ginger Grant (@DesertIsleSQL) Creating R Code to run on SQL Server 2016
Ginger writes about how to get started coding with the R language.
What I Thought: If you want to do the kind of analysis that R enables then bookmark her website! Her blog is becoming a real resource when it comes to working with R and SQL Server.

Ewald Cress
3. Ewald Cress (@sqlOnIce) Unsung SQLOS: the 2016 SOS_RWLock
Have you ever had to troubleshoot spinlock bottlenecks? You have my sympathies. Spinlocks are meant to be internal to SQL Server, something that Microsoft worries about. Ewald writes about new SOS_RWLOCK improvements.
What I Thought: Do you like talks by Bob Ward? Do you like to dig into SQL Server’s internals? Does inspecting SQL Server debuggers and callstacks sound like a fun evening? This post is for you.

Russ Thomas
4. Russ Thomas (@SQLJudo) When the Memory is All Gone
Russ hasn’t posted to his blog recently because he’s been busy creating In-Memory OLTP courseware. So I’m glad that Russ is taking a break from that, returning to blogging and writing about … In-Memory OLTP. Specifically
What I Thought: I like Russ’s style. He has to keep things professional and respectable for Pluralsight, but on his own blog he gets to talk about sandwiches, ulcers and tempdb.

Guy Glanster
5. Guy Glanster (@guy_glantser) We Must Wait for SP1 before Upgrading to SQL Server 2016
To be clear, Guy talks about why the wait-for-sp1 advice doesn’t apply.
What I Thought: One sentence Guy wrote struck a chord with me: “I have never agreed with this claim, but in my first years as a DBA I didn’t have enough experience and confidence to claim otherwise, so I just assumed those people know what they’re talking about.” Wow, I’ve recognize that feeling. All I can say is that when you get past that feeling. That’s a really really good sign.

Patrick Keisler
6. Patrick Keisler (@patrickkeisler) SQL Server 2016 Launch Discovery Day (aka Hackathon)
Patrick gives a recap on a SQL Server hackathon called “SQL Server 2016 Launch Discovery Day”.
What I Thought: Wow, read the whole post, but if you can’t, at least check out the challenges and the scoring criteria. For example, the first challenge is to answer “From how far away do attendees travel to SQL Saturday? Are there any geographic trends to the distances traveled”. How would you approach this?”

Justin Goodwin
7. Justin Goodwin (@SQL_Jgood) Use the Query Store In SQL Server 2016 to Improve HammerDB Performance
Justin describes query regressions he found in benchmark workloads when run against SQL Server 2014 and SQL Server 2016. Then, in 2016, he shows how to use Query Store to fix it!
What I Thought: Fantastic post. And probably the best organized post of the month.

Kenneth Fisher
8. Kenneth Fisher (@sqlstudent144) Comparing two query plans
My friend Ken introduces the SSMS feature of comparing query plans.
What I Thought: I have to admit that after reading his post I tried the feature out last Tuesday. I’ve since found myself using the feature a few times since. It’s a valuable tool for database developers. Thanks Ken!

Andy Mallon
9. Andy Mallon (@Amtwo) COMPRESS()ing LOB data
Andy wrote about new functions COMPRESS and DECOMPRESS which do that using the gzip algorithm. Andy gives an example of how you would use COMPRESS and what situations would make best use of this feature.
What I Thought: I did not know about this. It’s a feature that I will use (once we adopt 2016).

Erik Darling
10. Erik Darling (Erik Darling) Availability Groups, Direct Seeding and You
Erik introduces direct seeding for Availability Groups. Direct seeding lets DBAs avoid a step when launching a new replica.
What I Thought: Apparently if you’re a DBA this is a CoolThing™. I kind of lost my taste for replication solutions – specifically transactional replication on flaky networks – in 2004. It’s nice to see that eleven years later, Microsoft is still working on making it easier to “move data from here to there”. (On the sincerity-sarcasm meter, that lies somewhere in the middle)

Deb Melkin
11. Deb Melkin (@dgmelkin) Temporal Tables
Temporal tables – not to be confused with temp tables – are the subject of Deb’s post. Earlier Rob Farley warned us to be careful about indexes on temporal tables. In Deb’s post, we’re warned about the precision of datetime2 columns in temporal tables.
What I Thought: Thanks for writing Deb, I like your perspective and how you walk us through your thinking. Very compelling.

Chrissy LeMaire
12. Chrissy LeMaire (@cl) So Why is sp_help_revlogin Still a Thing?
Chrissy Lemaire, Powershell MVP writes about how it’s still hard to migrate logins using only SQL Server. However there’s an easy solution using powershell.
What I Thought: Chrissy is one of the bloggers who used my “It’s 2016, why is X still a thing?” writing prompt. Chrissy also points out how rapidly powershell is growing to better support DBAs. It turns into a very exciting story.

Aaron Bertrand
13. Aaron Bertrand (@AaronBertrand) This Weird Trick Still Missing From SQL Server 2016
Fellow Canadian and all around good guy Aaron also used the “It’s 2016, why is X still (not) a thing?” format. As developers, we’d like a way to use Developer edition to be able to deploy to Standard edition confidently without worry that we’ve accidentally used some feature only available in Enterprise Edition.
What I Thought: Aaron’s absolutely right and I’ve been burned by this missing feature in the past. He links to two connect items and asks us to vote on them and leave business impact comments. I encourage you to do that too.

Robert Pearl
14. Robert Pearl (@PearlKnows) It’s SQL Server 2016 – stupid
Robert writes about SQL Server 2016 launch activities and three features he’s excited about, temporal tables, query store and better default tempdb configuration.
What I Thought: It appears that NYC was the place to be when SQL Server 2016 launched. Maybe I’ll keep my calendar clear for SQL Server 2018.

Steve Jones
15. Steve Jones (@way0utwest) Row Level Security
Row Level Security is Steve’s topic. He describes what it is, how it’s used and how he’ll never have to implement that feature from scratch again.
What I Thought: Steve is optimistic about the feature and I am too. I think I was first introduced (in a way) to the idea behind the feature when I tried to look at sys.procedure definitions as a data reader.

Lori Edwards
16. Lori Edwards (@loriedwards) It’s 2016
Lori’s writes a good introduction to temporal tables.
What I Thought: You know how when you visit documentation on a SQL Server keyword or function, you have to scroll to the bottom of the page to see an example? Not so with Lori’s introduction, her examples are up front and excellent.

Mike Fal
17. Mike Fal (@Mike_Fal) SQL 2016 Direct Seeding
Mike Fal is the second one to mention direct seeding for Availability Groups. Nice! This promises to be a good feature for DBAs.
What I Thought: In Erik’s post, he mentioned the lack of SSMS support. And so he pointed to a connect item about it. Mike Fal recognizing the issue tackled it with powershell. Good job.

Taiob Ali
18. Taiob Ali (@SqlWorldWide) JSON Support in SQL 2016
New JSON support! I was glad that someone wrote about it. And Taiob’s not just a JSON user. His workplace uses MongoDB as well.
What I Thought: Thanks Taiob, At first I noticed your website’s domain: “SQLWorldWide” and wondered if you chose that name based on Microsoft’s new sample database World Wide Importers, but then I noticed you’ve been blogging for a while. If you know SQL Server and want to know what JSON is all about, this post is for you. If you’re a developer who uses JSON and want to know how to incorporate it into a SQL Server solution, this post is for you too.

Kennie Nybo Pontoppidan
19. Kennie Nybo Pontoppidan (@KennieNP) Temporal Tables are Just System History Tables (For Now)
Kennie writes about temporal tables. Wow, this seems to be a popular feature this year. He explains how relevant this feature is when compared with more traditional ways to implement type 2 history tables (slowly changing dimensions).
What I Thought: Kennie mentions watching Chris Date and warehouse scenarios, so it’s nice to have the perspective of someone familiar with relational theory and also with data warehouses.

Riley Major
20. Riley Major (@RileyMajor) Let me count the ways…
Riley: I’d like a numbers table please
Microsoft: SQL Azure Features? You got it.
Riley: No, I said I’d like a…

Thanks again everyone. Have a wonderful summer and a wonderful 2016!

« Newer PostsOlder Posts »

Powered by WordPress