This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A puppeteer's hands gathering a marionette's loose strings onto one wooden control bar

Finding Permissions Granted Directly to Users Instead of Roles

June 1, 2023
Pinal Dave
SQL Tips and Tricks
DBA, SQL Scripts, SQL Server Security

Find permissions granted directly to users, generate role-based review statements, and preserve DENY, column, and grant-option distinctions.

Read More
A squirrel mid-leap between two oak branches, the branch it slipped from on its first try still swaying.

Agent Job Step Retries: Retry Attempts and Retry Interval

October 11, 2022
Pinal Dave
SQL Tips and Tricks
DBA, SQL Scripts, SQL Server, SQL Server Agent

Configure Agent retry attempts and minute intervals, inspect retry history, and distinguish transient failures from unsafe replays.

Read More
A line of hilltop beacon fires along a coast at dusk, one beacon in the middle dark and unlit.

Heartbeat Gaps: Finding Missing Check-Ins With LAG

June 28, 2022
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Monitoring, SQL Scripts, SQL Server

Detect missing check-ins with LAG, report closed heartbeat gaps, and find silent or never-seen sources using an explicit UTC tolerance.

Read More
Gouache painting of three hourglasses side by side, the first with grey sand and the other two with vermilion sand

Database File Latency: Read and Write Stalls per IO

June 7, 2022
Pinal Dave
SQL Performance
Disk, SQL DMV, SQL Performance, SQL Scripts

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.

Read More
Gouache painting of a small wooden dollhouse with a closed door and a ring of keys hanging from a vermilion hook

ALTER AUTHORIZATION on a Database: Find and Change the Owner

May 3, 2022
Pinal Dave
SQL Tips and Tricks
SQL Login, SQL Scripts, SQL Server Security

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.

Read More
Gouache painting of a large picnic basket of bread and green apples beside a small neatly packed basket with a vermilion handle

Compressed and Uncompressed Backup: One Script, One Switch

March 21, 2022
Pinal Dave
SQL Tips and Tricks
Compression, SQL Backup and Restore, SQL Scripts

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.

Read More
Gouache painting of apple trees in an orchard with red apples and a small vermilion peg in the ground beside a lamp post

Gaps in an Identity Column: Find Missing Identity Values

February 28, 2022
Pinal Dave
SQL Tips and Tricks
SQL Identity, SQL Scripts, SQL Server

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.

Read More
Previous 1 2 3 4 5 6 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com