Showing posts with label xp_msver. Show all posts
Showing posts with label xp_msver. Show all posts

Wednesday, March 21, 2012

Processor count

How do I get the value of Processor Count in a variable
from xp_msver?
DECLARE @.CPUS int
exec xp_msver N'CprocessorCount'
ThanksNot sure if xpmsver would support output parameters for that specific column
(I doubt it), so you could try this:
CREATE TABLE #xpmsver
(
a INT, b VARCHAR(32), c INT, d VARCHAR(255)
)
INSERT #xpmsver
EXEC master..xp_msver N'processorCount'
DECLARE @.CPUS INT
SELECT @.CPUS = CONVERT(INT, d) FROM #xpmsver
DROP TABLE #xpmsver
PRINT @.cpus
"Bubba Ole" <anoah@.canberra.com> wrote in message
news:00b001c38f40$69096c50$a101280a@.phx.gbl...
> How do I get the value of Processor Count in a variable
> from xp_msver?
> DECLARE @.CPUS int
> exec xp_msver N'CprocessorCount'
> Thanks|||Thanks a million!!!!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!