Know your processor by XP_Instance_RegRead SP in SQL Server 2005/2008

Monday, July 11, 2011 |


XP_Instance_RegRead could be quite a useful extended stored procedure which ships with SQL Server 2005/2008.

Sometime it happens that you don’t know which processor your server is using and you want to know it; however, you don’t have physical access of the server than you can use following T-SQL to know those information.

EXEC master.dbo.xp_instance_regread
'HKEY_LOCAL_MACHINE',
'HARDWARE\DESCRIPTION\System\CentralProcessor\0',
'ProcessorNameString';

BTW, I have already written two articles before too with use of this kind of extended stored procedure.


XP_RegRead

Please note that if the user you are using to access SQL Server, wouldn’t have permission in OS to read registry, you will face an error rather than result.

Reference: Ritesh Shah

http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com

Ask me any SQL Server related question at my “ASK Profile

0 comments: