Database.CheckAllocationsDataOnly Database.CheckAllocationsDataOnly Database.CheckAllocationsDataOnly Method

Definition

Scans all pages of the referenced database and tests only the data to help ensure integrity.

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

A StringCollection object value that contains a report about the allocations 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 CHECKALLOC Transact-SQL statement.

Applies to