Szerkesztés

Megosztás a következőn keresztül:


Write Execution Trace Messages to the SQL Server Agent Error Log

Applies to: SQL Server Azure SQL Managed Instance

Important

On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.

This topic describes how to configure Microsoft SQL Server Agent to include execution trace messages in its error log in SQL Server by using SQL Server Management Studio.

Before You Begin

Limitations and Restrictions

  • Object Explorer only displays the SQL Server Agent node if you have permission to use it.

  • Because this option can cause the error log to become large, only include execution trace messages in SQL Server Agent error logs when investigating a specific SQL Server Agent problem.

Security

Permissions

To perform its functions, SQL Server Agent must be configured to use the credentials of an account that is a member of the sysadmin fixed server role in SQL Server. The account must have the following Windows permissions:

  • Log on as a service (SeServiceLogonRight)

  • Replace a process-level token (SeAssignPrimaryTokenPrivilege)

  • Bypass traverse checking (SeChangeNotifyPrivilege)

  • Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)

For more information about the Windows permissions required for the SQL Server Agent service account, see Select an Account for the SQL Server Agent Service and Setting Up Windows Service Accounts.

To write execution trace messages to the SQL Server Agent error log

  1. In Object Explorer, click the plus sign to expand the server that contains the SQL Server Agent error log to which you want to write execution trace messages.

  2. Right-click SQL Server Agent and select Properties.

  3. In the SQL Server Agent Properties -server_name dialog box, under Error log on the General page, select the Include execution trace messages check box.

  4. Click OK.