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 signalman's hand passing a brass single-line token in a hoop to a train driver's gloved hand.

Application Locks With sp_getapplock: One Job at a Time

November 15, 2019
Pinal Dave
SQL Tips and Tricks
SQL Lock, SQL Server, SQL Server Agent, SQL Stored Procedure, SQL Transactions

Use sp_getapplock to serialize a job, compare transaction and session ownership, handle return codes, and inspect a two-session test.

Read More
Gouache painting of a brass rubber stamp beside a neat stack of blank paper sheets and a vermilion ink pad, with the top sheet unstamped

Error 21089: Log Shipping Jobs Need Sysadmin on the Monitor Server

October 21, 2019
Pinal Dave
SQL Tips and Tricks
Log Shipping, SQL Error Messages, SQL Server Agent, SQL Server Security

Error 21089 failed the Copy and Restore jobs of a log shipping setup. A Profiler trace showed the jobs raising the error on the monitor server. The SQL Server Agent startup account was not a sysadmin there.

Read More
Gouache painting of a still music room with a small vermilion music box beginning to turn on the bench

Idle CPU Condition in SQL Server Agent: How It Works

September 28, 2019
Pinal Dave
SQL Tips and Tricks
SQL CPU, SQL Server Agent, SQL Server Management Studio

The idle CPU condition tells SQL Server Agent when the CPUs are quiet enough to start a job. This post shows where to set it, how the two numbers work and how to create the schedule. It also reads the CPU history of your server in T-SQL, so you can choose values that the server can actually meet.

Read More
Gouache painting of a picket fence in a meadow with one vermilion picket leaning the opposite way

SQL Agent Job Backslash Puzzle: Why Both Rows Were Deleted

July 18, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Scripts, SQL Server Agent

A SQL Agent job backslash at the end of a comment line can turn a one row delete into a delete of the whole table. This puzzle sets up the job, explains the cause and tests the effect in T-SQL. It ends with a safe way to write the step.

Read More
A filling bathtub with a red float tied to a small brass bell on the rim.

Performance Condition Alerts: Warnings Before a Log File Fills

June 20, 2019
Pinal Dave
SQL Tips and Tricks
DBA, SQL Monitoring, SQL Server Agent, Transaction Log

Build performance condition alerts for log usage, tempdb free space, and blocking, with sensible delays and an operator response.

Read More
SQL SERVER - SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account

SQL SERVER – SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account

February 27, 2019
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Server Agent, SQL Server Security, SQL Server Services

My first gMSA test: SQL Service was not started automatically after server reboot, even with automatic startup set. Here is what the event log showed.

Read More
Retained completed fabric rolls are separate from unfinished work on a background loom.

SQL SERVER – T-SQL Script to Check SQL Server Job History

December 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL Server Agent

SQL Server Agent Job History can be queried from msdb. A New Zealand customer requested this report during our weekly health check.

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

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