Solved

Simple Trigger to Send Email

Posted on 2004-09-07
4
1,860 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 250 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best Fit Equation for a Line 5 835
SyBase SQL DataTime Format 6 294
Backing up Sybase database Server using Veeam 3 1,135
Problems writing binary files to Sybase from PHP 2 183
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

785 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