Server
q : How do I use Transact-SQL to programmatically determine how many processors are in my SQL Server computer?
answer : The following statement returns the information you need:
EXEC Master.. xp_msver N ' ProcessorCount ',
N ' ProcessorType '
But I'm passionate about teaching people how to fish, rather than giving them a set of frozen fish bars, so I'm not content with simple answers. A colleague recently asked me this question and I can't think of a proper command, but I know that SQL Server Enterprise Manager displays the number of processors in the Processor tab of the SQL Server Properties dialog box. And, by running simple Transact-SQL statements on the server, enterprise managers can get almost all the information they need. In addition, running SQL Profiler can quickly see the statements generated by Enterprise Manager.
I often count the benefits of using SQL Profiler and observing SQL Server running, and here is another example of implementing this recommendation. With SQL Profiler, I only spent three minutes separating the calls from Enterprise Manager for xp_msver extended stored procedures. At this point, I always think of SQL Profiler first.
Turn from: Dynamic Network production guide www.knowsky.com