I have received comment from Radha Goswami on my previous blog article SQL SERVER – 2008 – Activity Monitor is Empty – Fix Activity Monitor for All Users. Radha is facing following error when she is tring to grant permission to login.
Msg 4621, Level 16, State 10, Line 1
Permissions at the server scope can only be granted when the current database is master
Following image is I have recreated based on the above error message.
If you look at the database in use is AdventureWorks and when any server level persmission has to be granted the database in context should be of master database. Change the database used to master and it should fix the error.
Reference : Pinal Dave (https://blog.sqlauthority.com)
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Hi I have updated windows xp. But my sql 2005 userid password not working. Can you please help me??
I’m using the following SQL commend but got the error saying “can not find the login”. I’m using the windows AD group login.
GRANT VIEW ANY DEFINITION TO [PRCINS\SQL_READ_AgencyDataRepository_NJ_Model]
Msg 15151, Level 16, State 1, Line 2
Cannot find the login ‘PRCINS\SQL_READ_AgencyDataRepository_NJ_Model’, because it does not exist or you do not have permission.
There is a workaround for this, if the user wants to script the solution:
Incomplete solutions doesn’t help at all. You have just said to change your current database to master but then haven’t even thought to mention how to do that.
Here is how you can change the context to master.