June 23, 2011 at 1:12 am
Guys,
I have to add member details in one object to send mails at particular time. So at particular system time, sql server will automatically send numbers of mails to members. Members could be in large numbers.
So what is the best way to achieve that?
Thanks in advance.
June 23, 2011 at 1:48 am
How large is 'large'? Do you want to do this internally (ie, using your own network/Exchange infrastructure), or use a third party (which you might, if large really is LARGE)?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
June 23, 2011 at 1:50 am
One way is to create a job that has a schedule to run every x minutes, selects against your table where the row's date time matches the current date time AND where IsSent = 0, then do an sp_send_dbmail to actually send the notification.
Tasks like this are typically implemented in the middle tier of a business application (c# for example) to offload the CPU, exchange integration, etc. from the expensive-to-scale SQL Server. Especially if you expect to send lots of emails all the time. However, the above ought to work just fine.
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
June 23, 2011 at 3:33 am
June 23, 2011 at 3:42 am
There are above 50,000/ 1 Lac members. So do we need to create JOB and then schedule it? SO system will fire sp_send_dbmail from JOB?
June 23, 2011 at 8:04 am
Sagar Sawant (6/23/2011)
There are above 50,000/ 1 Lac members. So do we need to create JOB and then schedule it? SO system will fire sp_send_dbmail from JOB?
Yep.
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply