Cpu.ID 속성

Gets the ID of the CPU that is represented by this Cpu object.

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

구문

‘선언
Public ReadOnly Property ID As Integer 
    Get
‘사용 방법
Dim instance As Cpu 
Dim value As Integer 

value = instance.ID
public int ID { get; }
public:
property int ID {
    int get ();
}
member ID : int
function get ID () : int

속성 값

유형: System.Int32
An Int value that is assigned to the CPU represented by this Cpu instance.

주의

The ID member is read-only.

The following code example shows how to display the GroupID for each CPU on the local instance of SQL Server.

C#

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

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server("(local)");
            dbServer.Refresh();
            foreach (Cpu cpu in dbServer.AffinityInfo.Cpus)
            {
                Console.WriteLine("CPU ID {0} is {1}.",
                    cpu.ID, cpu.GroupID);
            }
        }
    }
}

Powershell

$dbServer = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$dbServer.Refresh()
Foreach ($cpu in $dbServer.AffinityInfo.Cpus)
{
   Write-Host "CPU ID:" $cpu.ID "is" $cpu.GroupID
}

참고 항목

참조

Cpu 클래스

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