Table.PhysicalPartitions 속성
Gets the physical partitions in which the table data is stored.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, GetType(PhysicalPartition))> _
Public ReadOnly Property PhysicalPartitions As PhysicalPartitionCollection
Get
‘사용 방법
Dim instance As Table
Dim value As PhysicalPartitionCollection
value = instance.PhysicalPartitions
[SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, typeof(PhysicalPartition))]
public PhysicalPartitionCollection PhysicalPartitions { get; }
[SfcObjectAttribute(SfcContainerRelationship::ChildContainer, SfcContainerCardinality::OneToAny,
typeof(PhysicalPartition))]
public:
property PhysicalPartitionCollection^ PhysicalPartitions {
PhysicalPartitionCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny,
typeof(PhysicalPartition))>]
member PhysicalPartitions : PhysicalPartitionCollection
function get PhysicalPartitions () : PhysicalPartitionCollection
속성 값
유형: Microsoft.SqlServer.Management.Smo.PhysicalPartitionCollection
A PhysicalPartitionCollection value that identifies the collection of physical partitions in which the table data is stored.
예
The following code example enumerates through each physical partition of each table in the AdventureWorks2012 database and displays the partitions row count.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];
foreach (Table tb in db.Tables)
{
Foreach (PhysicalPartition pt in tb.PhysicalPartitions)
{
Console.WriteLine(pt.RowCount.ToString());
}
}
Powershell
$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)
{
Foreach ($pt in $tb.PhysicalPartitions)
{
Write-Host $pt.RowCount
}
}
참고 항목
참조
Microsoft.SqlServer.Management.Smo 네임스페이스