List Failed SQL Server Agent Jobs, with Restart Command
Managing a large number of SQL Server instances, with many SQL Server Agent jobs on each instance, can provide a large amount of tedious work when many jobs fail simultaneously. For instance, if you run…
Log Backup Failures – Danger, Will Robinson!
For databases in Full Recovery Model, log backups should be taken at a frequency that ensures your recovery point objective can be met. So you schedule log backups to occur, setup email notifications so you…
Unreported SQL Server Agent Job Failures
SQL Server Agent provides an easy-to-configure framework for notifying DBAs when jobs fail to run for any reason. Unfortunately, there are circumstances where job failures may not result in SQL Server sending a notification. For…
Statistics update job
SQL Server statistics are extremely important for good query performance since they provide invaluable guidelines that allow the query optimizer to pick an optimal plan. Out-of-date or non-existent statistics objects can cause excessive I/O, poor…
SQL Server Agent Job Activity
SQL Server Agent provides a graphical user interface to inspect the status of agent jobs. The Job Activity Monitor looks like: However, if you want to programmatically obtain the detail about running jobs, including details…
Gaps between SQL Server Agent Jobs
For a busy server, with lots of SQL Server Agent Jobs, it can be difficult to determine the optimal time to perform maintenance with the least impact on other operations. The code below inspects the…