Export (0) Print
Expand All

NumaNode.AffinityMask Property

 

Applies To: SQL Server 2016 Preview

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

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public NumaNodeAffinity AffinityMask { get; set; }

Property Value

Type: Microsoft.SqlServer.Management.Smo.NumaNodeAffinity

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

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

Legacy Code Example

The following example shows how to set the affinity of the NUMA node to T: Microsoft.SqlServer.Management.Smo.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;
        }
    }
}
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft