exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 5 question 20 discussion

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

You deploy an instance of SQL Server on Azure Virtual Machines named VM1.

You need to create a SQL Server Agent job that will rebuild indexes of the databases hosted on VM1. The solution must use the principle of least privilege.

What should you create first?

  • A. a local Windows account
  • B. a user-assigned managed identity in Azure AD
  • C. a system-assigned managed identity in Azure AD
  • D. an Elastic Job agent
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
voodoo_sh
Highly Voted 1 year, 5 months ago
A. local Windows account The question does not say if tenant has Azure AD or is joined to domain, and also I don't see how SQL Agent needs system-assigned or user-assigned managed identity to run jobs on SQL Server ? I can see how local windows account is needed for SQL Agent service to run
upvoted 6 times
durdic
9 months, 3 weeks ago
Agree. As the target is just resources on the VM itself (analogy of on-prem), there should be no need to involve Azure managed identities which are meant to be used to access Azure resources. You can grant the local account its privileges for the intended purpose only.
upvoted 2 times
...
...
voodoo_sh
Most Recent 4 months, 3 weeks ago
Selected Answer: A
I vote for A, SQL Agent doesn't directly support managed identities.
upvoted 1 times
...
Vitos25
9 months ago
least privilege it's a user-asigned
upvoted 1 times
...
scottytohotty
11 months ago
Selected Answer: C
See Dalamain’s comment and article. I choose C
upvoted 1 times
...
Dalamain
1 year, 1 month ago
Some info here: https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview#managed-identity-types
upvoted 1 times
...
VikJo1978
1 year, 7 months ago
Selected Answer: C
C. Create a system-assigned managed identity in Azure AD. A system-assigned managed identity enables an Azure resource to identify itself to Azure AD. It can be used to access Azure resources and services without typically storing usernames and passwords in the code.
upvoted 1 times
...
igorclapa
1 year, 9 months ago
Careful guys, While a user-assigned identity is convenient as far as being able to assign it to multiple resources, this questions specifically refers to a SINGLE sql server on a SINGLE virtual machine. If this question was asking about how to rebuild indexes on multiple sql vm servers, then yes it would be better to leverage a user-assigned identity. My answer is C.
upvoted 3 times
...
testdumps2017
1 year, 9 months ago
should be user assigned managed identity. "User-assigned managed identities are more efficient in a broader range of scenarios than system-assigned managed identities. See the table below for some scenarios and the recommendations for user-assigned or system-assigned. User-assigned identities can be used by multiple resources, and their life cycles are decoupled from the resources’ life cycles with which they’re associated. Read which resources support managed identities." https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/managed-identity-best-practice-recommendations
upvoted 1 times
...
cadmus
1 year, 10 months ago
I think it should be user-assigned managed identity.
upvoted 1 times
...
U_C
2 years, 2 months ago
The answer is correct. C. a system-assigned managed identity in Azure AD should be created first to implement the principle of least privilege when creating a SQL Server Agent job that will rebuild indexes of the databases hosted on VM1. With a system-assigned managed identity, Azure automatically creates an identity in Azure AD that is tied to the Azure VM instance. This allows you to grant the identity permissions to the specific resources that it requires, without having to manage credentials or rotate passwords. Using a managed identity ensures that only the necessary permissions are granted to the job, which is in line with the principle of least privilege. The job can then use this managed identity to perform the required actions, such as rebuilding indexes.
upvoted 4 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 ...