Export (0) Print
Expand All

CpuCollection.IsSynchronized Property

Gets a value that indicates whether the collection is synchronized with the instance of SQL Server.

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

public bool IsSynchronized { get; }

Property Value

Type: Boolean
Returns a boolean value. If true, the collection is synchronized with the instance of SQL Server.

Implements

ICollectionIsSynchronized

The following example shows how to determine whether the CpuCollection is synchronized with the instance of SQL Server.

C#

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

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server(".\\MSSQLG64");

            Console.WriteLine("CPU Collection {0} synchronized.\n",
                (dbServer.AffinityInfo.Cpus.IsSynchronized) ?
                "is" : "is not");
        }
    }
}

Powershell

$dbServer = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
If ($dbServer.AffinityInfo.Cpus.IsSynchronized = $TRUE)
{
   Write-Host "CPU Collection is synchronized."
}
Else
{
   Write-Host "CPU Collection is not synchronized."
}
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft