December 16, 2009 at 10:58 am
Guys:
When am querying DMVs in queries like "select * from sys.dm_db_index_usage_stats"
am getting the following error.
Msg 297, Level 16, State 1, Line 2
The user does not have permission to perform this action.
What kind of access should i have to execute DMVs?
Thanks
December 16, 2009 at 11:04 am
NewBeeSQL (12/16/2009)
What kind of access should i have to execute DMVs?
Thanks
You need to have View Server State Permissions
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 16, 2009 at 11:05 am
December 16, 2009 at 11:20 am
NewBeeSQL (12/16/2009)
Thanks....how / where to set the permission?
Choose the Login, right click and select properties, go to Securables page and click Add, select you server, you should see a list of permissions, in which navigate to the bottom, you find View Server State. Select Grant.
Remember, if you are not given that permissions, then ask your DBA for the same, if it is you personal system you own it so it's you wish. 🙂
Refer SQL Server Books Online whenever you need such info also have a SQL Server Database Administration handy always.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 16, 2009 at 11:23 am
Thanks Bru..i donot have access to Server. i will ask DBA to set this permission..
December 16, 2009 at 11:27 am
The following doc would also be a good read:
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 16, 2009 at 1:08 pm
You'll also need VIEW DATABASE STATE for some of the DMV's.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply