A DMV version of sp_who2 returns the same session details from documented views and leaves out the system tasks. This post builds the query, shows why the old spid above 50 filter fails, and stores the result in a temporary table.
Line Numbers for SSMS Efficiency – SQL in Sixty Seconds #147
This is when the line numbers in SSMS comes in extremely handy and let us learn in today’s blog post how we can do that. Let us learn today.
Finding Old Agent Jobs Not Run in Months or Never Scheduled
Review agent jobs not run recently or lacking schedules, combine history and activity, and disable approved candidates for review.
Slow Running Query – SQL in Sixty Seconds #146
One of the most popular questions I receive during Comprehensive Database Performance Health Check is if I have a script that lists Slow Running Query.
Convert Integer to Date in SQL Server: ddMMyyyy Values
To convert integer to date values such as 09122020, split the number into day, month and year and build the date from the parts. This post compares four methods on tested data, shows why a lost leading zero and the session language break two of them, and times them on a million rows.
Change Database and Table Collation – SQL in Sixty Seconds #145
I discussed the method to change the database and table collation with my client during the Comprehensive Database Performance Health Check.







