RE: Users with "VIEW SERVER STATE" only see current session



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
.



Relevant Pages

  • Re: Users with "VIEW SERVER STATE" only see current session
    ... I would after connecting verify that one really have sysadmins privileges, just to be certain that one connect using the login one believe... ... I should be able to see all sessions for all users on ... If my understanding is not correct, ... I would like to get a query something like the following to work: ...
    (microsoft.public.sqlserver.server)
  • Users with "VIEW SERVER STATE" only see current session
    ... If I login as sa or a user with "VIEW SERVER STATE" permission, and query ... I should be able to see all sessions for all users on ... If my understanding is not correct, ...
    (microsoft.public.sqlserver.server)
  • Re: Sum Times and Display Result - Access 97
    ... Some tasks get done in several sessions, and I would like to sum ... > and one called tblSession that links to it using TaskID. ... > I have created a Select query that goes like this: ...
    (microsoft.public.access.formscoding)
  • Re: Average of averages
    ... Hi Marcia ... I hope I'm understanding you correctly. ... In a *group* query, I think A. may not work but B. works. ... > intuitive as I worked on the report. ...
    (microsoft.public.access.reports)
  • Strange query help
    ... we can't just plonk that database back in the ... trying to make it work again, as a really, really long query. ... Join between that query and the sessions table to determine what sessions ... Access seems to be coughing on the Union Operation ...
    (microsoft.public.access.queries)