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

Share:

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
[sql]
REVOKE VIEW SERVER STATE TO user_name
[/sql]
You will get the error message 297 when you execute this query to fetch the index usage stats
[sql]
select * from sys.dm_db_index_usage_stats
[/sql]

Fix/Resolution:
Provide the required permissions to the user.
[sql]
GRANT VIEW SERVER STATE TO user_name
[/sql]
Note: replace user_name with the name of the user.




References : Devi Prasad (sqlserverlearner.com)

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.


Do you like my blog?

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




Comments (1)

thanks alot i had this problem and you helped me 🙂

Write a comment



Tags: , , , ,