PartitionSchemeParameters 속성
PartitionSchemeParameter 개체의 컬렉션을 나타냅니다. 각 PartitionSchemeParameter 개체는 테이블에 정의된 파티션 구성표 매개 변수를 나타냅니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny, _
GetType(PartitionSchemeParameter))> _
Public ReadOnly Property PartitionSchemeParameters As PartitionSchemeParameterCollection
Get
‘사용 방법
Dim instance As Table
Dim value As PartitionSchemeParameterCollection
value = instance.PartitionSchemeParameters
[SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny,
typeof(PartitionSchemeParameter))]
public PartitionSchemeParameterCollection PartitionSchemeParameters { get; }
[SfcObjectAttribute(SfcContainerRelationship::ChildContainer, SfcContainerCardinality::ZeroToAny,
typeof(PartitionSchemeParameter))]
public:
property PartitionSchemeParameterCollection^ PartitionSchemeParameters {
PartitionSchemeParameterCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny,
typeof(PartitionSchemeParameter))>]
member PartitionSchemeParameters : PartitionSchemeParameterCollection
function get PartitionSchemeParameters () : PartitionSchemeParameterCollection
속성 값
유형: Microsoft.SqlServer.Management.Smo. . :: . .PartitionSchemeParameterCollection
테이블에 정의된 모든 파티션 구성표 매개 변수를 나타내는 PartitionSchemeParameter 개체입니다. 파티션 구성표 매개 변수는 파티션 구성표가 배치된 파일 그룹을 나타냅니다.
예
The following code example prints the ID of each partition scheme parameter for each AdventureWorks2008R2 table, if any have been defined.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
foreach (Table tb in db.Tables)
{
if (tb.PartitionSchemeParameters != null)
{
Foreach (PartitionSchemeParameter psp in tb.PartitionSchemeParameters)
{
Console.WriteLine(psp.ID);
}
}
else
{
Console.WriteLine("The " + tb.Name + " table has no defined partition scheme.");
}
}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")
Foreach ($tb in $db.Tables)
{
if ($tb.PartitionSchemeParameters -ne $NULL)
{
foreach ($psp in $tb.PartitionSchemeParameters)
{
Write-Host $pspi.ID
}
}
else
{
Write-Host "The" $tb.Name "table has no defined partition scheme."
}
}