Set-AzSqlDatabaseAdvisorAutoExecuteStatus
Modifies auto execute status of an Azure SQL Database Advisor.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzSqlDatabaseAdvisorAutoExecuteStatus
-AdvisorName <String>
-AutoExecuteStatus <AdvisorAutoExecuteStatus>
-ServerName <String>
-DatabaseName <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzSqlDatabaseAdvisorAutoExecuteStatus cmdlet modifies the auto execute property for an Azure SQL Database Advisor. Currently, this cmdlet supports the values Enabled, Disabled, and Default.
Examples
Example 1: Enable auto execute for an advisor
PS C:\>Set-AzSqlDatabaseAdvisorAutoExecuteStatus -ResourceGroupName "ContosoRunnersProd" -ServerName "runner-australia-east" -DatabaseName "ContosoRunner" -AdvisorName "CreateIndex" -AutoExecuteStatus Enabled
DatabaseName : ContosoRunner
ResourceGroupName : ContosoRunnersProd
ServerName : runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Enabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {}
This command changes the auto execute status of an advisor named CreateIndex to Enabled.
Parameters
Specifies the name of the advisor for which this cmdlet modifies the status.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the value for the status. The acceptable values for this parameter are:
- Enabled
- Disabled
- Default
| Type: | AdvisorAutoExecuteStatus |
| Accepted values: | Enabled, Disabled, Default |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the database for which this cmdlet modifies status.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the resource group of the server that contains this database.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the server for the database.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |