You manage an Azure SQL Managed Instance with a large database. You notice that the automatic tuning recommendations are not being applied. You need to ensure that automatic tuning is enabled for the instance. Which PowerShell cmdlet should you run?
Trap 1: Set-AzSqlDatabase with -AutoTuningProperties
Set-AzSqlDatabase is for Azure SQL Database, not Managed Instance.
Trap 2: Set-AzSqlInstance with -DtcEnabled
-DtcEnabled enables distributed transactions, not auto-tuning.
Trap 3: Set-AzSqlServer with -AdministratorLogin
This sets server admin, not auto-tuning.
- A
Set-AzSqlInstanceDatabase with -AutoTuningProperties
Set-AzSqlInstanceDatabase with -AutoTuningProperties configures automatic tuning at the individual database level on a Managed Instance, satisfying the requirement to enable it for the instance's database. Automatic tuning on Managed Instances is scoped per database, not instance-wide, so this cmdlet applies the CREATE INDEX, DROP INDEX and FORCE LAST GOOD PLAN settings directly.
- B
Set-AzSqlDatabase with -AutoTuningProperties
Why it fails: Set-AzSqlDatabase is for Azure SQL Database, not Managed Instance.
- C
Set-AzSqlInstance with -DtcEnabled
Why it fails: -DtcEnabled enables distributed transactions, not auto-tuning.
- D
Set-AzSqlServer with -AdministratorLogin
Why it fails: This sets server admin, not auto-tuning.