SQL Server

[Video] Office Hours 2016 2016/05/25 (With Transcriptions)

This week, Angie, Erik, Tara, and Richie discuss Veeam, replication, setting up alerts, using multiple instances, and much more. Here’s the video on YouTube: You can register to attend next week’s Office Hours, or subscribe to our podcast to listen on the go. Office Hours Webcast – 2016-05-25 Does turning on trace flag 2861 cancel out optimize for…
Read More
Tara Kizer

Spring Cleaning Your Databases

Index Maintenance, SQL Server
11 Comments
Even with lots of monitoring in place, we should perform periodic checks of our SQL Servers. Think of this like “Spring Cleaning”, except I would recommend that it be more frequently than just once a year. Doing it monthly might be a bit ambitious due to our busy schedules, but quarterly could be achievable. Below are…
Read More

SQL Interview Question: “Tell me what you see in this screenshot.”

You’re a data professional working with (or at least applying to work with) a company using the StackOverflow database (I’m using the March 2016 version today). Your users are complaining that this stored procedure is slow: usp_GetPostsByOwnerUserId They didn’t give you parameter 26837 – I’m just giving you that so you can see an execution plan.…
Read More

[Video] Office Hours 2016 2016/05/18 (With Transcriptions)

This week, Brent, Angie, Erik, Jessica, and Richie discuss sp_Blitz® updates, merge replication, detecting index fragmentation, how to punish your DBAs, and Brent’s new chroma key backdrop. Here’s the video on YouTube: You can register to attend next week’s Office Hours, or subscribe to our podcast to listen on the go. Jessica Connors: Let’s talk about some merge…
Read More

What to Do When DBCC CHECKDB Reports Corruption

The instant you encounter corruption in a production SQL Server database, stop. Read this entire article first to understand the big picture, and then come back here to take action. First, understand that you shouldn’t start by trying to repair the corruption. You may be facing a storage subsystem problem where your storage is corrupting…
Read More
Tara Kizer

What TRY/CATCH Doesn’t Handle

SQL Server, T-SQL
25 Comments
We were once asked in class what TRY/CATCH doesn’t handle besides object existence errors. It’s well documented in Books Online (BOL). If you’re like me, then tl;dr. Are we even calling it Books Online these days? I still say “bookmark lookup” instead of “key lookup”. I suppose I’ll be saying Books Online for quite some…
Read More

SQL Interview Question: “Talk me through this screenshot.”

After writing about “For Technical Interviews, Don’t Ask Questions, Show Screenshots”, lots of folks asked what kinds of screenshots I’d show. Here’s this week’s example. I show each screenshot on a projector (or shared desktop) to the candidate and say: What’s this screen from? What does the screen mean? If it was a server you inherited from…
Read More

[Video] Office Hours 2016 2016/05/11

This week, Brent, Angie, Erik, Jessica, Richie, and Tara discuss backups, failover events, tempdb errors, errors, other errors… oh, did we mention errors? Here’s the video on YouTube: You can register to attend next week’s Office Hours, or subscribe to our podcast to listen on the go. How do you feel about third party backup software? Jessica…
Read More

Implicit vs. Explicit Conversion

SQL Server
10 Comments
Everyone knows Implicit Conversion is bad It can ruin SARGability, defeat index usage, and burn up your CPU like it needs some Valtrex. But what about explicit conversion? Is there any overhead? Turns out, SQL is just as happy with explicit conversion as it is with passing in the correct datatype in the first place.…
Read More

[Video] Office Hours 2016 2016/05/04

This week, Richie, Erik, Angie, and Tara discuss deadlocks, replication, SQL Server 2016 features, and more. Here’s the video on YouTube: You can register to attend next week’s Office Hours, or subscribe to our podcast to listen on the go. Transcript: Does NVARCHAR(255) Cost More Than NVARCHAR(30)? Angie Walker: All right. So Steve has a nvarchar(255) column that…
Read More

RAM and Sympathy

With the release date for 2016 finally announced Everyone can start gearing up to gaze upon its far shores from the 2008R2 instance they can’t or won’t upgrade for various reasons. I’m excited for a lot of the improvements and enhancements coming along, and generally hope I’m wrong about customer adoption. One annoyance with the…
Read More

Creating Tables and Stored Procedures in TempDB – Permanently

No, not #tables – actual tables. Here’s how: Transact-SQL USE tempdb; GO /* This one is only available during my session: */ CREATE TABLE #myTempTable (ID INT IDENTITY(1,1), Stuffing VARCHAR(100)); GO /* This one is global, meaning it's available to other sessions: */ CREATE TABLE ##myTempTable (ID INT IDENTITY(1,1), Stuffing VARCHAR(100)); GO /* You can…
Read More

Where Clauses and Empty Tables

SQL Server
3 Comments
Sometimes SQL is the presentation layer And when it is, you end up doing a lot of concatenating. This isn’t about performance, or trying to talk you out of SQL as the presentation layer, this is just something you should keep in mind. SQL is a confusing language when you’re just starting out. Heck, sometimes…
Read More

SQL Server 2016 Release Date: June 1, 2016

SQL Server
23 Comments
It’s the news we’ve all been waiting for! Microsoft just announced the SQL Server 2016 Release Date: June 1, 2016. This PDF lays out the differences between editions, and here’s a few points that stand out: Standard Edition now goes up to 24 cores, and still just 128GB max memory Query Store is Enterprise Edition…
Read More