Muokkaa

Jaa


Set the Service Startup Account for SQL Server Agent (SQL Server Configuration Manager)

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.

The SQL Server Agent service startup account defines the Windows account that SQL Server Agent runs as, as well as its network permissions. This article describes how to set the SQL Server Agent service account with SQL Server Configuration Manager in SQL Server by using SQL Server Management Studio.

Limitations

By default, the SQL Server Agent service account is mapped to the default SQL Server Agent service SID (NT SERVICE\SQLSERVERAGENT), which is a member of the sysadmin fixed server role. The account must also be a member of the msdb database role TargetServersRole on the master server if multiserver job processing is used. The Master Server Wizard automatically adds the service account to this role as part of the enlistment process.

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

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.

Use SQL Server Management Studio

Set the Service Startup Account for SQL Server Agent

  1. In Registered Servers, select the plus sign to expand Database Engine.

  2. Select the plus sign to expand the Local Server Groups folder.

  3. Right-click the server instance where you want to set up the Service Startup Account, and select SQL Server Configuration Manager....

  4. In the User Account Control dialog box, select Yes.

  5. In SQL Server Configuration Manager, in the console pane, select SQL Server Services.

  6. In the details pane, right-click SQL Server Agent(server_name), where server_name is the name of the SQL Server Agent instance for which you want to change the service startup account, and select Properties.

  7. In the SQL Server Agent(server_name) Properties dialog box, in the Log On tab, select one of the following options under Log on as:

    • Built-in account: select this option if your jobs require resources from the local server only. For information about how to choose a Windows built-in account type, see Selecting an Account for SQL Server Agent Service.

      Important

      The SQL Server Agent service does not support the Local Service account in SQL Server Management Studio.

    • This account: select this option if your jobs require resources across the network, including application resources; if you want to forward events to other Windows application logs; or if you want to notify operators through e-mail or pagers.

      If you select this option:

      1. In the Account Name box, enter the account that will be used to run SQL Server Agent. Alternately, select Browse to open the Select User or Group dialog box and select the account to use.

      2. In the Password box, enter the password for the account. Re-enter the password in the Confirm password box.

  8. Select OK.

  9. In SQL Server Configuration Manager, select the Close button.