Index.CheckIndexWithResult Method
Tests the integrity of database pages that store the index.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Function CheckIndexWithResult As DataTable
'Usage
Dim instance As Index
Dim returnValue As DataTable
returnValue = instance.CheckIndexWithResult()
public DataTable CheckIndexWithResult()
public:
DataTable^ CheckIndexWithResult()
member CheckIndexWithResult : unit -> DataTable
public function CheckIndexWithResult() : DataTable
Return Value
Type: System.Data.DataTable
A DataTable object value that contains the error message generated by the integrity check.
Remarks
The CheckIndex method is implemented using the Transact-SQL DBCC CHECKTABLE WITH TABLERESULTS statement.
Note
Indexes based on the UserDefinedTableType object cannot be checked and running this method will generate an exception.
Examples
Creating, Altering, and Removing Indexes
See Also
Reference
Microsoft.SqlServer.Management.Smo Namespace