Tag: SQL Server Agent

  • List All SQL Agent Jobs in SQL Server

    This post provides a SQL script to list all SQL Server Agent Jobs on a Microsoft SQL Server instance. The sysjobs and sysjobsteps tables we are querying are in the M-S-D-B database. Fun fact, I am unable to publish a post with this actual database name without seeing…

    Read More


  • Include Execution Trace Messages in SQL Server Error Logs

    Execution trace messages in SQL Server Agent error logs can be helpful for diagnosing issues. This guide explains how to enable this option. Logs are always important if you’re supporting systems. The SQL Server Agent is used very often by DBA’s and Software Devs, so writing execution trace…

    Read More


  • Running Scheduled Tasks in SQL Server Express

    Running scheduled tasks in SQL Server Express requires an alternative approach since this edition lacks SQL Server Agent. Tasks like index maintenance, backups, or other recurring operations can be scheduled using Windows Task Scheduler. Below is a straightforward method to set up and execute such tasks using sqlcmd…

    Read More


  • Resolving “Index was out of range” in SSMS

    This post is here to help if you’ve encountered the following error while performing a task in SQL Server Management Studio (SSMS): Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index (mscorlib) In my experience, I’ve seen this…

    Read More