The GUID of the user is stored in the SQL CONTEXT_INFO. All you have to do is to run this piece of code:
DECLARE @binUserGuid VARBINARY(128)
DECLARE @userGuid UNIQUEIDENTIFIER
SET @userGuid = 'GUID of the user you want to test'
SET @binUserGuid = CAST(@userGuid AS VARBINARY(128))
SET CONTEXT_INFO @binUserGuid
To clear the context info simply execute
SET CONTEXT_INFO 0x
I hope this helps those who are testing SQL queries for the CRM reports.
No comments:
Post a Comment