Question 427 of 953
Implement a secure environmenthardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the database will log all successful and failed authentication attempts to the storage account for 90 days. This is because the command enables Azure SQL Database auditing and, by default, the AUDIT_SPECIFICATION includes the AUDIT_ALL action group, which captures both successful and failed logins, while the RETENTION_DAYS parameter set to 90 ensures logs are preserved for exactly that period before automatic deletion. On the Microsoft Azure Database Administrator Associate DP-300 exam, this scenario tests your understanding of how auditing configuration maps to retention and event capture, often appearing as a trick where candidates confuse retention with filtering or assume only failures are logged. A common trap is thinking AUDIT_ALL only records failures, but it explicitly captures both outcomes. Remember the mnemonic “ALL means ALL” — both success and failure are audited, and retention days dictate how long they stay in storage.

DP-300 Implement a secure environment Practice Question

This DP-300 practice question tests your understanding of implement a secure environment. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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 execute the following PowerShell command to set the auditing policy for an Azure SQL Database:

Set-AzSqlDatabaseAudit -ResourceGroupName "RG1" -ServerName "srv1" -DatabaseName "db1" -AuditActionGroup "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP" -StorageAccountResourceId $storage.Id -RetentionInDays 90

What will be the result of this command?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit. You execute the following PowerShell command to set the auditing policy for an Azure SQL Database:

Set-AzSqlDatabaseAudit -ResourceGroupName "RG1" -ServerName "srv1" -DatabaseName "db1" -AuditActionGroup "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP" -StorageAccountResourceId $storage.Id -RetentionInDays 90

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

The database will log all successful and failed authentication attempts to the storage account for 90 days.

The command configures SQL Database auditing to send audit logs to an Azure Storage account. By default, when auditing is enabled with the AUDIT_SPECIFICATION set to AUDIT_ALL (or the default audit action group), both successful and failed authentication attempts are logged. The RETENTION_DAYS parameter set to 90 ensures logs are retained for 90 days before being automatically deleted. Option A correctly describes this behavior.

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.

  • The database will log all successful and failed authentication attempts to the storage account for 90 days.

    Why this is correct

    AuditActionGroup specifies the events to log, and RetentionInDays sets the retention.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The database will log only failed authentication attempts to the storage account for 90 days.

    Why it's wrong here

    Both SUCCESSFUL and FAILED groups are specified.

  • The command will fail because the StorageAccountResourceId parameter is incorrect.

    Why it's wrong here

    The parameter is valid if $storage.Id is a valid resource ID.

  • The command will enable auditing for the server rather than the database.

    Why it's wrong here

    The cmdlet targets a specific database (db1).

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume auditing only logs failures by default, but the default audit action group includes both successful and failed logins, making Option A correct and Option B a common distractor.

Detailed technical explanation

How to think about this question

Under the hood, SQL Database auditing uses Extended Events to capture audit events, which are then written to Azure Blob Storage. The retention period is enforced by a scheduled cleanup job that deletes audit files older than the specified days. A subtle behavior is that if the storage account is in a different region, egress costs may apply, and the audit logs are stored in a container named 'sqldbauditlogs' with a folder structure based on database and server names.

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 media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

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: The database will log all successful and failed authentication attempts to the storage account for 90 days. — The command configures SQL Database auditing to send audit logs to an Azure Storage account. By default, when auditing is enabled with the AUDIT_SPECIFICATION set to AUDIT_ALL (or the default audit action group), both successful and failed authentication attempts are logged. The RETENTION_DAYS parameter set to 90 ensures logs are retained for 90 days before being automatically deleted. Option A correctly describes this behavior.

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.