Sqlserver-dba.com

sys.sysprocesses and permissions

Logging on as a logon with sysadmin Server roles   and executing the following sql statement :

 select * from sys.sysprocesses

 will return sysprocesses of all users on the server .

 Logging on as a logon with with db_datareader permissions on a database    and executing the following sql statement :

 select * from sys.sysprocesses

 will only return the users process.

 This is because , if a user does not have VIEW SERVER STATE permission on the server , the user will only view their own session.

 The syntax to grant permission is

 GRANT VIEW SERVER STATE TO user

Ref:Jack Vamvas (http://www.sqlserver-dba.com)

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact