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
Gouache painting: a still canal at dawn with four wooden barges moored in a row, each loaded with a stack of hay bales of a different height, the fourth barge still empty, and one vermilion ribbon tied to the nearest stack

percent_complete: Which Commands Show Real Progress

December 31, 2020
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL DMV, SQL Monitoring, SQL Server DBCC

percent_complete tells you how far a running command has come, but only some commands fill it in. This post times eleven commands on SQL Server 2025, shows which ones report real progress and which stay at 0, and adds a way to watch the silent ones.

Read More
Gouache painting of a row of grey-blue birds on a wire with two vermilion birds among them above a quiet village road

Parameters of sp_who2: Active, Session ID and the Login Trap

December 29, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server

The parameters of sp_who2 are one optional value that can be a session ID, the word active or a login name. This post counts the rows each form returns, shows that the login form does not filter, and explains the errors.

Read More
Gouache painting of a muffin tin holding one seashell in each cup with one vermilion shell

Capture sp_who2 Output Into a Table With INSERT EXEC

December 17, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server, Temp Table

To capture sp_who2 output, create a table with matching columns and fill it with INSERT EXEC. This post builds the table, captures the session list three times with a time stamp, and shows the two errors that stop the method.

Read More
Gouache painting of a leaf under an old brass magnifying glass and a new lens with a vermilion rim

DMV Version of sp_who2: A Cleaner Session List

December 16, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Performance, SQL Scripts, SQL Server

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.

Read More
A burning candle with an iron nail in its side above a pewter dish, a red ribbon below.

Alerting on Long-Running Queries With a SQL Agent Job

October 26, 2020
Pinal Dave
SQL Performance
Database Mail, SQL DMV, SQL Monitoring, SQL Server, SQL Server Agent

Alert on long-running queries with a five-minute SQL Agent job, a deduplicated log, and one Database Mail notice per new request.

Read More
An empty coastguard lookout hut on a cliff while a vermilion distress flare arcs over the sea.

SQL Agent Operators and Notifications: Who Gets the Alert

September 26, 2020
Pinal Dave
SQL Tips and Tricks
Database Mail, DBA, SQL Monitoring, SQL Server Agent

Configure SQL Agent operators, connect jobs and alerts to email notifications, test delivery, and verify notification evidence.

Read More
A sewing machine with a half-finished seam, a hand pulling the fabric free with a loose thread still attached

Finding Queries the Application Cancelled With Attention Events

July 14, 2020
Pinal Dave
SQL Performance
Query Store, SQL Extended Events, SQL Monitoring, SQL Server

Capture attention events for canceled requests, read event-file XML, compare Query Store aborts, and inspect transaction cleanup.

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

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