RE: Users with "VIEW SERVER STATE" only see current session
- From: RJ <RJ@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Mar 2010 11:11:01 -0800
Your query as written works fine. I had a couple of jobs running under a
service account and another user executing a sp. All entries were returned.
Is it possible that you didn't have any active request at the time of
execution? or your SA login doesn't have full rights? (Some installations
don't allow sa to have full rights).
"Hagus" wrote:
If I login as sa or a user with "VIEW SERVER STATE" permission, and query.
sys.dm_exec_requests, I see only sessions < 50 and the session for the user
doing the query.
As I understand it, I should be able to see all sessions for all users on
the server. If my understanding is not correct, let me know. If my
understanding is correct, please advise how to resolve the situation.
I would like to get a query something like the following to work:
SELECT session_id, text
FROM sys.dm_exec_requests AS r
CROSS APPLY
sys.dm_exec_sql_text(sql_handle) AS s
WHERE session_id > 50
- Follow-Ups:
- Re: Users with "VIEW SERVER STATE" only see current session
- From: Tibor Karaszi
- Re: Users with "VIEW SERVER STATE" only see current session
- References:
- Prev by Date: Users with "VIEW SERVER STATE" only see current session
- Next by Date: Re: Sacramento, CA SQL Server group
- Previous by thread: Users with "VIEW SERVER STATE" only see current session
- Next by thread: Re: Users with "VIEW SERVER STATE" only see current session
- Index(es):
Relevant Pages
|