3

What level of rights would i need to execute the following query ?

SELECT S.*
FROM sys.dm_exec_requests R
INNER JOIN sys.dm_exec_sessions S
ON S.session_id = R.blocking_session_id

sys.dm_exec_sessions is a Dynamic Management view 

i am getting an error saying that it cant start debugger;

3
  • please tell me what is chatspeak ? Commented Jun 1, 2011 at 12:07
  • cos instead of because, etc Commented Jun 1, 2011 at 12:30
  • It isn't that we don't have a sense of humor, or that we want you to type a lot. But we discourage chatspeak because it is already difficult enough for people whose native language is not English to understand what we are saying here. Slang just makes it harder. Commented Jun 1, 2011 at 12:39

3 Answers 3

4

According to this very helpful article:

These DM Views are secured, since they might show information you'd rather not have available to everyone.

Grant the VIEW SERVER STATE permission for server-level and VIEW DATABASE STATE permissions for database-level Dynamic Management Views and Functions. It's usually best to create a Role and then grant the permissions to that.

GRANT VIEW SERVER STATE TO <<login name>>
Sign up to request clarification or add additional context in comments.

Comments

1

VIEW SERVER STATE

As per the relevant MSDN pages for the Dynamic Management Views: One, Two

Comments

-1

i hope you are using Debug instead of Execute(F5).

1 Comment

How is this answer relevant please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.