PartitionScheme 속성

테이블에 대해 구성된 파티션 구성표의 이름을 가져오거나 설정합니다.

이 API는 CLS 규격이 아닙니다. 

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
<CLSCompliantAttribute(False)> _
<SfcReferenceAttribute(GetType(PartitionScheme), "Server[@Name='{0}']/Database[@Name='{1}']/PartitionScheme[@Name='{2}']",  _
    )> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone)> _
Public Property PartitionScheme As String
    Get
    Set
‘사용 방법
Dim instance As Table
Dim value As String

value = instance.PartitionScheme

instance.PartitionScheme = value
[CLSCompliantAttribute(false)]
[SfcReferenceAttribute(typeof(PartitionScheme), "Server[@Name='{0}']/Database[@Name='{1}']/PartitionScheme[@Name='{2}']", 
    )]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone)]
public string PartitionScheme { get; set; }
[CLSCompliantAttribute(false)]
[SfcReferenceAttribute(typeof(PartitionScheme), L"Server[@Name='{0}']/Database[@Name='{1}']/PartitionScheme[@Name='{2}']", 
    )]
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone)]
public:
property String^ PartitionScheme {
    String^ get ();
    void set (String^ value);
}
[<CLSCompliantAttribute(false)>]
[<SfcReferenceAttribute(typeof(PartitionScheme), "Server[@Name='{0}']/Database[@Name='{1}']/PartitionScheme[@Name='{2}']", 
    )>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone)>]
member PartitionScheme : string with get, set
function get PartitionScheme () : String
function set PartitionScheme (value : String)

속성 값

유형: System. . :: . .String
테이블에 구성된 파티션 구성표의 이름을 지정하는 String 값입니다.

주의

The property specifies the name of the partition scheme. The PartitionSchemeParameters property lists the file groups that the partition scheme uses to store the table data.

The following code example prints the name of the partition scheme, if one exists, for each AdventureWorks2008R2 table.

C#

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

foreach (Table tb in db.Tables) 
{
   if (tb.PartitionScheme != "")
   {
      Console.WriteLine("The " + tb.Name + " table uses the " + tb.PartitionScheme + " partition scheme.");
   }
   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.PartitionScheme -ne "")
   {
      Write-Host "The" $tb.Name "table uses the" $tb.PartitionScheme "partition scheme."
   }
   else
   {
   Write-Host "The" $tb.Name "table has no defined partition scheme." 
   }
}