DP-300 Practice Question: Monitor, configure, and optimize database resources
You are deploying a new application on Azure SQL Database. The application requires that all connections use a specific login, 'AppUser', with the least privileges necessary. The login should only be able to execute stored procedures in the 'Sales' schema and should not have direct access to underlying tables. What should you do?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Create a database role, grant EXECUTE on the 'Sales' schema to the role, and add 'AppUser' to the role.
Creating a database role with EXECUTE permission on the 'Sales' schema grants execute on all stored procedures in that schema, adhering to least privilege. Option A is wrong because granting SELECT on the schema would give read access to underlying tables, which is not allowed. Option B is wrong because adding AppUser to the db_datareader role provides read access to all tables in the database, exceeding the required permissions. Option D is not wrong in terms of functionality but is more administrative work compared to using a schema-level grant; however, for the requirement of least privilege, granting EXECUTE on each stored procedure individually would still work but is less efficient than the schema-level approach.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Grant the SELECT permission on the 'Sales' schema to 'AppUser'.
Why it's wrong here
This grants read access to tables, which is not allowed.
- ✗
Add 'AppUser' to the db_datareader role.
Why it's wrong here
This grants read access to all tables, violating least privilege.
- ✓
Create a database role, grant EXECUTE on the 'Sales' schema to the role, and add 'AppUser' to the role.
Why this is correct
Schema-level EXECUTE permission grants execute on all stored procedures in the schema, meeting the requirement.
- ✗
Grant the EXECUTE permission on each stored procedure individually to 'AppUser'.
Why it's wrong here
Granting EXECUTE on each stored procedure individually satisfies the requirement for least privilege but fails to meet the scenario’s need for a single permission that covers all future procedures in the 'Sales' schema without manual updates. It is tempting because it is the most granular way to restrict execution rights, and it would be correct if the requirement were to limit access to a fixed, known set of procedures rather than to an entire schema.
Go deeper
Related to this question
Learn chapter
Overview of Azure Data Platform Options
Key term
Azure SQL Performance Tuning
Azure SQL Performance Tuning is the process of optimizing the speed and efficiency of queries and database operations in Microsoft Azure SQL Database or SQL Managed Instance to reduce latency and improve throughput.
About these practice questions
This DP-300 question is part of Courseiva's 906-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-300 exam.