exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 2 question 31 discussion

Actual exam question from Microsoft's DP-300
Question #: 31
Topic #: 2
[All DP-300 Questions]

You have an Azure subscription that contains an instance of SQL Server on an Azure virtual machine named SQLVM1 and a user named User1. SQLVM1 hosts a database named DB1.

You need to ensure that User1 can create a scheduled task to perform a full backup of DB1. The solution must use the principle of least privilege.

Which built-in database role should you assign to User1?

  • A. db_owner
  • B. SQLAgentReaderRole
  • C. SQLAgentUserRole
  • D. SQLAgentOperatorRole
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
U_C
Highly Voted 1 year, 7 months ago
As Gocsan said, I tested by using his settings. Yes, SQLAgentUserRole can successfully backup the database from a scheduled job. The answer is C, SQLAgentUserRole.
upvoted 7 times
Pranava_GCP
1 year, 6 months ago
Tested the same, the answer is C, SQLAgentUserRole which the least privilege apply.
upvoted 1 times
...
...
voodoo_sh
Most Recent 4 months, 1 week ago
Selected Answer: C
The SQLAgentUserRole allows users to create and manage their own jobs but does not grant them access to jobs created by others. This role provides the necessary permissions without giving excessive privileges.
upvoted 1 times
...
erz
9 months, 1 week ago
Selected Answer: A
Unfortunately user need "to perform a full backup of DB1" and this is only possible with "db_owner" role. If the goal is to strictly adhere to the principle of least privilege, you would ideally create a custom role or grant specific permissions tailored to the exact needs of User1. User need write permision for backup. So, yes, question is successfully made confusing!
upvoted 1 times
...
NiazDawar
9 months, 1 week ago
Selected Answer: C
SQLAgentUserRole Control permission for job and schedules that they own. SQLAgentReaderRole All permission of SQLAgentUserRole plus permission to view the list of all available jobs and schedules. SQLAgentOperatorRole Permission to manage local jobs and schedules. View properties for operators and proxies and enumerate all available proxies and alerts
upvoted 2 times
NiazDawar
9 months, 1 week ago
Question is not clear well. but its seems the job is not belong to user1 hence user will be given "D-SQLAgentOperatorRole" permission to manage local jobs. Regarding "C - SQLAgentUserRole" if the jobs belong to user1 than it means that user1 already have SQLAgentUserRole role.
upvoted 1 times
...
...
yyc585
10 months ago
Selected Answer: C
Question is about least permissions. So Answer is C SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles. SQLAgentOperatorRole is the most privileged of the SQL Server Agent fixed database roles.
upvoted 1 times
...
[Removed]
1 year, 2 months ago
Selected Answer: C
SQLAgentUserRole can create jobs and schedules. It will miss db_owner or db_backupoperator to create the backup.
upvoted 2 times
...
klayytech
1 year, 2 months ago
Selected Answer: C
Operator for receiving the notifications, the answer is C
upvoted 2 times
...
klayytech
1 year, 3 months ago
Selected Answer: C
C, SQLAgentUserRole (least privilege)
upvoted 2 times
...
hussamAlHunaiti
1 year, 3 months ago
Operator for receiving the notifications, the answer is C
upvoted 3 times
...
SHABbirmohammed
1 year, 4 months ago
C, SQLAgentUserRole I did test this in the SQL server on Azure VM, You have to assign the user the db-Backupoperate role on the target database. SQLAgentUserRole is sufficient to create/schedule a sql agent job
upvoted 3 times
...
Antonee
1 year, 6 months ago
Selected Answer: C
C, SQLAgentUserRole (least privilege)
upvoted 4 times
...
U_C
1 year, 7 months ago
I just did real tests. All of these 3 roles, SQLAgentReaderRole, SQLAgentUserRole, and SQLAgentOperatorRole can NOT create a database backup if the user is NOT in the "db_backupoperator" role on the target DB. Those 3 roles only give the user to create a scheduled job but the user doesn't have the permission to create a DB backup. I got the following error: Executed as user: TESTER. The server principal "TESTER" is not able to access the database "sysdb" under the current security context. [SQLSTATE 08004] (Error 916) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed. You have to assign the user the db-Backupoperate role on the target database. If the user is in the db_owner role, the user can do the database backup but the user can not set up a scheduled job if it is not in one of those 3 SQLAgent Roles. It is supprise to me. If I am wrong, please let me know. Thanks
upvoted 3 times
...
Gocsan
1 year, 7 months ago
I've tested this out by actually setting up a test user that has db_backupoperator role on a test DB and has the SQLAgentUserRole role on the msdb DB. I then logged in as the test user to set up a scheduled job that performs a backup of the test DB. It succeeds, so the SQLAgentUserRole is all that is needed, which is the least privilege role.
upvoted 3 times
...
KIET2131
1 year, 8 months ago
Selected Answer: D
D. SQLAgentOperatorRole
upvoted 2 times
...
kkkiet
1 year, 8 months ago
D. SQLAgentOperatorRole The "SQLAgentOperatorRole" role allows the user to perform various SQL Server Agent operations, including creating and modifying jobs and schedules. This role provides the necessary permissions for User1 to create a scheduled task to perform a full backup of DB1, but no more than what is needed.
upvoted 1 times
...
alexatl
1 year, 9 months ago
If you use windows scheduled task for the backup effort, then the provided answer will make sense. But I am not sure if this is where this question is intended to go.
upvoted 1 times
...
Daemon69
1 year, 9 months ago
Correction: Ans: C
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago