Export (0) Print
Expand All

Table.OnlineHeapOperation Property

Gets or sets the Boolean value that determines whether the table supports online heap or index operations.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public bool OnlineHeapOperation { get; set; }

Property Value

Type: Boolean
A Boolean value that specifies whether the table supports online heap or index operations.If True, the table supports online heap operations. Otherwise, False.

The following code example lists all of the tables in the AdventureWorks2012 database that support online heap operations.


Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];

foreach (Table tb in db.Tables) 
   if (tb.OnlineHeapOperation == True)
      Console.WriteLine("The " + tb.Name + " table supports online heap operations.");


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

Foreach ($tb in $db.Tables) 
   If ($tb.OnlineHeapOperation -eq $TRUE)
      Write-Host "The" $tb.Name "table supports online heap operations."
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft