Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
624 views
in Technique[技术] by (71.8m points)

sql server - Send automated email

I want to send automated emails to UserType( requester, assignee ,reviewer,admin) based on an insert and.or update in Database.

EX:

A remainder email send to requester, assignee ,reviewer and admin if the reviewer is not able to review the data in 7 days from the date it is assigned to him/her.

I know I can do this with SQL JOB or with Windows Services. But I ma looking for different way to do this if possible and/or does SSIS provide such functionality?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think another option is to setup the trigger on insert/update of tables that need to be monitored then then called a stored procedure that use msdb.dbo.sp_send_dbmail to send out email.

You can look at the answer in this post for reference on how to send email using sp_send_dbmail. Sending Email in SQL Server 2008 R2. I hope that helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...