Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triggers calling external procedures

Status
Not open for further replies.

sifitz

Programmer
Feb 27, 2002
47
GB
Is there a way of using the triggers to call some code outside of SQL Server? I would like to send an email on a particular date in a table. I have been told that this can be done but I can't figure out how. Is it possible, or have I been told wrong?

Thanks

Si Fitz
 
For your particular question, it isn't necessary to call to external code to send mail, assuming that you are using a MAPI provider.

See the documentation on "SQL Mail" and xp_sendmail for more information on this.

If for some other reason you need to call external code, see xp_cmdshell to execute command line invokable code.

Alternatively, you can write your own extended stored procedures but you need to be really careful. Your custom extended stored procedure runs in the SQL Server address space and could cause SQL Server to fail or leak memory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top