• danskisanjar (11/3/2011)


    Does this only run if the job fails? Can you make this run when jobs also complete? On our 2005 machines we have all jobs will email on failure except the user databases we have email upon completion.

    This is just an example. It shouldn't matter if job fails or not.

    I am also not sure about this,

    exec SQL_Server_2005.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'

    --------------------------------------------------------------

    Profile name is the name of the account with no @companyemail.com at the end.

    Profile name is the database profile you configured in SQL Server 2005

    Is that also reentered in the @recipients only with the @companyemail.com at the end?

    No, @recipients is your email address

    I am assuming that we don't have to use copy_recipients if we don't want, that is optional?

    Yes, it is optional

    M&M