TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

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
Full

Affinity is set for all the T: Microsoft.SqlServer.Management.Smo.NumaNode.CPU objects that belong to the NumaNode object.

None

Affinity is not set for any T: Microsoft.SqlServer.Management.Smo.NumaNode.CPU objects that belong to the NumaNode object.

Partial

Affinity is set for some but not all the T: Microsoft.SqlServer.Management.Smo.NumaNode.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 T:Microsoft.SqlServer.Management.Smo.NumaNodeAffinity.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();
        }
    }
}
Return to top
Show:
© 2016 Microsoft