Skip to content

Instantly share code, notes, and snippets.

@arman-hpp
Created March 5, 2016 15:35
Show Gist options
  • Save arman-hpp/a414c3d66ed17b9aa55c to your computer and use it in GitHub Desktop.
Save arman-hpp/a414c3d66ed17b9aa55c to your computer and use it in GitHub Desktop.
SqlServer Context Info Business User
//http://jasondentler.com/blog/2010/01/exploiting-context_info-for-fun-and-audit/
DECLARE @Ctx varbinary(128)
SELECT @Ctx = CONVERT(varbinary(128), 'Arman')
SET CONTEXT_INFO @Ctx
DECLARE @CtxData varchar(128)
SELECT @CtxData = CONVERT(VarChar(128), CONTEXT_INFO())
PRINT @CtxData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment