< Back
Set-AzureRmSqlDatabaseRecommendedActionState
Post
NAME Set-AzureRmSqlDatabaseRecommendedActionState
SYNOPSIS
Updates the state of an Azure SQL Database recommended action.
SYNTAX
Set-AzureRmSqlDatabaseRecommendedActionState [-ResourceGroupName] <String> -AdvisorName <String> -DatabaseName <String> [-DefaultProfile
<IAzureContextContainer>] -RecommendedActionName <String> -ServerName <String> -State {Active | Pending | PendingRevert | RevertCancelled |
Ignored | Resolved} [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmSqlDatabaseRecommendedActionState cmdlet updates the state of an Azure SQL Database Recommended Action. This allows a recommended
action to be applied, reverted or discarded based on the new state.
PARAMETERS
-AdvisorName <String>
Specifies the name of the advisor for which this recommended action belongs to.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DatabaseName <String>
Specifies the name of the database for which this cmdlet sets the recommended action state.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RecommendedActionName <String>
Specifies the name of the recommended action for which state is being updated.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group of the server that contains this database.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the server the database is in.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-State <RecommendedActionState>
Specifies the new value to which this cmdlet updates the recommended action state.
The acceptable values for this parameter are:
- Active
- Pending
- PendingRevert
- RevertCancelled
- Ignored
- Resolved
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.RecommendedAction.Model.AzureSqlDatabaseRecommendedActionModel
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, sql, database, mssql, advisor, recommendedaction
Example 1: Apply a recommended action state to pending
PS C:\\>Set-AzureRmSqlDatabaseRecommendedActionState -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName
"WIRunner" -AdvisorName "CreateIndex" -RecommendedActionName "IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893" -State Pending
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
RecommendedActionName : IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893
Details : {[indexName, nci_wi_test_table_0.0361551_6C7AE8CC9C87E7FD5893], [indexType,
NONCLUSTERED], [schema, [test_schema]], [table, [test_table_0.0361551]]...}
ErrorDetails : Microsoft.Azure.Management.Sql.Models.RecommendedActionErrorInfo
EstimatedImpact : {ActionDuration, SpaceChange}
ExecuteActionDuration : PT1M
ExecuteActionInitiatedBy : User
ExecuteActionInitiatedTime : 4/21/2016 3:24:47 PM
ExecuteActionStartTime : 4/21/2016 3:24:47 PM
ImplementationDetails : Microsoft.Azure.Management.Sql.Models.RecommendedActionImplementationInfo
IsArchivedAction : False
IsExecutableAction : True
IsRevertableAction : True
LastRefresh : 4/21/2016 3:24:47 PM
LinkedObjects : {}
ObservedImpact : {CpuUtilization, LogicalReads, LogicalWrites, QueriesWithImprovedPerformance...}
RecommendationReason :
RevertActionDuration :
RevertActionInitiatedBy :
RevertActionInitiatedTime :
RevertActionStartTime :
Score : 2
State : Microsoft.Azure.Management.Sql.Models.RecommendedActionStateInfo
TimeSeries : {}
ValidSince : 4/21/2016 3:24:47 PM
This command updates the state of the recommended action named IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893 that belongs to the
database named WIRunner to Pending.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ctionstate
Get-AzureRmSqlServerAdvisor
Get-AzureRmSqlElasticPoolAdvisor
Get-AzureRmSqlServerRecommendedAction
Get-AzureRmSqlElasticPoolRecommendedAction
Set-AzureRmSqlElasticPoolRecommendedActionState
Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus
Set-AzureRmSqlElasticPoolRecommendedActionState
Set-AzureRmSqlServerRecommendedActionState
Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus
Set-AzureRmSqlServerAdvisorAutoExecuteStatus
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/
SYNOPSIS
Updates the state of an Azure SQL Database recommended action.
SYNTAX
Set-AzureRmSqlDatabaseRecommendedActionState [-ResourceGroupName] <String> -AdvisorName <String> -DatabaseName <String> [-DefaultProfile
<IAzureContextContainer>] -RecommendedActionName <String> -ServerName <String> -State {Active | Pending | PendingRevert | RevertCancelled |
Ignored | Resolved} [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmSqlDatabaseRecommendedActionState cmdlet updates the state of an Azure SQL Database Recommended Action. This allows a recommended
action to be applied, reverted or discarded based on the new state.
PARAMETERS
-AdvisorName <String>
Specifies the name of the advisor for which this recommended action belongs to.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DatabaseName <String>
Specifies the name of the database for which this cmdlet sets the recommended action state.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RecommendedActionName <String>
Specifies the name of the recommended action for which state is being updated.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group of the server that contains this database.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the server the database is in.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-State <RecommendedActionState>
Specifies the new value to which this cmdlet updates the recommended action state.
The acceptable values for this parameter are:
- Active
- Pending
- PendingRevert
- RevertCancelled
- Ignored
- Resolved
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.RecommendedAction.Model.AzureSqlDatabaseRecommendedActionModel
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, sql, database, mssql, advisor, recommendedaction
Example 1: Apply a recommended action state to pending
PS C:\\>Set-AzureRmSqlDatabaseRecommendedActionState -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName
"WIRunner" -AdvisorName "CreateIndex" -RecommendedActionName "IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893" -State Pending
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
RecommendedActionName : IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893
Details : {[indexName, nci_wi_test_table_0.0361551_6C7AE8CC9C87E7FD5893], [indexType,
NONCLUSTERED], [schema, [test_schema]], [table, [test_table_0.0361551]]...}
ErrorDetails : Microsoft.Azure.Management.Sql.Models.RecommendedActionErrorInfo
EstimatedImpact : {ActionDuration, SpaceChange}
ExecuteActionDuration : PT1M
ExecuteActionInitiatedBy : User
ExecuteActionInitiatedTime : 4/21/2016 3:24:47 PM
ExecuteActionStartTime : 4/21/2016 3:24:47 PM
ImplementationDetails : Microsoft.Azure.Management.Sql.Models.RecommendedActionImplementationInfo
IsArchivedAction : False
IsExecutableAction : True
IsRevertableAction : True
LastRefresh : 4/21/2016 3:24:47 PM
LinkedObjects : {}
ObservedImpact : {CpuUtilization, LogicalReads, LogicalWrites, QueriesWithImprovedPerformance...}
RecommendationReason :
RevertActionDuration :
RevertActionInitiatedBy :
RevertActionInitiatedTime :
RevertActionStartTime :
Score : 2
State : Microsoft.Azure.Management.Sql.Models.RecommendedActionStateInfo
TimeSeries : {}
ValidSince : 4/21/2016 3:24:47 PM
This command updates the state of the recommended action named IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893 that belongs to the
database named WIRunner to Pending.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ctionstate
Get-AzureRmSqlServerAdvisor
Get-AzureRmSqlElasticPoolAdvisor
Get-AzureRmSqlServerRecommendedAction
Get-AzureRmSqlElasticPoolRecommendedAction
Set-AzureRmSqlElasticPoolRecommendedActionState
Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus
Set-AzureRmSqlElasticPoolRecommendedActionState
Set-AzureRmSqlServerRecommendedActionState
Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus
Set-AzureRmSqlServerAdvisorAutoExecuteStatus
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/