Include Execution Trace Messages in SQL Server Error Logs

📚My SQL Server writing continues at sqldba.blog, including the current take on SQL Server errors: the Error Library. This page stays as-is.

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 messages to the logs might be useful for investigating a random complex issue.

This guide follows the Microsoft Documentation page: Write Execution Trace Messages to the SQL Server Agent Error Log

Enabling the execution trace messages option comes with the following warning: it will make your error logs to become large in size, this should only be enabled during troubleshooting and disabled thereafter.

I’ve never enabled this before and discovered the option today. Hope this is useful!

Writing Execution Trace Messages to the SQL Agent Error Log

1. Open SQL Server Management Studio (SSMS).

2. Right-click SQL Server Agent within the SSMS Object Explorer.

SSMS SQL Agent Properties Selection

3. In the General tab, check the box for Include execution trace messages.

SSMS SQL Agent Properties

This feature is ideal for situations requiring detailed execution traces to identify specific SQL Server Agent problems. Once the issue is resolved, consider disabling this option to prevent excessive log growth.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for SQL Server?

This site started as a SQL Server blog in 2017 and the archive is still here. The new SQL Server writing, and all the scripts, moved to a site of their own.

sqldba.blogScripts, error library, wait types, SSMS
Browse by topic