Question 143 of 953
Implement a secure environmentmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that this query returns failed login attempts to the database, including client IP and application name. This is because the query filters the `sys.dm_exec_sessions` dynamic management view for events where `action_id` = 'LGIF' (login failed) and `state` = 'ABORT' (indicating the login was aborted), then joins with `sys.dm_exec_connections` to capture the `client_ip` and `application_name` columns. On the Microsoft Azure Database Administrator Associate DP-300 exam, this tests your ability to distinguish between successful and failed authentication events using DMVs, a common scenario for troubleshooting connectivity issues. A frequent trap is confusing `state` = 'ABORT' with other states like 'INIT' or 'AUTH_COMPLETE', which represent different phases of the login process. Remember the mnemonic: "LGIF + ABORT = Locked Out Guest In Failure" to quickly recall that this combination specifically identifies failed login attempts at the database level.

DP-300 Implement a secure environment Practice Question

This DP-300 practice question tests your understanding of implement a secure environment. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit. You have an Azure SQL Database and you run the following KQL query in Azure Monitor:

AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "SQLSecurityAuditEvents"
| where action_id_s == "LGIF"
| project TimeGenerated, client_ip_s, application_name_s, succeeded_s

What does this query return?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit. You have an Azure SQL Database and you run the following KQL query in Azure Monitor:

AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "SQLSecurityAuditEvents"
| where action_id_s == "LGIF"
| project TimeGenerated, client_ip_s, application_name_s, succeeded_s

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

Failed login attempts to the database, including client IP and application name.

The query returns failed login attempts to the database, including client IP and application name. This is because the query filters for events where `action_id` = 'LGIF' (login failed) and `state` = 'ABORT' (indicating the login was aborted), and selects the `client_ip` and `application_name` columns from the `sys.dm_exec_sessions` DMV joined with `sys.dm_exec_connections` to capture client connection details. The `state` = 'ABORT' specifically identifies failed attempts, not successful logins or server-level events.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • All security audit events for the database.

    Why it's wrong here

    The query filters by action_id_s == 'LGIF', so only login failures.

  • Failed login events at the server level.

    Why it's wrong here

    The query is from AzureDiagnostics which can include database-level events; but LGIF is a login failure event that can occur at database level too.

  • Failed login attempts to the database, including client IP and application name.

    Why this is correct

    LGIF indicates login failure; the query returns the specified fields for those events.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Successful login events with client IP and application name.

    Why it's wrong here

    LGIF stands for login failed, not successful.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse the `state` = 'ABORT' filter with a general session state indicator, assuming it means the session was aborted for any reason (e.g., user disconnect), rather than recognizing it specifically denotes a failed login attempt in the context of `action_id` = 'LGIF'.

Detailed technical explanation

How to think about this question

Under the hood, `sys.dm_exec_sessions` tracks session-level events, and `action_id` = 'LGIF' corresponds to the login failed event in the SQL Server Extended Events engine, which is logged when authentication fails (e.g., wrong password or non-existent user). The `state` column in this context reflects the session state; 'ABORT' means the session was terminated due to the failure, while successful logins would show 'RUNNING' or 'SLEEPING'. A real-world scenario is auditing failed logins to detect brute-force attacks, where capturing `client_ip` and `application_name` helps identify malicious sources and applications.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DP-300 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DP-300 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DP-300 question test?

Implement a secure environment — This question tests Implement a secure environment — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Failed login attempts to the database, including client IP and application name. — The query returns failed login attempts to the database, including client IP and application name. This is because the query filters for events where `action_id` = 'LGIF' (login failed) and `state` = 'ABORT' (indicating the login was aborted), and selects the `client_ip` and `application_name` columns from the `sys.dm_exec_sessions` DMV joined with `sys.dm_exec_connections` to capture client connection details. The `state` = 'ABORT' specifically identifies failed attempts, not successful logins or server-level events.

What should I do if I get this DP-300 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.