Msg 297, Level 16, State 1, Line 1 The user does not have permission to perform this action.

Posted on : 29-05-2012 | By : Devi Prasad | In : Msg 297

1



Error Message:

Msg 297, Level 16, State 1, Line 1
The user does not have permission to perform this action.

Reason:
This error occurs when the user does not have permission to execute a specific query.

Example:
Revoke view state permission to user

REVOKE VIEW SERVER STATE TO user_name

You will get the error message 297 when you execute this query to fetch the index usage stats

select * from sys.dm_db_index_usage_stats

Fix/Resolution:
Provide the required permissions to the user.

GRANT VIEW SERVER STATE TO user_name

Note: replace user_name with the name of the user.




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: , , , ,