Error Message:

Msg 4621, Level 16, State 10, Line 1
Permissions at the server scope can only be granted when the current database is master

This message occurs when the Server scope permissions are tried to be modified from any other database other than master.

Example:
[sql]
USE AdventureWorksDW2008R2
GRANT VIEW SERVER STATE TO USER1
[/sql]

[sql]
USE AdventureWorksDW2008R2
REVOKE VIEW SERVER STATE TO USER2
[/sql]

Fix/Resolution:
Change the database to master.
[sql]
USE MASTER
GRANT VIEW SERVER STATE TO ABC
[/sql]

Leave a Reply

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