ALTER AUTHORIZATION on a database changes its owner, and SUSER_SNAME(owner_sid) finds the current one. This post shows why a login that owns a database cannot be dropped and how to catch an orphaned owner.
Compressed Backup and Performance – SQL in Sixty Seconds #196
I was recently asked if I have a handy script that can help us take compressed backup and uncompressed backup. Backup and Performance
Query Store Interval Length: Choosing How Fine Your History Is
An hourly average can hide the slowdown users remember. Here is a small demo of Query Store interval length and how to choose it.
Compressed and Uncompressed Backup: One Script, One Switch
A compressed and uncompressed backup differ by one word. This post puts COMPRESSION and NO_COMPRESSION in one script with a switch, compares size and time, and shows that the restore statement is the same for both.
Agent Jobs Running Longer Than Usual: Finding Them in Job History
Find Agent jobs running longer than usual by decoding history durations, comparing current activity, and alerting against a baseline.
Find Missing Identity – SQL in Sixty Seconds #195
Today, we will discuss a very interesting topic about how to find missing identities from our database table. I have previously blogged.
Gaps in an Identity Column: Find Missing Identity Values
Gaps in an identity column come from deletes, rollbacks, failed inserts and the identity cache. This post finds them as ranges with LEAD, catches the tail with IDENT_CURRENT and lists single values with GENERATE_SERIES.







