How to use Database mail feature in SQL Server 2000

  • I am not quite sure on this one.

    M&M

  • That is ok. You have been a big help to me. Thanks!

  • Nice article all set-up and works fine in Query Analyser but fails as a job this is down to the way our servers are named any suggestions on getting round this.

    In Query Analyser can use.

    exec "res-sql-002".msdb.dbo.sp_send_dbmail

    @profile_name = 'SampleSQLServer2005dbmailProfile',

    @recipients='yourname@email.com', --@copy_recipients = 'yourgroup@email.com',

    @subject='Job test_db_mail failed on SQL Server 2000 server',

    @importance='HIGH',

    @body ='Job test_db_mail failed on SQL Server 2000 server'

    But soon as trying to add within a job will not parse with error around the -sql-

    Error 170 line 1 Incorrect syntax near sql

  • Place [] around the database name.

  • Thanks for that realised 5 minutes after posting this. all working fine now.

    Thanks again.

Viewing 5 posts - 61 through 64 (of 64 total)

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