Invoke-SqlDatabaseCheck
Performs a database consistency check.
Syntax
Invoke-SqlDatabaseCheck [-database] <Database> [<CommonParameters>]
Detailed Description
The Invoke-SqlDatabaseCheck function performs a database consistency check of the specified database.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
database |
|
true |
true (ByValue) |
|
Input Type
None
You can pipe SMO Database objects to Invoke-SqlDatabaseCheck
Return Values
None
This function does not generate any output.
Notes
Performs the equivalent of a DBCC CHECKDB.
Examples
EXAMPLE 1
Get-SqlDatabase "Z002\sql2k8" "pubs" | Invoke-SqlDatabaseCheck
This command performs a database consistency check of the pubs database.