DP-300 Implement a secure environment Practice Question
Your company uses Azure SQL Database and needs to restrict access to a specific column containing credit card numbers. Only users with the 'CreditCardViewer' role should see the full number; others should see only the last four digits. Which feature should you implement?
⚠ Common exam trap
A common mix-up: candidates confuse Dynamic Data Masking with Column-Level Security (GRANT), not realizing that GRANT cannot partially reveal data—it only provides all-or-nothing column access, whereas DDM is designed specifically for partial obfuscation based on permissions.
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
✓
Dynamic Data Masking
Dynamic Data Masking (DDM) is the correct choice because it allows you to obfuscate sensitive data in query results without changing the underlying database. You can define a mask on the credit card column that shows only the last four digits to users without the 'CreditCardViewer' role, while users with that role can be granted the UNMASK permission to see the full value.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Always Encrypted
Why it's wrong here
Always Encrypted protects data at rest and in transit by keeping plaintext from the database engine, but authorised clients decrypt the full value; non-privileged users either cannot decrypt or see nothing. It provides no partial masking. Always Encrypted suits protecting sensitive columns from DBAs and Azure operators.
- ✗
Row-Level Security
Why it's wrong here
Row-Level Security filters which rows a user can retrieve, leaving every returned column value intact. It cannot substitute the last four digits for the full card number within a visible row. RLS is correct when users must see only their own rows, such as per-tenant or per-region data segregation.
- ✗
Column-level security with GRANT
Why it's wrong here
GRANT on a column controls who may SELECT it, but unauthorised users receive a permission error rather than a masked last-four-digits value. The requirement is partial disclosure, not denial. Column-level GRANT suits restricting access to sensitive columns entirely; Dynamic Data Masking returns the masked value to non-privileged users.
- ✓
Dynamic Data Masking
Why this is correct
Dynamic Data Masking applies masking rules at query time, so non-privileged users receive only the last four digits of the credit card column while CreditCardViewer role members see full values. This satisfies the requirement without altering stored data or duplicating the column.
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
One of 574 original DP-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.