Get-AzSqlDatabaseRecommendedAction
Ottiene una o più azioni consigliate per un database SQL di Azure Advisor.
Sintassi
Get-AzSqlDatabaseRecommendedAction
[-RecommendedActionName <String>]
-ServerName <String>
-DatabaseName <String>
-AdvisorName <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Descrizione
Il cmdlet Get-AzSqlDatabaseRecommendedAction ottiene una o più azioni consigliate per un database SQL di Azure Advisor.
Esempio
Esempio 1: Elencare tutte le azioni consigliate per un Advisor
Get-AzSqlDatabaseRecommendedAction -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -AdvisorName "CreateIndex"
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
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
RecommendedActionName : IR_[test_schema]_[test_table_0.236046]_6C7AE8CC9C87E7FD5893
Details : {[indexName, nci_wi_test_table_0.236046_6C7AE8CC9C87E7FD5893], [indexType, NONCLUSTERED],
[schema, [test_schema]], [table, [test_table_0.236046]]...}
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 : {SpaceChange}
RecommendationReason :
RevertActionDuration :
RevertActionInitiatedBy :
RevertActionInitiatedTime :
RevertActionStartTime :
Score : 3
State : Microsoft.Azure.Management.Sql.Models.RecommendedActionStateInfo
TimeSeries : {}
ValidSince : 4/21/2016 3:24:47 PM
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
RecommendedActionName : IR_[test_schema]_[test_table_0.239359]_6C7AE8CC9C87E7FD5893
Details : {[indexName, nci_wi_test_table_0.239359_6C7AE8CC9C87E7FD5893], [indexType, NONCLUSTERED],
[schema, [test_schema]], [table, [test_table_0.239359]]...}
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 : PT10S
RevertActionInitiatedBy : System
RevertActionInitiatedTime : 4/21/2016 3:24:47 PM
RevertActionStartTime : 4/21/2016 3:24:47 PM
Score : 3
State : Microsoft.Azure.Management.Sql.Models.RecommendedActionStateInfo
TimeSeries : {}
ValidSince : 4/21/2016 3:24:47 PM
Questo comando ottiene un elenco di tutte le azioni consigliate di Advisor denominato CreateIndex disponibile per il database denominato wi-runner-australia-east.
Esempio 2: Ottenere una singola azione consigliata per un Advisor
Get-AzSqlDatabaseRecommendedAction -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -AdvisorName "CreateIndex" -RecommendedActionName "IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893"
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
Questo comando ottiene l'azione consigliata denominata IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893 per Advisor denominato CreateIndex.
Parametri
-AdvisorName
Specifica il nome di Advisor per il quale questo cmdlet richiede azioni consigliate.
Tipo: | String |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-DatabaseName
Specifica il nome del database per il quale questo cmdlet richiede azioni consigliate.
Tipo: | String |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-DefaultProfile
Credenziali, account, tenant e sottoscrizione usati per la comunicazione con Azure
Tipo: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-RecommendedActionName
Specifica il nome dell'azione consigliata che ottiene questo cmdlet.
Tipo: | String |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-ResourceGroupName
Specifica il nome del gruppo di risorse del server che contiene il database.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-ServerName
Specifica il nome del server in cui si trova il database.
Tipo: | String |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
Input
Output
AzureSqlDatabaseRecommendedActionModel
Note
- Parole chiave: azure, azurerm, arm, resource, management, manager, sql, database, mssql, advisor, recommendedaction