sql server - SQL Grant Permission to SP_SEND_DBMAIL -


So I want to give permission to send a domain user access DB email. I've given access to system roll database malurizerroll using exec sp_addrolemember 'DatabaseMailUserRole', 'DOMAIN \ User' .

The strange thing is that when I impersonate Login (as login = login = 'DOMAIN' user), it now works. However, when I impersonate USER (as EXECUTE USER = 'DOMAIN \ user'), access failure is not denied.

What should be done to allow urls to enter?

I do not think you can do EXECUTE AS ("USER" in the description of the argument) From the documentation:

Specifies the context to impersonate A user in the current database is The scope of impersonation is restricted from the current database. A reference switch for the database user does not receive that user's server-level permissions.

(emphasis my) because this role is in MSDB, which constitutes a permission outside the database and does not promote it in this way. what are you trying to do?

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -