Every DBA has faced SQL server error 300 on the daily works. The massage of error 300 is “VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’. (Microsoft SQL Server, Error: 300)”
The reason of the error is related with user permission on VIEW SERVER STATE. Some people experiences are linking this error also with older version of SQL Management studio.
This error may occur on different scenarios. 2 scenarios where I have faced this error is:
- Executing some query including system tables.
- Right click on table or any database
Also: Find SQL Server Version Query
SQL server error 300 solutions
Grant VIEW SERVER STATE permission to the user.
The first solutions is to execute an query where you will grand VIEW SERVER STATE to the user
USE MASTER
GO
GRANT VIEW SERVER STATE TO <USER>
Edit <USER> with the user that will be grand the permission on VIEW SERVER STATE.
After the execution of this query, the error 300 will not appear anymore on the SSMS of the user.
If you want to disable those rights use query below:
USE MASTER
GO
DENY VIEW SERVER STATE TO <USER>
Upgrade SQL Server Management studio
Other solutions that DBA are suggesting is upgrade of SQL Server Management studio with the same version like SQL Instance or higher. For Example if you have SQL 2016 Instance and SQL Server Management Studio 2012 you need to upgrade to SSMS 2016.
Read also other SQL Server Helping Posts:
When you using lower version of SSMS, some specific features cannot be used or does not work. Old SSMS cannot know for the new features and this is the reason that fails while trying to accessing the new features from old Management Studio.
Is always recommended to use lasts version of SSMS to connect with any different version of SQL Instance.