How can I use T-SQL to programmatically determine the number of processors that my SQL Server machine has?
The following command will return the information you need:
EXEC master..xp_msver N'ProcessorCount',
N'ProcessorType'
However, I'm a big fan of teaching people how to fish instead of giving them a plate of frozen fish sticks, so I can't possibly stop with that simple answer. When a colleague recently asked me this question, I didn't remember the name of ...