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

Posted on : 29-05-2012 | By : Devi Prasad | In : Msg 4621

Share:

0


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]




References : Devi Prasad (sqlserverlearner.com)

Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.


Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.




Write a comment



Tags: , , ,