sql server execute as permission errors in trigger

后端 未结 3 837
灰色年华
灰色年华 2021-02-08 13:56

I have a trigger where I want to send out an email on updates to a row in a table SalesClosing. Now the user (dbuser) who execute the trigger has very limited permissions. So I

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-08 14:03

    Sending an email from a trigger is a bad idea. You don't want to be unable to make data changes if the email server is down.

    It is better to send the info for the email to another table which then sends the email from a periodically running job. One that runs say every five minutes.

    There is also something called Service Broker that I've not used before that can help out in this task, you might want to look at that.

提交回复
热议问题