How to Determine SQL license information

  • I need to collect licensing information for SQL installation from around 50+ production boxes and i want it to do programmatically . 90% server are on 2005 or 2008

    Any idea how can i do this with minimum effort.

  • You could download the 14 day trial for Idera SQL Admin toolset which can get you that information quickly. I bought it for $200 and use it all the time. Otherwise you'll probably have to create a bunch of linked servers and a stored procedure to query that information.

  • This will get you the information for one server:

    select ServerProperty('LicenseType'), ServerProperty('NumLicenses')

    What I would do is to incorporate this into the SQLCMD command line utility, using the FOR /F dos command to read a text file of all servers to connect to and run this on, outputting the results to an output file.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • thanks a lot . I will try this out.

  • select ServerProperty('LicenseType'), ServerProperty('NumLicenses')

    works out for SQL 2000 but return

    Disable and Null for SQL 2005 and higher versions.

    Not sure why microsoft revoked these things.

  • SQL Server no longer tracks licensing information. You need to do that manually.

  • Lynn Pettis (4/20/2010)


    SQL Server no longer tracks licensing information. You need to do that manually.

    Thanks Lynn. I remember that now after reading it.

    Wonder why those parameters for ServerProperty still work then. I would think that there would be some mention of this in BOL about it.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (4/20/2010)


    Lynn Pettis (4/20/2010)


    SQL Server no longer tracks licensing information. You need to do that manually.

    Thanks Lynn. I remember that now after reading it.

    Wonder why those parameters for ServerProperty still work then. I would think that there would be some mention of this in BOL about it.

    My guess, support for SQL Server 2000 systems that are still out there.

  • Lynn Pettis (4/20/2010)


    WayneS (4/20/2010)


    Lynn Pettis (4/20/2010)


    SQL Server no longer tracks licensing information. You need to do that manually.

    Thanks Lynn. I remember that now after reading it.

    Wonder why those parameters for ServerProperty still work then. I would think that there would be some mention of this in BOL about it.

    My guess, support for SQL Server 2000 systems that are still out there.

    Backwards compatibility. That would be just about the sum of it.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 9 posts - 1 through 8 (of 8 total)

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