AffinityInfo.Parent 속성

This gets the parent object of the AffinityInfo object. This value is the same as the Server object that contains the AffinityInfo member.

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

구문

‘선언
<SfcObjectAttribute(SfcObjectRelationship.ParentObject)> _
Public ReadOnly Property Parent As Server 
    Get
‘사용 방법
Dim instance As AffinityInfo 
Dim value As Server 

value = instance.Parent
[SfcObjectAttribute(SfcObjectRelationship.ParentObject)]
public Server Parent { get; }
[SfcObjectAttribute(SfcObjectRelationship::ParentObject)]
public:
property Server^ Parent {
    Server^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.ParentObject)>]
member Parent : Server
function get Parent () : Server

속성 값

유형: Microsoft.SqlServer.Management.Smo.Server
The parent Server object that contains the AffinityInfo object. If a parent does not exist then null is returned.

주의

Access to the AffinityInfo object is provided though the Server object.

This example displays the name of the Instance of SQL Server for the parent of the AffinityInfo member of the

Server object

using System;
using Microsoft.SqlServer.Management.Smo;

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server("(local)");

            dbServer.Refresh();

            Console.WriteLine("Server Name: {0}\n" +
                              "AffinityInfo.Parent: {1}",
                dbServer.Name,
                dbServer.AffinityInfo.Parent.Name);
        }
    }
}

Powershell

#Create the server. 
$dbServer = new-Object Microsoft.SqlServer.Smo.Server("(local)")
$dbServer.Refresh()

Write-Host "Server Name:" $dbServer.Name`n AffinityInfo.Parent: 
           $dbServer.AffinityInfo.Parent.Name

참고 항목

참조

AffinityInfo 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스