Invoke-SqlIndexRebuild
Performs a reindex.
Syntax
Invoke-SqlIndexRebuild [-index] <Index> [<CommonParameters>]
Detailed Description
The Invoke-SqlIndexRebuild function performs a reindex operation on the specified index.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
index |
|
true |
true (ByValue) |
|
Input Type
None
You can pipe SMO Index objects to Invoke-SqlIndexRebuild
Return Values
None
This function does not generate any output.
Examples
EXAMPLE 1
Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-SqlTable -name authors | Get-SqlIndex | Invoke-SqlIndexRebuild
This command performs a reinidex of the authors table