Results 1 to 2 of 2

Thread: Agent Job Error

  1. #1
    Join Date
    Jul 2004
    Posts
    191

    Unanswered: Agent Job Error

    Hi all,

    I have created alert to give me information for a backup that was done and since I don't have SQL Mail set up on my servers I use sp_SQLSMTPMAIL using a smtp server. The Alert is kicking off a job called EMAIL DBA which have the code below:

    exec master.dbo.sp_sqlsmtpmail @vcTo = 'lwilliams@uhc.com', @vcBody = '

    Error: [A-ERR]
    Severity: [A-SEV]
    Date: [STRTDT]
    Time: [STRTTM]
    Database: [A-DBN]
    Message: [A-MSG]

    Check the [SRVR] SQL Server ErrorLog and the Application event log on the server for additional details'

    This uses the Agent Token which is very powerful.


    The error I get on this job is:

    Executed as user: NT AUTHORITY\SYSTEM. Line 8: Incorrect syntax near '\'. [SQLSTATE 42000] (Error 170). The step failed.

    If you look at the code there is no '\', so am I missing something or could this error come from the sp_SQLSMTPMAIL.

    Please help thanks

    Lystra

  2. #2
    Join Date
    Jul 2004
    Posts
    191
    Can anyone HELP out there?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •