A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Since the parameter @Rudy Aira _only is set to 1, when you execute sp_set_session_context first time it works. But when you change the value and execute the sp, you will get that error.
-- It works
EXEC sp_set_session_context 'MyName', 'Test1', @read_only = 1;
SELECT SESSION_CONTEXT(N'MyName') MyName;
But when you change the value to 'Test2' and execute it again in the same session, it will fail:
-- It fails
EXEC sp_set_session_context 'MyName', 'Test2', @read_only = 1;
SELECT SESSION_CONTEXT(N'MyName') MyName;
If you set @Rudy Aira _only to 0 or remove that parameter (default 0), it should work.