AZ-305 Design business continuity solutions Practice Question
Exhibit
Refer to the exhibit. ``` $rg = Get-AzResourceGroup -Name "myRG" $server = Get-AzSqlServer -ResourceGroupName $rg.ResourceGroupName -ServerName "myserver" $database = Get-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName "mydb" Set-AzSqlDatabaseBackupShortTermRetentionPolicy -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $database.DatabaseName -RetentionDays 7 ```
You are reviewing a PowerShell script for Azure SQL Database. The exhibit shows the script that sets backup retention. What is the effect of running this script?
⚠ Common exam trap
Many exam-takers confuse short-term retention (PITR) with long-term retention (LTR) or geo-redundancy, as candidates may misread the cmdlet name or assume any retention setting applies to all backup types.
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
✓
It sets the short-term backup retention to 7 days, enabling point-in-time restore within that period.
The script uses the `Set-AzSqlDatabaseBackupShortTermRetentionPolicy` cmdlet with `-RetentionDays 7`, which configures the short-term backup retention period for point-in-time restore (PITR) to 7 days. This allows restoring the database to any point within the last 7 days, as automated backups are retained for that duration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
It sets the short-term backup retention to 7 days, enabling point-in-time restore within that period.
Why this is correct
This is the correct interpretation: the cmdlet being reviewed is Set-AzSqlDatabaseBackupShortTermRetentionPolicy (or equivalent), which explicitly configures the short-term backup retention policy for an Azure SQL database. Setting the property to 7 days means automated backups (full, differential, and transactional log backups) are retained for 7 days, and point-in-time restore (PITR) can be performed to any point within that window. The default is 7 days, so this is a direct, deliberate setting of the PITR window. The parameter range for short-term retention is 1–35 days, and 7 is within that range.
- ✗
It enables geo-redundant backups for the database.
Why it's wrong here
This is incorrect because the cmdlet shown operates on the backup retention period in days, not on the storage redundancy or geo-replication configuration of backups. Geo-redundant backups are controlled at the server level via the BackupStorageRedundancy property (e.g., Geo, Zone, Local) or by choosing Geo-redundant storage (RA-GRS) when creating the server; a database-level retention policy does not affect whether backups are copied to a paired region. Simply changing retention from 7 to 7 or any number of days cannot enable geo-redundancy; that would require an explicit storage redundancy setting or a server-level configuration change. Therefore, this option misattributes a storage/deplyment setting to a retention setting.
- ✗
It sets the long-term retention (LTR) backup policy to 7 days.
Why it's wrong here
This is wrong because the cmdlet in question configures short-term retention (STR) for point-in-time restore, not long-term retention (LTR). LTR is a separate policy that retains full database backups for years, often configured via Set-AzSqlDatabaseBackupLongTermRetentionPolicy or the LTR backup APIs, and it typically involves weekly, monthly, or yearly backup cycles (with retention ranges like 1–10 years). A value of 7 days is within the STR recommended range (1–35 days) and is far too short for LTR, which is not expressed in days but in weeks, months, or years. Thus, interpreting a 7-day setting as LTR is a category error and does not reflect what the script does.
- ✗
It increases the backup retention from 7 to 35 days.
Why it's wrong here
This is incorrect because the script sets the short-term backup retention to exactly 7 days; it is not an incremental increase from 7 to 35 days. The Set-AzSqlDatabaseBackupShortTermRetentionPolicy cmdlet overwrites the current retention period with the specified value, so if the current setting were already 7, the command is effectively a no-op; it never multiplies or extends the period. A change to 35 days would require explicitly passing -RetentionDays 35, which is not present in this script. Moreover, the phrase 'increase' assumes an existing value lower than 7, but the default is 7, so this is a restatement, not an increase.
Go deeper
Related to this question
About these practice questions
This AZ-305 question is part of Courseiva's 212-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-305 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 AZ-305 exam.