How can I find the SQL Server CD key I used to install? It would be
great to get this information from my desktop.
As said the easy way is to get to the remote machines
registry key settings and search for the same. The location to look for this
CD key is:
More often than not this is not a feasible option. But
donot deter, here is a cool undocumented command that can help you get this
information from the registry. It is called the xp_regread . As
the name suggests its used to read the registry values.
EXEC xp_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\Microsoft SQL Server\80\registration',
I think the three parameters are self explanatory
seeing the registry key we have to access. Since this extended stored procedure
is un-documented. Use this with care. The systems adminsitrator can disable all
these stored procedures at your work place ... :) ... And Microsoft can remove
these stored procedures without warning.
Having seen the use of this extended procedure usage,
lets get one more important registry key. I've also been asked how can we find
the MDAC Version from the ISQLW window. And working on the
same logic here is the solution.
I think you should be able to decifer the appropriate
registry key we are trying to access.