< Back

Get-AzureRmSqlDatabaseIndexRecommendations

Tue Jan 29, 2019 10:08 pm

NAME Get-AzureRmSqlDatabaseIndexRecommendations



SYNOPSIS

Gets the recommended index operations for a server or database.





SYNTAX

Get-AzureRmSqlDatabaseIndexRecommendations [-ResourceGroupName] <String> [-DatabaseName <String>] [-DefaultProfile <IAzureContextContainer>]

[-IndexRecommendationName <String>] -ServerName <String> [-TableName <String>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmSqlDatabaseIndexRecommendations cmdlet gets the recommended index operations for an Azure SQL Database server or database.





PARAMETERS

-DatabaseName <String>

Specifies the name of the database for which this cmdlet gets index recommendations.



Required? false

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



-IndexRecommendationName <String>

Specifies the name of the index recommendation that this cmdlet gets.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group that the server is assigned for. This cmdlet gets index recommendations for a database hosted by this

server.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

Specifies the server that hosts the database for which this cmdlet gets index recommendations.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TableName <String>

Specifies the name of an Azure SQL table.



Required? false

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



NOTES









Example 1: Get index recommendations for all databases on server



PS C:\\>Get-AzureRmSqlDatabaseIndexRecommendations -ResourceGroupName "ResourceGroup01" -ServerName "Server01"



This command returns index recommendations for all databases on server server01.





Example 2: Get index recommendations for a specific database



PS C:\\>Get-AzureRmSqlDatabaseIndexRecommendations -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"



This command returns index recommendations for specific database.





Example 3: Get a single index recommendation by name



PS C:\\>Get-AzureRmSqlDatabaseIndexRecommendations -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"

-IndexRecommendationName "INDEX_NAME"



This command returns single index recommendation by name.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... mendations

Start-AzureRmSqlDatabaseExecuteIndexRecommendation

Stop-AzureRmSqlDatabaseExecuteIndexRecommendation