Tag: SQL Server Agent

  • List All SQL Agent Jobs on a SQL Server Instance

    This post contains a SQL script that will return a list of 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. Interesting fact, I am unable to publish a post with this actual…

    Read More


  • Include Execution Trace Messages in SQL Server Error Logs

    Logs are always important if you’re supporting systems. The SQL Server Agent has always been a heavily used tool in my experience, so writing execution trace messages to the logs might help investigate an issue one day. This guide follows the Microsoft Docs page – Write 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


  • “Index was out of range” SQL Server Management Studio

    If you try to change the order of steps in an Agent Job within SQL Server Management Studio (SSMS), you may encounter the error “Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index (mscorlib)“. This error can occur…

    Read More