Courseiva

DP-300 Implement a secure environment Practice Question

You are the DBA for an Azure SQL Database named OrdersDB. The security team requires that you implement row-level security (RLS) to ensure that sales representatives can only view orders for their own region. You need to create a security policy that filters rows based on the sales representative's region. Which two actions should you perform? (Choose two.)

⚠ Common exam trap

The trap here is thinking that granting permissions or creating roles alone achieves row-level security, when the essential components are the predicate function and the security policy.

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 an inline table-valued function that returns 1 when the sales representative's region matches the row's region.

Row-level security in Azure SQL Database requires a predicate function that defines the filtering logic and a security policy that applies that function to the table. The inline table-valued function returns 1 when the row should be visible to the user, and the security policy adds a FILTER PREDICATE using that function. Together, they enforce that sales representatives only see orders for their region. Other actions do not implement RLS.

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 SELECT permission on the Orders table to all sales representatives.

    Why it's wrong here

    Granting SELECT permission alone does not enforce row-level security. Without a security policy and predicate function, sales representatives would see all rows. RLS requires the policy and function to filter rows based on user context, so this action is insufficient.

  • ✓

    Create an inline table-valued function that returns 1 when the sales representative's region matches the row's region.

    Why this is correct

    A predicate function is required for RLS. An inline table-valued function that returns 1 when the user's region matches the row's region is used as the filter predicate in the security policy. This function enforces the row filtering logic based on the current user's region.

  • ✓

    Create a security policy that adds a FILTER PREDICATE on the Orders table using the function.

    Why this is correct

    The security policy applies the filter predicate to the table. You must create a security policy and add a FILTER PREDICATE that references the inline table-valued function. This policy enforces row-level security by filtering rows that do not satisfy the predicate for the current user.

  • ✗

    Create a database role for each region and add sales representatives to the appropriate role.

    Why it's wrong here

    Creating roles and assigning users does not automatically filter rows. While roles can be used in the predicate function to determine the user's region, the core requirement is the security policy and function. This action alone does not implement RLS; it could be part of the logic but is not one of the two required actions.

  • ✗

    Enable Auditing on the Orders table to track access.

    Why it's wrong here

    Auditing tracks access but does not enforce row-level security. It is a monitoring feature, not a filtering mechanism. Enabling auditing would not restrict sales representatives to their own region's orders, so it does not satisfy the RLS requirement.

About these practice questions

This DP-300 question is part of Courseiva's 574-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.