Getting CPU Core count for licensing

  • Geeks,

    I configured an SSIS package to collect information about servers in our environment and as a part of it the package collects the Physical and Logical CPU's. Since we are on per-core licensing for SQL Servers, i would need to get the exact core count. I can simply do Logical cpu / Physical CPU to get the Core count assuming that hyperthreading is turned on. What if the hyperthreading is not on, then i would end up getting the wrong Core count.

    I query the registry to get this info.

    I would like to get your inputs for getting the exact core count on Windows servers with Intel and AMD processors.

    Any help is highly appreciated.

    Thanks,

  • Take a look at:

    http://basitaalishan.com/2014/01/22/get-sql-server-physical-cores-physical-and-virtual-cpus-and-processor-type-information-using-t-sql-script/[/url]

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • Perfect, exactly what i wanted...!

  • Since this solution works for SQL 2005 and above, do have anything for SQL 2000 ? Unfortunately, few of our instances are still on SQL 2000 which are planned to be upgraded at a later time.

    I would need to find the core count for servers running on SQL 2000.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply