Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sending mail from Ms-sql

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-29 : 09:31:17
Tapan Desai writes "Want to send mail to perticular admin when ever and instertion occur in my database. so how i can do this using MS-SQL.

I am using SQL-2000."

SQLServerDBA_Dan
Aged Yak Warrior

752 Posts

Posted - 2002-03-29 : 10:38:45
quote:

Tapan Desai writes "Want to send mail to perticular admin when ever and instertion occur in my database. so how i can do this using MS-SQL.

I am using SQL-2000."



Lookup XP_SendMAIL in Books Online.

Then if this is a table that doesnt matter about performance (a table that contains error messages or something like that) you might be able to use a trigger to send mail to the admin using the xp_sendmail command...

Daniel
SQL Server DBA
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-03-29 : 18:30:28
quote:
Then if this is a table that doesnt matter about performance


Let me jump in here to add emphasis to this IF that Dan mentions. Setting up something like this on a table with many transactions will DESTROY your performance. But then, if you had that many transactions, you would probably want a periodic summary report anyway, not a flood of emails. If that's the case, you might read Merkin's article on creating a mail queue.

------------------------
GENERAL-ly speaking...
Go to Top of Page
   

- Advertisement -