Hi All,
Do you really need to find out the Product Code of your SQL Server installation? You can use windows registry:
Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup
And look for key value ProductCode
Alternatively, you can use the undocumented stored procedure xp_regread, as follows:
USE master GO EXEC xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup','ProductCode' GO
Please note that all this is undocumented and unsupported so be careful when you browse the registry or use undocumented SPs. Play with your test installations only.
The registry path also depends on which version of SQL Server is installed and is it a fresh installation or an upgrade.
Hope you enjoyed reading this.
Regards
Rahul Sharma
Like us on FaceBook | Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook
Follow me on Twitter | Follow me on FaceBook
This blog makes no sense. In SQL 2005 there is no screen which would ask the product code. The real PID concept was started in SQL 2008 onwards.
Thanks a lot, this really helped me in finding the key for the 2014 version. very nice!