SQL Server Is there a way to grant EXECUTE permissions on server-level objects?

niwlg2el  于 2023-03-28  发布在  其他
关注(0)|答案(1)|浏览(134)

I have a user on a database which cannot have database-level permissions assigned to it seeing that they are wiped periodically but the user needs to execute on certain stored procedures within said database so that he can import data properly.

What I am currently doing is running GRANT EXECUTE ON certain.storeProcedure TO user every time the permissions are wiped, but this isn't the most elegant solution.

However, server-level permissions are not wiped in the same way. There is the Alter Database permission, but that is too broad for my needs.

Also, I did find this site , but I cannot parse the tables within it.

So my question is: Is there a way to emulate the database-level EXECUTE permission using server-level permissions while being as restrictive as possible?

svmlkihl

svmlkihl1#

Grant execute on an object is done at the database level. However, if the other solutions above don't work, you could set up a SQL job to re-set it each morning.

相关问题