Fix:VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’

Yesterday, one of the app user was complaining that he is not able to execute some of the queries and facing “VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’ . (Microsoft SQL Server, Error 300) ” error while executing the script. The screenshot of this error is given below.

SQL Server Error 300

Solution – Error 300

We got this error because the login you are using to execute the script doesn’t have VIEW SERVER STATE permission. To fix this issue we will grant view server state permission to the login name.

We can assign this permission either using GUI in SQL Server Management Studio or we can simply execute a T-SQL command to get this done. I will explain both ways to assign this permission.

Using GUI in SQL Server Management Studio

Follow below steps to do it using GUI.

  1. Launch SQL Server Management Studio.
  2. Connect to the SQL Server Instance.
  3. Navigate to Security folder then expand Logins
  4. Right Click at your login name and choose Properties
  5. Click at Securables tab from left side pane.
  6. In the bottom pane, scroll to the bottom and click at Grant option for View Server State value.
  7. Now click on apply to close the window. You can now ask your user to test the script again. This time it will work.

Using T-SQL statement in SQL Server Management Studio

  1. Launch SQL Server Management Studio. Connect to the SQL Server Instance.
  2. Open New Query window
  3. Run below T-SQL statement
USE master

Once you execute above command, you will have view server state permission on your login name.

I hope you like this article. Please follow our facebook page and Twitter handle to get latest updates.

Read More:

Follow me:

Manvendra Deo Singh

I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.
Manvendra Deo Singh
Follow me:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *