Database Mail in SQL Server 2005

Enable database mail

To enable database mail on the database instance, run the following SQL against the master database

sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE;
GO
sp_configure ‘Database Mail XPs’, 1;
GO
RECONFIGURE
GO

To check the configuration value, run

sp_configure ‘Database Mail XPs’;
GO

 

Configure a mail profile

In order for the SQL Server jobs to alert by e-mail database mail will need to be configured.

In SQL Server Management Studio open the Object Explorer

image

Right click on the Database Mail option

clip_image003

And select Configure Database Mail

Note – you may be prompted to confirm you wish to enable this feature.

clip_image005

Select Set up Database Mail by performing the following tasks and click on Next.

clip_image007

Enter the profile name you wish to create and click Next

image

The account name can be chosen to suit. Accounts are created within the profile. The server name for the mail server is 172.***.***.***. Once complete click OK.

image

Click Next to continue (or add another account)

clip_image013

Leave the public checkbox blank and click Next

clip_image015

Click Next to continue

clip_image017

Click Finish to create the profile and accounts.

clip_image019

Any errors will be displayed. Click close to finish. The profile created can be used in any monitoring jobs set up.

Test Database Mail

Right click on the Database Mail option

clip_image003[1]

And select Send Test E-Mail

clip_image021

Enter the email address to send the test mail to and click the Send Test E-Mail button.

clip_image023

If properly configured, a test email should be received in the specified inbox.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: