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 caulking gun with a stuck cartridge holding up the work at its nozzle

Blocking Alert: A T-SQL Check for Sessions Blocked Too Long

September 6, 2023
Pinal Dave
SQL Tips and Tricks
Best Practices, Comprehensive Database Performance Health Check, SQL Server

Short blocking is normal. This check flags lock waits past a threshold and walks each chain to the session at the front of the line.

Read More
A pear tree trained flat against a brick wall, a finger tracing one branch from the trunk to a single pear.

Materialized Path Hierarchies: Storing the Path as a String

August 28, 2023
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL String, SQL Table Operation

Build a materialized path hierarchy in T-SQL, query descendants, calculate depth, and move a subtree without creating cycles.

Read More
A barnacle colony spreading across a dinghy hull with a finite strip of bare wood remaining

Forecasting the Disk-Full Date From a Daily File Size History

August 9, 2023
Pinal Dave
SQL Tips and Tricks
Disk, File format, SQL Server

Free space today cannot tell you when the drive fills up. Save daily file sizes and let a short query turn the growth into a date.

Read More
The Flight Connection Puzzle

SQL SERVER – The Flight Connection Puzzle

July 31, 2023
Pinal Dave
SQL Puzzle
CTE, SQL Server

Today we are going to see another such puzzle – The Flight Connection Puzzle. This blog post is going to be really fun blog post.

Read More
A shell bead necklace with repeated shell colors beside one specimen of each color

Running Distinct Counts: Working Around COUNT(DISTINCT) OVER

July 27, 2023
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

Your report wants unique customers so far, and SQL Server refuses COUNT(DISTINCT) over a window. Flag each first appearance and add up the flags instead.

Read More
A wisteria-covered pergola shading a garden table, a newly added chair already sitting in its shade.

Schema-Level Permissions: Granting on a Schema, Not Each Object

July 25, 2023
Pinal Dave
SQL Tips and Tricks
DBA, Schema, SQL Server, SQL Server Security

Apply schema-level permissions to a database role, include future tables automatically, separate internal data, and review grants.

Read More
A lawn bowls green with the jack in place, a bowl rolling toward it and a hand holding a measuring string.

Given-When-Then for Database Tests

July 24, 2023
Pinal Dave
SQL Tips and Tricks
Best Practices, Software Development, SQL Server, SQL Stored Procedure, Testing

Use Given-When-Then for readable database tests with known input, explicit THROW checks, and transaction rollback after each case.

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

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