Get-AzSqlDatabaseAdvisor
Obtém um ou mais Consultores para um Banco de Dados SQL do Azure.
Sintaxe
Get-AzSqlDatabaseAdvisor
[-AdvisorName <String>]
[-ExpandRecommendedActions]
-ServerName <String>
-DatabaseName <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlDatabaseAdvisor obtém um ou mais Consultores do Banco de Dados SQL do Azure para um Banco de Dados SQL do Azure.
Exemplos
Exemplo 1: Listar todos os consultores para o banco de dados especificado
Get-AzSqlDatabaseAdvisor -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner"
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DropIndex
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 7/31/2016 8:41:19 PM
RecommendationsStatus : Ok
RecommendedActions : {}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DbParameterization
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Default
LastChecked : 7/31/2016 2:46:58 PM
RecommendationsStatus : NoDbParameterizationIssue
RecommendedActions : {}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : SchemaIssue
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Default
LastChecked : 8/1/2016 3:01:41 PM
RecommendationsStatus : SchemaIsConsistent
RecommendedActions : {}
Este comando obtém listas de todos os conselheiros para o banco de dados chamado WIRunner que pertence ao servidor chamado wi-runner-australia-east.
Exemplo 2: Obter um único consultor para o banco de dados especificado
Get-AzSqlDatabaseAdvisor -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -AdvisorName "CreateIndex"
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {}
Este comando obtém o Advisor chamado CreateIndex para o banco de dados chamado WIRunner.
Exemplo 3: Listar todos os conselheiros com suas ações recomendadas incluídas na resposta
Get-AzSqlDatabaseAdvisor -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -ExpandRecommendedActions
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.236046]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.239359]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.437714]_6C7AE8CC9C87E7FD5893...}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DropIndex
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 7/31/2016 8:41:19 PM
RecommendationsStatus : Ok
RecommendedActions : {IR_[test_schema]_[test_table_0.0288891]_38724E1DCF2178318957,
IR_[test_schema]_[test_table_0.140264]_38724E1DCF2178318957,
IR_[test_schema]_[test_table_0.412191]_38724E1DCF2178318957,
IR_[test_schema]_[test_table_0.442075]_38724E1DCF2178318957...}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DbParameterization
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Default
LastChecked : 7/31/2016 2:46:58 PM
RecommendationsStatus : NoDbParameterizationIssue
RecommendedActions : {}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : SchemaIssue
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Default
LastChecked : 8/1/2016 3:04:26 PM
RecommendationsStatus : SchemaIsConsistent
RecommendedActions : {}
Este comando obtém todos os conselheiros para o banco de dados chamado 'WIRunner' com suas ações recomendadas incluídas na resposta.
Como o comando usa o parâmetro
Exemplo 4: Obter um único conselheiro com suas ações recomendadas incluídas na resposta
Get-AzSqlDatabaseAdvisor -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -AdvisorName "CreateIndex" -ExpandRecommendedActions
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {IR_[test_schema]_[test_table_0.0361551]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.236046]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.239359]_6C7AE8CC9C87E7FD5893,
IR_[test_schema]_[test_table_0.437714]_6C7AE8CC9C87E7FD5893...}
Este comando obtém o Advisor chamado CreateIndex do banco de dados chamado WIRunner com suas ações recomendadas incluídas na resposta.
Como o comando usa o parâmetro
Exemplo 5: Listar todos os consultores para o banco de dados especificado usando filtragem
Get-AzSqlDatabaseAdvisor -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -DatabaseName "WIRunner" -AdvisorName d*
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DropIndex
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Database
LastChecked : 7/31/2016 8:41:19 PM
RecommendationsStatus : Ok
RecommendedActions : {}
DatabaseName : WIRunner
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : DbParameterization
AdvisorStatus : PublicPreview
AutoExecuteStatus : Disabled
AutoExecuteStatusInheritedFrom : Default
LastChecked : 7/31/2016 2:46:58 PM
RecommendationsStatus : NoDbParameterizationIssue
RecommendedActions : {}
Este comando obtém listas de todos os conselheiros para o banco de dados chamado WIRunner que pertence ao servidor chamado wi-runner-australia-east e começa com a letra "d".
Parâmetros
-AdvisorName
Especifica o nome do consultor que esse cmdlet obtém.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | True |
-DatabaseName
Especifica o nome do banco de dados para o qual esse cmdlet solicita o Advisor.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o azure
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-ExpandRecommendedActions
Indica que esse cmdlet obtém as ações recomendadas com a resposta.
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ResourceGroupName
Especifica o nome do grupo de recursos do servidor que contém esse banco de dados.
Tipo: | String |
Position: | 0 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ServerName
Especifica o nome do servidor que contém o banco de dados.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
Entradas
Saídas
Notas
- Palavras-chave: azure, azurerm, arm, resource, management, manager, sql, database, mssql, advisor
Ligações Relacionadas
Azure PowerShell