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.
Author |
Topic |
tobesqlteam
Starting Member
1 Post |
Posted - 2007-04-23 : 05:57:06
|
I have try to send a mail via xp_sendmail in Query Analyzer and it succeeded.So I try to have it executed in a trigger but it failed.Here is the trigger creation script and error messageuse mlcbgoif exists (select namefrom sysobjectswhere name = 'test' andtype = 'TR')DROP TRIGGER TESTGOCREATE TRIGGER test on mlcb.dbo.trans_errlogfor insertasdeclare @email_subject varchar(100), @email_content varchar(4000), @email_recipients varchar(50)set @email_subject='SQL Mail test mail' set @email_recipients='some@world.com.tw' set @email_content='this is a test mail, don't reply this mail' exec master.dbo.xp_sendmail @recipients=@email_recipients,@subject=@email_subj ect,@message=@email_contentGOError Message:Server: Msg 2812, Level 16, State 62, Line 6Could not find stored procedure 'master.xp_startmail'.The statement has been terminated.Appreciate any prompt reply.JD |
|
|
|
|