Database.CheckTablesDataOnly Database.CheckTablesDataOnly Database.CheckTablesDataOnly Method

Definition

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database.

Overloads

CheckTablesDataOnly() CheckTablesDataOnly() CheckTablesDataOnly()

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database.

CheckTablesDataOnly(RepairOptions) CheckTablesDataOnly(RepairOptions)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database, with the specified repair options.

CheckTablesDataOnly(RepairStructure) CheckTablesDataOnly(RepairStructure)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database with the specified repair structure.

CheckTablesDataOnly(RepairOptions, RepairStructure, Nullable<Int64>)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database with the specified repair options, repair structure and nullable Int64 value.

Remarks

This method is equivalent to the DBCC CHECKTABLE Transact-SQL command.

CheckTablesDataOnly() CheckTablesDataOnly() CheckTablesDataOnly()

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database.

public:
 System::Collections::Specialized::StringCollection ^ CheckTablesDataOnly();
public System.Collections.Specialized.StringCollection CheckTablesDataOnly ();
Public Function CheckTablesDataOnly () As StringCollection
Returns

A StringCollection object value that contains a report about the integrity of the tables in the database.

Examples

VB

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$db = New-Object Microsoft.SqlServer.Management.Smo.Database  
$db = $srv.Databases.Item("AdventureWorks2012")  

$sc = new-object System.Collections.Specialized.StringCollection  
$sc = $db.CheckTables([Microsoft.SqlServer.Management.Smo.RepairType]'None')  
$c = 0  
For ($c=0; $c -le $sc.Count - 1; $c++)  
{  
   Write-Host $sc.Item($c)  
}  

Remarks

This method is equivalent to the DBCC CHECKTABLE Transact-SQL command.

CheckTablesDataOnly(RepairOptions) CheckTablesDataOnly(RepairOptions)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database, with the specified repair options.

public:
 System::Collections::Specialized::StringCollection ^ CheckTablesDataOnly(Microsoft::SqlServer::Management::Smo::RepairOptions repairOptions);
public System.Collections.Specialized.StringCollection CheckTablesDataOnly (Microsoft.SqlServer.Management.Smo.RepairOptions repairOptions);
Parameters
repairOptions
RepairOptions RepairOptions RepairOptions

A RepairOptions object value that specifies the repair options, such as whether to perform an estimate only and what type of messages to include in the returned report.

Returns

A StringCollection object value that contains a report about the integrity of the tables in the database.

Examples

VB

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$db = New-Object Microsoft.SqlServer.Management.Smo.Database  
$db = $srv.Databases.Item("AdventureWorks2012")  

$sc = new-object System.Collections.Specialized.StringCollection  
$sc = $db.CheckTables([Microsoft.SqlServer.Management.Smo.RepairType]'None')  
$c = 0  
For ($c=0; $c -le $sc.Count - 1; $c++)  
{  
   Write-Host $sc.Item($c)  
}  

Remarks

This method is equivalent to the DBCC CHECKTABLE Transact-SQL command.

CheckTablesDataOnly(RepairStructure) CheckTablesDataOnly(RepairStructure)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database with the specified repair structure.

public:
 System::Collections::Specialized::StringCollection ^ CheckTablesDataOnly(Microsoft::SqlServer::Management::Smo::RepairStructure repairStructure);
public System.Collections.Specialized.StringCollection CheckTablesDataOnly (Microsoft.SqlServer.Management.Smo.RepairStructure repairStructure);
Parameters
repairStructure
RepairStructure RepairStructure RepairStructure

A RepairStructure object value that specifies the type of structural checks to perform, such as 'physical only' that checks the page consistency and allocation structures.

Returns

A StringCollection object value that contains a report about the integrity of the tables in the database.

Examples

VB

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$db = New-Object Microsoft.SqlServer.Management.Smo.Database  
$db = $srv.Databases.Item("AdventureWorks2012")  

$sc = new-object System.Collections.Specialized.StringCollection  
$sc = $db.CheckTables([Microsoft.SqlServer.Management.Smo.RepairType]'None')  
$c = 0  
For ($c=0; $c -le $sc.Count - 1; $c++)  
{  
   Write-Host $sc.Item($c)  
}  

Remarks

This method is equivalent to the DBCC CHECKTABLE Transact-SQL command.

CheckTablesDataOnly(RepairOptions, RepairStructure, Nullable<Int64>)

Tests integrity of data in pages that store data for all tables and indexes defined on the tables of the referenced database with the specified repair options, repair structure and nullable Int64 value.

public System.Collections.Specialized.StringCollection CheckTablesDataOnly (Microsoft.SqlServer.Management.Smo.RepairOptions repairOptions, Microsoft.SqlServer.Management.Smo.RepairStructure repairStructure, Nullable<long> maxDOP = null);
Parameters
repairOptions
RepairOptions RepairOptions RepairOptions

A RepairOptions object value that specifies the repair options, such as whether to perform an estimate only and what type of messages to include in the returned report.

repairStructure
RepairStructure RepairStructure RepairStructure

A RepairStructure object value that specifies the type of structural checks to perform, such as 'physical only' that checks the page consistency and allocation structures.

maxDOP
Nullable<Int64>

A maxDop object value that specifies the nullable Int64 value.

Returns

A StringCollection object value that contains a report about the integrity of the tables in the database.

Applies to