TSQL Script to Display Agent Job History

It can be a bit time consuming to work through the the SQL Server Management Studio (SSMS) user interface to check on the agent job history to find specific agent jobs that have been run. To help speed that process up,

Posted in DBA Tagged with: , , , , , , ,

DBCC CheckDB All Databases

If you use the SQL Server maintenance plans to run DBCC Check DB, you are not allowed to include TempDB in your DBCC CheckDB sequence. For a while I was using maintenance plans, and ending up adding a separate job

Posted in Uncategorized Tagged with: , , ,

Advanced Common Table Expressions – 24 Hours of PASS

On Wednesday June 24th at 6:00pm pacific time or( 25 Jun 2015 01:00 GMT ) will be speaking at the 24HOP (24 Hours of Pass) conference which is broadcast online. I will be presenting on Advanced Common Table Expressions, and it is

Posted in CTE, CTE Book Tagged with: , , , , , ,

Week 5 – Winning Solution – Database Corruption Challenge

Find out more about the Week 5 Challenge on the overview blog post. The winning solution, was submitted by Patrick Flynn, just 3 hours and 18 minutes after the challenge was posted. Patrick provided me with the following steps, and TSQL

Posted in Uncategorized Tagged with: , , ,

An Awesome Day at SQL Saturday Redmond

Yesterday was SQL Saturday Redmond. It was a great day, I learned lots, met some great new people, and had a chance to catch up with some old friends. When most people hear about SQL Saturday for the first time,

Posted in Uncategorized Tagged with: , , , ,

TSQL JOIN Types – SQL Saturday

Today I am presenting at SQL Saturday in Redmond Wa. My presentation is on SQL JOIN types. If you have seen my JOIN Types Poster, you should check it out. Download the slides and sample TSQL code: JOINs.zip Topics Covered

Posted in SQL Saturday Tagged with: ,


After learning the INNER JOIN when querying SQL Server, the LEFT OUTER JOIN and RIGHT OUTER JOIN are often what people attempt to learn next. The reason that I say attempt is that most people don’t get OUTER JOINs right the

Posted in 70-461 Training Tagged with: , , , , , , ,

Simple Introduction to TSQL Cursors

Here is a 5 minute training with an overview of TSQL cursors, and how to get started with your first cursor on SQL Server. See Also: Live Training: Using Cursors and TSQL String Functions Last Weeks Training – Section 1

Posted in 70-461 Training Tagged with: , , ,

Today’s Live Training: Using Cursors and TSQL String Functions

Here is the outline: Using Cursors Using String Functions Here is the link to the Google On Air Broadcast where you can watch for free. https://plus.google.com/events/ci8jms67qttuteegimrf4sj70sk After the presentation, I will update this page with a link to the YouTube

Posted in 70-461 Training Tagged with: , , ,

Executing a TSQL batch multiple times using GO

Using the GO commend in TSQL to run a batch of code multiple times is something that I commonly do in demo’s and training’s.  What amazes me is how many people after the training will tell me that they didn’t know

Posted in SQL 2014, TSQL Tagged with: , , , , , , ,