AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.08.2017, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Afna CRM: Executing SQL queries in CRM database on behalf of another user
Источник: http://a-crm.blogspot.com/2017/08/ex...-database.html
==============

If you are using filtered views in SSMS it is not possible to see what data will be returned for other users. But there is a way!

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 =''
SET @binUserGuid =CAST(@userGuid ASVARBINARY(128))

SETCONTEXT_INFO @binUserGuid


From now on you will be able to query the data as if you would be logged in as another user.

To clear the context info simply execute

SETCONTEXT_INFO 0x


I hope this helps those who are testing SQL queries for the CRM reports.


Источник: http://a-crm.blogspot.com/2017/08/ex...-database.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 8 Blog bot Dynamics CRM: Blogs 1 30.04.2016 10:26
gustafwesterlund: 10 Tips for Success designing solutions for Dynamics CRM Blog bot Dynamics CRM: Blogs 0 03.12.2015 17:11
Microsoft Dynamics CRM Team Blog: Upgrading to the CRM 2013 User Experience Blog bot Dynamics CRM: Blogs 0 31.10.2013 06:12
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 11 Blog bot Dynamics CRM: Blogs 0 06.10.2012 05:27
crminthefield: Restoring a CRM database from SQL Enterprise to Standard Blog bot Dynamics CRM: Blogs 0 27.06.2011 21:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра
Комбинированный вид Комбинированный вид

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 15:45.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.