Table.PhysicalPartitions Table.PhysicalPartitions Table.PhysicalPartitions Property

정의

테이블 데이터가 저장된 물리적 파티션을 가져옵니다. Gets the physical partitions in which the table data is stored.

public:
 property Microsoft::SqlServer::Management::Smo::PhysicalPartitionCollection ^ PhysicalPartitions { Microsoft::SqlServer::Management::Smo::PhysicalPartitionCollection ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObject(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerRelationship.ChildContainer, Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcContainerCardinality.OneToAny, typeof(Microsoft.SqlServer.Management.Smo.PhysicalPartition))]
public Microsoft.SqlServer.Management.Smo.PhysicalPartitionCollection PhysicalPartitions { get; }
Public ReadOnly Property PhysicalPartitions As PhysicalPartitionCollection
속성 값

A PhysicalPartitionCollection 테이블 데이터가 저장 되는 물리적 파티션의 컬렉션을 식별 하는 값입니다. A PhysicalPartitionCollection value that identifies the collection of physical partitions in which the table data is stored.

예제

다음 코드 예에서는 AdventureWorks2012 데이터베이스에 있는 각 테이블의 각 실제 파티션을 열거하고 파티션 행 수를 표시합니다.The following code example enumerates through each physical partition of each table in the AdventureWorks2012 database and displays the partitions row count.

C#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());  
   }  
}  

PowershellPowershell

$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  
   }  
}  

적용 대상