共用方式為


NumaNode.AffinityMask 屬性

Gets or sets the affinity type for the NUMA node represented by this NumaNode object.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Property AffinityMask As NumaNodeAffinity 
    Get 
    Set
'用途
Dim instance As NumaNode 
Dim value As NumaNodeAffinity 

value = instance.AffinityMask

instance.AffinityMask = value
public NumaNodeAffinity AffinityMask { get; set; }
public:
property NumaNodeAffinity AffinityMask {
    NumaNodeAffinity get ();
    void set (NumaNodeAffinity value);
}
member AffinityMask : NumaNodeAffinity with get, set
function get AffinityMask () : NumaNodeAffinity 
function set AffinityMask (value : NumaNodeAffinity)

屬性值

型別:Microsoft.SqlServer.Management.Smo.NumaNodeAffinity
Returns a NumaNodeAffinity value that specifies the current state of this NUMA node.

備註

Trying to set the AffinityMask property to Partial will throw the exception: WrongPropertyValueException(NumaNodeAffinity cannot be set to Partial. Change the affinity setting to None or Full.).

範例

The following example shows how to set the affinity of the NUMA node to None for each NUMA node on the local instance of SQL Server.

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

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server("(local)");
            dbServer.Refresh();
            foreach (NumaNode node in dbServer.AffinityInfo.NumaNodes)
                node.AffinityMask = NumaNodeAffinity.None;
        }
    }
}

請參閱

參考

NumaNode 類別

Microsoft.SqlServer.Management.Smo 命名空間

NumaNodeAffinity