Table.TextFileGroup Property


Gets or sets the filegroup that is used to maintain long, variable-length data stored in the table.

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

[SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.ReadOnlyAfterCreation | SfcPropertyFlags.Standalone | SfcPropertyFlags.SqlAzureDatabase)]
public string TextFileGroup { get; set; }

Property Value

Type: System.String

A String value that specifies filegroup where long, variable-length data is stored in the table.

The following code example displays the long, variable-length data filegroup for each table in the database.


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

foreach (Table tb in db.Tables) 
   Console.WriteLine("The " + tb.Name + " contains " + tb.RowCountAsDouble + " rows.");


$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) 
   Write-Host "The " $tb.Name " text file group is " $tb.TextFileGroup "."
Return to top