Regd SQL Server edition info

  • Hi frens,

    I need to know the edition of the installed SQL Server 2008 on my local system, through registry.

    Actually, as per the requirement, I am using this piece of code at the top of my program.. and even I am able to fetch this edition info using a WMI call successfully, but in case, WMI doesn't work then it may fail the whole system following this edition code. So, I am trying to fetch this info from a registry entry.

    Please let me know, where this edition info is available in registry as I searched a lot but unable to get the same.

    Thanks in advance.... 🙂

    Niraj

  • Can't help you with finding that info in the registry or via wmi.

    But it's easily available with the following query. Pick the value that best fits your need:

    select @@Version "version"

    ,serverproperty('Edition') "edition"

    ,serverproperty('ProductVersion') "productversion"

    ,serverproperty('ProductLevel') "productlevel"

    ;

    The @@ system variables and the serverproperty function have lots more info to choose from.

  • Hi,

    I think the @@Version provides the version details (Service Pack) of the OS. If we have different Service Packs for OS and SQL we can see the difference between by executing @@version and select serverproperty('ProductLevel')

    So you can go with the other three options.

    select serverproperty('Edition')

    select serverproperty('ProductVersion')

    select serverproperty('ProductLevel')

    Regards,

    MC

    Thanks & Regards,
    MC

  • Hi,

    thanks for your time and inputs 🙂

    Actually, I need to find this information at the very beginning of my code as its a pre requisite check for end users. So, after this valid check only, I'll be able to fire SQL queries on the system.

    Thanks,

    Niraj

  • Niraj-627298 (4/9/2010)


    Actually, I need to find this information at the very beginning of my code as its a pre requisite check for end users. So, after this valid check only, I'll be able to fire SQL queries on the system.

    You will still need to connect to SQL Server at some stage, so I don't see why you cannot use the methods already described...?

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

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