Courseiva

DP-300 Implement a secure environment Practice Question

You are a database administrator for a retail company that uses Azure SQL Database. The security team wants to prevent SQL injection attacks by ensuring that all application queries use parameterized statements. Which built-in Azure feature should you enable to help detect and alert on potential SQL injection attempts?

⚠ Common exam trap

It's easy for candidates to confuse passive auditing or assessment features (which log or scan for vulnerabilities) with active threat detection that monitors and alerts on real-time attack patterns like SQL injection.

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

✓

Enable Microsoft Defender for SQL

Microsoft Defender for SQL includes advanced threat detection capabilities that continuously monitor database activity for anomalous patterns, including SQL injection attempts. When enabled, it analyzes query execution patterns and can alert on suspicious queries that deviate from parameterized statement usage, directly addressing the security team's requirement to detect and alert on potential SQL injection attacks.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable auditing on the database

    Why it's wrong here

    Auditing records executed statements and login activity to a storage or Log Analytics target, but it does not analyse query structure for injection patterns or raise alerts. Auditing suits compliance evidence and forensic review. Detecting injection attempts requires a feature that inspects query behaviour and flags suspicious patterns.

  • ✗

    Enable data discovery and classification

    Why it's wrong here

    Data discovery and classification labels columns containing sensitive data such as personal or financial information, supporting governance and masking decisions. It suits identifying where regulated data resides. It performs no query-pattern analysis, so it cannot detect or alert on SQL injection attempts against the database.

  • ✓

    Enable Microsoft Defender for SQL

    Why this is correct

    Microsoft Defender for SQL detects anomalous query patterns and injection attempts, raising alerts in Microsoft Defender for Cloud. It satisfies the requirement to detect and alert on potential SQL injection, rather than merely preventing it through parameterisation, which is an application-side coding practise outside Azure SQL Database's built-in controls.

  • ✗

    Enable SQL vulnerability assessment

    Why it's wrong here

    Vulnerability assessment scans database configuration, permissions and surface area against benchmarks, producing periodic reports. It suits hardening reviews and compliance baselines. It does not monitor live query traffic for injection patterns, so it cannot detect or alert on attempted SQL injection in real time.

Go deeper

Related to this question

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 →

How Courseiva writes practice questions · Editorial policy

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.