Information.Processors Property
SQL Server 2008 R2
Gets the number of processors installed on the computer running the instance of SQL Server.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
