In SQL Server, I want to restrict all users (except a few specific users) to send an email with attachment.
For example, someone import data into excel file and send it via mail using the sp_send_dbmail
procedure.
Can we restrict use of this procedure?
Or is there any other way to do it?
There are some users that have sysadmin permission, I want to restrict them too.
If it is not possible, at least I want to get notification when someone sends an email with attachment.
Trigger or procedure might work, but I could not get any result.