Pages

Friday, March 25, 2011

How to Send Mails From MS-SQL Server 2005/2008

One of most interesting and relevant topic of DBA(Database Administration) is to send mails from your database:
Benefits:
1. By using DB-Mail, even if the main domains viz. gmail, yahoo, rediff or hotmail are crashed, you can send your mails from the same account name without the user whom you are sending the mail being knowing that you are using some other resources to mail him/her.
2. You may send mails to as many users you wish and even configure them to be sent automatically by initiating jobs.

Steps to Configure your own DB-Mail:
1. The very first step is to check some loop-holes before you actually start mailing.
-Check whether your SQL Services in Configuration Tools->Configuration Manager, are running or not. SQL Agent Service, apart from SQLServer, SQL Integration services are running or not.
-If any one of them are stopped, do run them
-Check your protocols in the same window, SQL Server Network Configuration, Settings for TCP/IP protocol must be Enabled VIA must be DISABLED.
-Now you may proceed to the next level
2. Log in to to SQL Management Studio as Administrator and Open Management Folder.
3. There you will see Database Mail just beneath SQL Server Logs folder.

4. Right Click on the Database Mail and Click On Configure Database Mail.