Solomon Rutzky shows what happens when you don’t set CONTEXT_INFO
quite right:
Let’s say that you execute the following T-SQL:
SET CONTEXT_INFO 1234; SELECT CONVERT(INT, CONTEXT_INFO());The result will be:
0Why is that?
There is an answer which makes sense, but it’s easy to be caught unawares.