I'm using SQL Server 2005. The compatibility leel has been set to 90 and I have the VIEW SERVER STATE permission .
But when I running SELECT top 10 * FROM SYS.DM_EXEC_QUERY_STATS
the client result an error :
Msg 208, Level 16, State 1, Line 1
Invalid object name 'SYS.DM_EXEC_QUERY_STATS'.
Anyone could help on this ? Thanks.
Get the below execyted by a sysadmin and try again.
GRANT VIEW SERVER STATE TO [youraccount]
Use your account to execute the below:
select * from sys.dm_exec_query_stats
If it dosen't work try after restarting the SQL Server service.
Thanks and Regards Alankar Chakravorty MCITP Database Administrator SQL Server 2008 MCITP Database Administrator SQL Server 2005
It works. Thanks a lot ：）
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?