I have to give Grant and With-Grant permission to a user in SQL Server

477 Views Asked by At

I am trying to set me as a grantor in SQL Server 2012.

I am logging into the database engine from my Windows account, then trying to give connect SQL (COSQ) permission to the other account, but after applying the settings, when I opened the properties of the other user (under securables), I see the grantor is sa instead of my own Windows account:

https://i.stack.imgur.com/STG9G.png

1

There are 1 best solutions below

1
On

GRANT… WITH GRANT says that the person to whom you granted the permission can also grant that permission to others. I think what you're looking for is GRANT… AS [«database principal»];. You should only have to do this if you want the grantor to be anyone but yourself.

To further complicate things, I would bet that you're in the db_owner group. If that's the case, what I think you're seeing is that the grantee is defaulting to the owner of the database (in this case, sa).

If I may ask, why do you want the grantee to not be sa?