[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Question on Sql Server jobs

Posted on 2011-04-27
3
Medium Priority
?
217 Views
Last Modified: 2012-05-11
Our biz system uses SQL Server 2005 a the back end.

We would like to automatically email a link to a web survey to certain customers when there order completes.

The trigger in the database would be an invoice being generated (means the job is complete in our process.)

Can a SQL Server job be built to send an email such as this?  Can anyone point me to some info on creating these?  Thanks!
0
Comment
Question by:snyperj
3 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 total points
ID: 35476408
Yes. Look into .NET CLR stored procedures

http://msdn.microsoft.com/en-us/library/ms131094(v=SQL.90).aspx
0
 
LVL 9

Expert Comment

by:radcaesar
ID: 35476756
1. Create an .NET Application for your survey (Get input and save the user survey details).

2. Retrieve the order completed customers (Else any apps)

3. Send mail using xp_sendmail (with attachment of a html file with your survey application url) to the urls retrieved in step 1.

http://msdn.microsoft.com/en-us/library/aa155737(v=office.10).aspx
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 35481372
Hi,

1. Please configure DBMail in SQL SErver
2. Create TRigger on table which have a status of order (which is completed)
3. Send mail using db_sendmail SP to send mail.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question