exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 2 question 30 discussion

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

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

You plan to schedule a SQL Server Agent job that will rebuild indexes of the databases hosted on VM1.

You need to configure the account that will be used by the agent. The solution must use the principle of least privilege.

Which operating system user right should you assign to the account?

  • A. Increase scheduling priority
  • B. Log on as a service
  • C. Profile system performance
  • D. Log on as a batch job
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
5 months, 1 week ago
Selected Answer: B
The account used for the SQL Server Agent service needs the "Log on as a service" user right. This permission allows the account to run as a service, which is essential for the SQL Server Agent to function properly. The "Log on as a batch job" user right is not required for the SQL Server Agent service. It is typically used for accounts that need to run batch jobs, such as scheduled tasks or scripts.
upvoted 1 times
...
JJJR
7 months ago
Selected Answer: B
I believe this to be B because of this: https://learn.microsoft.com/en-us/sql/ssms/agent/select-an-account-for-the-sql-server-agent-service?view=sql-server-ver16#windows-domain-account-permissions
upvoted 2 times
...
igorclapa
1 year, 2 months ago
For improved security, select This account, which specifies a Windows domain account. The Windows domain account that you specify must have the following permissions: In all Windows versions, permission to log on as a service (SeServiceLogonRight) https://learn.microsoft.com/en-us/sql/ssms/agent/select-an-account-for-the-sql-server-agent-service?view=sql-server-ver16
upvoted 1 times
...
[Removed]
1 year, 3 months ago
Selected Answer: B
"Log on as a service" is the minimum for the SQL Server Agent. And it is not specified if the rebuild will be in a batch or SQL script.
upvoted 1 times
...
bsk1983
1 year, 3 months ago
Selected Answer: B
SQL Agent services needs "log on as a service" local security policy to up and run SQL agent services which can be utilized to trigger any job including index job
upvoted 1 times
...
zafara55
1 year, 4 months ago
D is correct.
upvoted 1 times
...
vcloudpmp
1 year, 4 months ago
https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/job-automation-managed-instance?view=azuresql-mi if index-related task is a scheduled task, then batch user is the correct answer.
upvoted 1 times
...
viktor1229
1 year, 6 months ago
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) https://learn.microsoft.com/en-us/sql/ssms/agent/configure-sql-server-agent?view=sql-server-ver16
upvoted 4 times
...
amazonalex
1 year, 7 months ago
B is correct, because Log On as a Service is a required privilege for sql agent account. https://learn.microsoft.com/en-us/sql/ssms/agent/select-an-account-for-the-sql-server-agent-service?view=sql-server-ver16
upvoted 3 times
...
PMiao
1 year, 7 months ago
Selected Answer: D
To configure a SQL Server Agent job on an instance of SQL Server on Azure Virtual Machines (VMs) to rebuild indexes of the databases hosted on the VM, you need to assign the Log on as a batch job user right to the account that will be used by the agent. Therefore, the correct answer is D. Log on as a batch job.
upvoted 4 times
VikJo1978
1 year, 1 month ago
The answer is false. To configure a SQL Server Agent job on an instance of SQL Server on Azure Virtual Machines (VMs) to rebuild indexes of the databases hosted on the VM, you must assign the "Log on as a service" permission to the account that will be used by the agent. The "Log on as a batch job" permission is not required to run a SQL Server Agent job. It allows a user to log on as a batch job, which is not required to run SQL Server Agent jobs. Therefore, the correct answer is (B) Log on as a service.
upvoted 2 times
...
...
U_C
1 year, 8 months ago
Log on as a service: It determines which service accounts can register a process as a service. Log on as a batch job: When executing scheduled tasks in the context of a different user, SQL Server Agent will first create a new “batch logon session” that runs in the security context of this user. A batch logon session is a session created without any interaction from the user, as opposed to an “interactive” logon session, which is created when a user physically logs on to the machine. This permission enables SQL Server Agent to create a batch logon session. D is the correct answer.
upvoted 4 times
...
HENRYARDILA
1 year, 9 months ago
But the account should be a service account which will make sense "Log on as a service" B is correct
upvoted 2 times
...
HENRYARDILA
1 year, 9 months ago
Log as a Bach job is the way to proceed here.
upvoted 2 times
tsatsos
1 year, 8 months ago
Who is Bach, the singer?
upvoted 2 times
asduta
1 year, 5 months ago
He's a composer, not a singer
upvoted 2 times
ofzrgrz
1 year, 3 months ago
but at least J. Sebastian Batch was filling his audio data pipelines like crazy
upvoted 1 times
...
...
...
...
kkkiet
1 year, 9 months ago
D. Log on as a batch job
upvoted 2 times
kkkiet
1 year, 9 months ago
The "Log on as a batch job" user right is required for a user account to be able to run batch files or scripts, which is what SQL Server Agent uses to perform index rebuilds. By granting this right, the account will have sufficient privileges to perform the necessary actions, but no more than what is required for the specific task. The other user rights listed - "Increase scheduling priority", "Log on as a service", and "Profile system performance" - are not required for this particular task and would provide more privileges than necessary, violating the principle of least privilege.
upvoted 7 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 ...