Thursday 9 June 2011

How to configure mail in sql server 2000/2005/2008.

You can configure sql server mail with out configure the mail profile in sql server by using below :

Please follow the given below steps :

(1).Please copy the xpsmtp80.dll in below location:

                    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn

(2). Connect the Master Data base and run the below commands :

                      sp_addextendedproc 'xp_smtp_sendmail', 'xpsmtp80.dll'

                       grant execute on xp_smtp_sendmail to public

(3).Finally configure the mail in your scheduled job :

          EXEC master..xp_smtp_sendmail
            @TO               =N'surender.kundu@gmail.com',
            @FROM         =N'sdcr.messages@gmail.com',
            @FROM_NAME        =N'Daily  DB Backup job failed',
            @PRIORITY               =N'HIGH',
            @SUBJECT    =N'Daily  DB Backup job failed.',
            @MESSAGE    =N'Daily Backup schedule job for User database got failed.',
            @SERVER      =N'servermail id'

GO

No comments:

Post a Comment