I am writing a script which sets Parameters in the Registry for SQL Server. The following works on some of my servers but not all.

@Parameters AS VARCHAR(MAX)
SET @Parameters = '-T1118'

SELECT  * FROM sys.dm_server_registry WHERE value_name LIKE 'SQLArg%' 
  AND CONVERT(VARCHAR(MAX),value_data) = @Parameters

The error was the CONVERT(VARCHAR(MAX),value_data). It has to be CONVERT(VARCHAR(6),value_data). Then it worked on all of them, since all the parameters I'm adding have 6 chars.

Now I'm trying to debug the error. So I press debug and see the parameters (altered script for this ofc) and see no difference. So I want to dig deeper into HEX to see what is going on. Press rightclick and press Hexadecimal Display... nothing.

So long story short: How can I see the HEX-Values of parameters in SSMS while debugging?

  • What exactly was "the error"? – Aaron Bertrand Dec 16 '15 at 14:56
  • editing to make it clearer. It doesnt show the hex values of the parameters – Bengelnatz Dec 16 '15 at 14:59
  • sorry @Aaron Betrand didn't read your question fully. The error was that it wouldn't select anything although on other servers is did and the value was extactly the same as @ Parameters – Bengelnatz Dec 16 '15 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.