E-Mail Functionality in SQL Server 2005

The final option is using a T-SQL script. The following script will enable the Database Mail option.

sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE;
GO
sp_configure ‘Database Mail XPs’, 1; — 0 to Disable and 1 to enable
GO
RECONFIGURE
GO



Configuring Database Mail

Now that we have examined the background of Database Mail, it is time to get your hands dirty with this new feature.

Right click the previously shown option in the screen shot above. If Database mail is not configured you will be asked to enable it with this wizard.

You will be taken to Database Mail Configuration window, which is shown below.

Even though there are four options in the windows, the first option is a combination of the other three options, so this article will focus on the first option.

You are required to create a Database Mail profile with a profile name and description. With a profile, as mentioned earlier, there can be multiple SMTP accounts.

The priority can be set by using the Move Up and Move Down buttons. According to the above example, the profile Dinesh will send mail via dinesh@dynanet.lk. Failing that, it will send mail via dinesh@dinesh.com.

The following dialog gives you the option of configuring SMTP accounts. Apart from the basic SMTP account configuration, three authentications are available. The most commonly used authentication is basic authentication. You can configure your database authentication credentials to log into SMTP server. This is good practice. If you change your windows authentication, you do not have to change the Database Mail configuration.

Anonymous authentication is also available but not recommended for security reasons. If you are using this option, you will need to ensure that the mail server has not disabled anonymous authentication.

Continues…

Pages: 1 2 3 4 5




Related Articles :

  • No Related Articles Found

One Response to “E-Mail Functionality in SQL Server 2005”

  1. Dinesh,

    Thanks you very much for this article.
    I was able to set up a email account and send some test mails.
    Few questions:

    1) The profile that i created is public bit i didn’t made it default since my server has many databases and i will be using the mail profile for only one database.
    So should i make it private or leave it public(not default) ?

    2) With every schedule maintenance activity
    like database refresh or database shutdown\restart, do i need to manually check for the profile that i created still exists or not ?

    Thanks,
    Sumit

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |