Patrick Keisler

PASS is Gone

On January 15, 2021, PASS will cease to exist. https://www.pass.org/PASS-Blog/ArticleID/888/ArtMID/99177/preview/true I cannot tell you how much this disappoints me. PASS has been around for my entire database career, and now it is gone. I would not be where I am today without PASS. PASS events helped see what I was missing while siloed at my previous company. It took me about 10 years before I really got involved with PASS, and once I did, I was hooked. I could not believe how many people wanted to share their SQL experiences with the world. As a result, I too wanted to...

Continue reading...

Management Studio Find & Replace Using Regular Expressions

In my last Management Studio tip, I demonstrated how you can drag and drop column names to a query window. The only part I do not like about that is that all the column names are on a single line. I prefer to have on column name per line, and to quickly fix this we are going to use a Regular Expression (RegEx) within the Find and Replace dialog box. For those not familiar with RegEx, it allows you to search through text using a multitude of options. In our example, we are going to use RegEx to quickly find...

Continue reading...

Management Studio Drag & Drop Column Names

Continuing on my recent trend of Management Studio tips, here is another that could save you a few minutes. In today’s scenario, we need to write a select statement that returns only the first few columns of a table. It is a super simple statement, but instead of typing out all the column names, we can just drag and drop them from the Object Explorer. Watch the video below for a quick demo.   If you are not a fan of the square brackets around each object name, then you can change the settings so they no longer appear. From...

Continue reading...

Management Studio Edit Multiple Lines at the Same Time

Have you ever had a need to edit multiple lines in a T-SQL script? As in, type the same text repeatedly on multiple lines? Well, a little-known key stroke makes this an easy task in Management Studio. Simply place your cursor where you want to start typing, hold down Alt+Shift and then hit either the Up or Down arrow key. You will then see a vertical blinking cursor. Now just start typing. You can even hit Enter which will add a new line in between each one where you can continue typing. Watch the video below for a quick demo.

Continue reading...

SQL Server Morning Health Checks – UPDATED!!!

A while back I wrote an article about how I created a PowerShell script for a customer to help them with their morning routine of checking the health of each SQL Server in their environment. I have not worked with that customer in a good while, but I thought it would be useful to update the script with some additional checks. The original script helps the DBA answer these questions: What is the uptime of each SQL Server? What is the status of each database? What is the status of each Availability Group? What is the backup status of each...

Continue reading...