|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
I am not quite sure on this one.
Mohammed Moinudheen
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, November 15, 2011 2:01 PM
Points: 8,
Visits: 51
|
|
| That is ok. You have been a big help to me. Thanks!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 09, 2013 3:17 AM
Points: 9,
Visits: 92
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 11:22 AM
Points: 154,
Visits: 1,226
|
|
| Place [] around the database name.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 09, 2013 3:17 AM
Points: 9,
Visits: 92
|
|
Thanks for that realised 5 minutes after posting this. all working fine now.
Thanks again.
|
|
|
|