Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple Trigger to Send Email

Posted on 2004-09-07
4
Medium Priority
?
1,942 Views
Last Modified: 2006-11-17
Is there an easy way to create a simple trigger in a Sybase ASA DB that when there is an INSERT on table X, a simple message is emailed to an address?

Thanks!
-Matt
0
Comment
Question by:mfarley
  • 3
4 Comments
 
LVL 14

Expert Comment

by:Jan Franek
ID: 11999922
Yes, if your server runs on Windows OS. Use xp_sendmail system extended procedure - see http://manuals.sybase.com/onlinebooks/group-as/asg1251e/sprocs for detailed info about parameters. And you need to set up Sybase to use mail - see http://manuals.sybase.com/onlinebooks/group-as/asp1250e/ntconfig.

If you are not on Windows, it's harder - you can write your own extended procedure in C to send mail or you can write an application that will fetch data from some table and sends mail based on fetched data.
0
 
LVL 14

Expert Comment

by:Jan Franek
ID: 11999929
Oooops sorry, I overlooked, that you are on ASA - my post is about ASE.
0
 
LVL 14

Accepted Solution

by:
Jan Franek earned 1000 total points
ID: 12000042
However, it seems like xp_sendmail exists in ASA as well (see ASA SQL reference / System objects / System procedures / System extended procedures - page 797 for version 9.0) and as it works with SMTP as well, you can probably use it even if you are not on Windows.
0
 

Author Comment

by:mfarley
ID: 12000422
Jan,

I just setup a test trigger that emails me exactly how I want it to -- Thanks to your help!

-Matt
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Take a look at these 6 Outlook Email management tools which can augment the working and performance of Microsoft Outlook to give you a more rewarding emailing experience.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

963 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