Category Archives: T-SQL
-
Who’s using that database?
Leave a commentMarch 9, 2015 by Kenneth Fisher
A common problem when trying to alter a database (take it offline, add a filegroup, whatever) is that someone else …
Continue reading -
Test your UPDATEs and DELETEs before you run them
14February 18, 2015 by Kenneth Fisher
This isn’t so much of a best practice, it comes more under the heading of being careful. Let’s say you …
Continue reading -
Tales of a DBA fed up with NOLOCK. Part 1
35February 16, 2015 by Kenneth Fisher
Nov 12, 2014 Dear Diary, They asked for help again. Every now and again everything slows down and they see …
Continue reading -
Dealing with layered function calls
4February 5, 2015 by Kenneth Fisher
T-SQL is not the best language in the world for formatting strings. It can be done, but typically you are …
Continue reading -
SQL Judo’s Monthly Challenge – February 2014 – KILL with the DAC
1January 26, 2015 by Kenneth Fisher
Every month SQL Judo (Russ Thomas) (b/t) challenges us to do his Monthly DBA Challenge. I’ve decided it would be …
Continue reading -
Constraint names, Say NO to the default
11January 21, 2015 by Kenneth Fisher
Have you ever seen a constraint with a name like PK__TableNam__EA185FBF8FF1529D? It’s kind of funny looking right? I mean it …
Continue reading -
Except and Intersect
5January 19, 2015 by Kenneth Fisher
EXCEPT and INTERSECT are two uncommon commands. Not that they do anything odd but they aren’t exactly well known in …
Continue reading -
Pagination in SQL Server
5January 15, 2015 by Kenneth Fisher
It amazes me how much easier certain tasks have gotten in SQL Server. I was watching the Nov 2014 SQL …
Continue reading -
Finding the reason for the error “Subquery returned more than 1 value”
1January 7, 2015 by Kenneth Fisher
First this type of error is because a subquery returned more than one row when it wasn’t allowed to. In …
Continue reading




