Saturday, 1 January 2011

How to give select permission to account to see the only system databases table and DMVs or How to Grant Server State Permissions to User to query DMVs?



First create an user with Db_datareader permission and grant VIEW SERVER STATE permission

-- Syntax

USE master;
GO
GRANT VIEW SERVER STATE TO UserName;

GO

-- Example

USE master;
GO

GRANT VIEW SERVER STATE TO 'Fareast/TestReaderUser'

OR

GRANT VIEW SERVER STATE TO TestReaderUser



GO

Please comment belo if you know any other step to do the same. - Jainendra Verma