T-SQL Tuesday #106 - Triggers

Dave Mason T-SQL Tuesday

For T-SQL Tuesday #106, Steve Jones (b|t) asks us to write about an experience with triggers, either good or bad. I'd bet that most of you are thinking about INSERT, UPDATE, and DELETE triggers. But for my DBA sensibilities, the best trigger is a DDL trigger.


Preparing for Exam 70-767: Implementing a Data Warehouse

Dave Mason MCSE: Data Management and Analytics

After nearly a two year hiatus, I steered my learning path back towards certifications. I'm happy to tell you I recently passed Exam 70-767: Implementing a Data Warehouse using SQL. If you don't know, there's a non-disclosure agreement for Microsoft exams, so I can't divulge particulars about the exam. But as Cathrine Wilhelmsen (b | t) has done, I wanted to share my experience studying and preparing for the exam.


What's Your Learning Style?

Dave Mason - Certification - Learning Style

I see the "What's your learning style?" question posed on social media from time to time, mostly from people in the SQL Server community. I rarely think about it, but I've been giving it some thought lately. In my completely unscientific estimation, when people in technical fields discuss their preferred style, the runaway top responses are learning by doing and learning by studying.


tempdb: Are We There Yet?

Dave Mason SQL Server tempdb

As a global resource, it can be challenging to manage [tempdb]. It's a broad topic, so for this post, I'll just focus on these two scenarios that leave [tempdb] out of space:

  • Maximum file size is limited and there is no more free space to allocate new pages.
  • Files are configured for unlimited growth and have consumed all available disk space.


SQL Server Features Discovery Report

Dave Mason SQL Server Features Discovery Report

I don't need to validate SQL Server installations on a regular basis. When the need arises, my preference is to run the SQL Server features discovery report. Further, I prefer to run it from the command line. After looking up command line parameters one too many times, I decided to script it out.


New For SQL Server 2017: T-SQL Function CONCAT_WS

Dave Mason SQL Server 2017 TSQL CONCAT_WS

In the last post, I looked at a new T-SQL function for SQL Server 2017. Let's continue down that path and look at CONCAT_WS(), which is also new for SQL Server 2017. Here's the definition of the function from Microsoft Docs:


New For SQL Server 2017: T-SQL Function TRIM

Dave Mason SQL Server 2017 TSQL TRIM

There's a new T-SQL function for SQL Server 2017 named TRIM(). If you're familiar with LTRIM() and/or RTRIM(), you can probably guess what it does. Here's the definition of the TRIM() function from Microsoft Docs:


STRING_AGG Return Types

Dave Mason SQL Server STRING_AGG

I had a chance to use the STRING_AGG function recently, or so I thought. Since I couldn't use it for "real world" work, I decided to give it a test drive on my own. My initial thought was to do some performance testing and blog about that, but I ran into an interesting problem that I'll discuss here for now.

I started by populating a table with some "string" data:


Formatting Dates with CONVERT

Dave Mason - SQL Server CONVERT

Displaying dates and times with different formats in TSQL is a task I run into quite a bit. I used to visit this page so many times, I'm surprised it doesn't have a "Welcome back, Dave!" banner on it at the top.


Installing SSRS 2017

Dave Mason SQL Server SSRS 2017

Back in 2017 before SQL Server 2017 reached its GA release, I wrote a post about installing multiple instances of SSRS on the same host. I used SQL Server 2017 RC2 to do my testing and provide some screen shots. But by the time the GA release of SQL 2017 arrived, the SSRS installation was decoupled from the main SQL Server installation package (much like SSMS 2017). I'd gotten a few questions and comments in the post asking about the "new" SSRS 2017 installation. I'll try to address that here, based on some brief installation testing.