Expand Minimize
This topic has not yet been rated - Rate this topic

NumaNodeAffinity Enumeration

The NumaNodeAffinity enumeration defines the affinity states for a Cpu object.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
public enum NumaNodeAffinity
Member nameDescription
FullAffinity is set for all the CPU objects that belong to the NumaNode object.
NoneAffinity is not set for any CPU objects that belong to the NumaNode object.
PartialAffinity is set for some but not all the CPU objects that belong to the NumaNode object.

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

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.Full;
            dbServer.Alter();
        }
    }
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.