Find permissions granted directly to users, generate role-based review statements, and preserve DENY, column, and grant-option distinctions.
Agent Job Step Retries: Retry Attempts and Retry Interval
Configure Agent retry attempts and minute intervals, inspect retry history, and distinguish transient failures from unsafe replays.
Heartbeat Gaps: Finding Missing Check-Ins With LAG
Detect missing check-ins with LAG, report closed heartbeat gaps, and find silent or never-seen sources using an explicit UTC tolerance.
Database File Latency: Read and Write Stalls per IO
Database file latency is the stall time per read or write. This post divides the IO stall columns by the call counts for every file, explains the zero queued columns and says when a number is worth acting on.
ALTER AUTHORIZATION on a Database: Find and Change the Owner
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 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.
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.







