xp_sendmail procedure in a Job

  • Hi friends

    I am using xp_sendmail in a storedprocedure and call this stored procedure in a job.

    this job shall run every 5 minutes. Its working fine . But one or two times in a week the following errors will come and the job failed.

    Executed as user: mydomin\SQLSrvAgent. xp_sendmail: failed with mail error 0x80040115 [SQLSTATE 42000] (Error 18025) Associated statement is not prepared [SQLSTATE HY007] (Error 0). The step failed.

    OR

    Executed as user: mydomin\SQLSrvAgent. SqlDumpExceptionHandler: Process 54 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. [SQLSTATE HY000] (Error 0) Associated statement is not prepared [SQLSTATE HY007] (Error 0). The step failed.

    After that I can't send mail using xp_send mail,I can't stop mail by using xp_stop mail.

    Can't stop the job in sqlserver agent screen.

    Any ideas to stop this job .

    Regards

    Joseph

  • what version of SQL do use use .. which sp??

  • Also when it says it did a dump check SQL Error Logs and Event Viewer. Should provide some extra info. Also if not in those, drill the Windows explorer to the folder SQL server was installed to and look in the log folder under that path. You will see a few files there, some are for error log and sql agent others can be several other items including dump files.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • version :- SQL Server 2000 - 8.00.534 (Intel X86)

  • are you running service pack 2

    there have been some issues with sqlmap70.dll in sp 2

    if you are running sp 2 replace this dll with the SP 1 version

  • There is post SQL Server 2000 SP2 hotfix that fixes issues with xp_sendmail. See:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q320407

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply