nerdexam
Microsoft

DP-300 · Question #285

Hotspot Question You have an Azure subscription that contains an instance of SQL Server on Azure Virtual Machines named SQLVM1 and a user named User1. SQLVM1 hosts a database named DB1. You need to…

The correct answer is Location:: msdb; Built-in role:: SQLAgentUserRole. This question tests knowledge of SQL Server Agent fixed database roles and where they are defined within the msdb system database, applying the principle of least privilege for job management.

Submitted by chen.hong· Mar 6, 2026Perform administration by using T-SQL

Question

Hotspot Question You have an Azure subscription that contains an instance of SQL Server on Azure Virtual Machines named SQLVM1 and a user named User1. SQLVM1 hosts a database named DB1. You need to ensure that User1 can perform the following tasks on DB1: - Create jobs. - View all jobs. - Modify, delete, and disable the jobs the user created. The solution must use the principle of least privilege. Which built-in database role should you assign to User1, and where is the role defined? To answer, select the appropriate options in the answer area. Answer:

Exhibit

DP-300 question #285 exhibit

Answer Area

  • Location:msdb
    DB1mastermsdb
  • Built-in role:SQLAgentUserRole
    SQLAgentOperatorRoleSQLAgentReaderRoleSQLAgentUserRole

Explanation

This question tests knowledge of SQL Server Agent fixed database roles and where they are defined within the msdb system database, applying the principle of least privilege for job management.

Approach. The correct built-in database role to assign is SQLAgentUserRole, defined in the msdb database. SQLAgentUserRole is the least privileged of the three SQL Server Agent fixed database roles (SQLAgentUserRole, SQLAgentReaderRole, SQLAgentOperatorRole). Members of SQLAgentUserRole can create jobs, view only their own jobs, and modify/delete/disable only the jobs they own - which exactly matches the requirements. The role is defined in the msdb database (not the user database DB1), because SQL Server Agent stores all job metadata in msdb. Assigning SQLAgentReaderRole or SQLAgentOperatorRole would grant more permissions than needed (e.g., viewing or modifying ALL jobs), violating least privilege.

Concept tested. SQL Server Agent fixed database roles (SQLAgentUserRole, SQLAgentReaderRole, SQLAgentOperatorRole) defined in the msdb database, and the principle of least privilege when granting job management permissions on SQL Server on Azure Virtual Machines.

Reference. https://learn.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles

Topics

#SQL Server Agent#Database roles#Least privilege#msdb database

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice