Lesson 2: Configuring Database Mail in .NET

Print PDF-417 2d barcode in .NET Lesson 2: Configuring Database Mail

Lesson 2: Configuring Database Mail
PDF 417 Creation In Visual Studio .NET
Using Barcode drawer for VS .NET Control to generate, create PDF-417 2d barcode image in .NET applications.
www.OnBarcode.com
Reading PDF417 In .NET Framework
Using Barcode scanner for VS .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
Lesson 2: Configuring Database Mail
Barcode Generation In .NET Framework
Using Barcode drawer for .NET framework Control to generate, create bar code image in .NET applications.
www.OnBarcode.com
Recognizing Barcode In .NET
Using Barcode reader for .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
Database Mail is a new solution for sending messages from the SQL Server 2005 database engine. Applications that are configured to use Database Mail can send e-mail messages, including HTML messages, query results, and file attachments, to users. Database Mail uses the Simple Mail Transfer Protocol (SMTP) and does not require you to install any Extended MAPI client, such as Microsoft Office Outlook, on SQL Server.
Creating PDF-417 2d Barcode In Visual C#
Using Barcode maker for .NET framework Control to generate, create PDF-417 2d barcode image in Visual Studio .NET applications.
www.OnBarcode.com
PDF-417 2d Barcode Encoder In .NET
Using Barcode creation for ASP.NET Control to generate, create PDF417 image in ASP.NET applications.
www.OnBarcode.com
After this lesson, you will be able to:
PDF 417 Maker In Visual Basic .NET
Using Barcode creation for Visual Studio .NET Control to generate, create PDF 417 image in VS .NET applications.
www.OnBarcode.com
Painting GS1 128 In VS .NET
Using Barcode encoder for .NET framework Control to generate, create EAN128 image in .NET framework applications.
www.OnBarcode.com
Identify Database Mail prerequisites. Understand the Database Mail architecture. Configure the SQL Server Database Mail subsystem.
QR-Code Creator In .NET
Using Barcode drawer for Visual Studio .NET Control to generate, create QR Code image in VS .NET applications.
www.OnBarcode.com
Data Matrix ECC200 Generator In VS .NET
Using Barcode maker for .NET Control to generate, create Data Matrix ECC200 image in VS .NET applications.
www.OnBarcode.com
Estimated lesson time: 15 minutes
1D Creation In Visual Studio .NET
Using Barcode creator for .NET Control to generate, create 1D image in VS .NET applications.
www.OnBarcode.com
Generating ITF In .NET
Using Barcode maker for Visual Studio .NET Control to generate, create 2 of 5 Interleaved image in .NET framework applications.
www.OnBarcode.com
Identifying Database Mail Prerequisites
Generate European Article Number 13 In Objective-C
Using Barcode creation for iPad Control to generate, create GS1 - 13 image in iPad applications.
www.OnBarcode.com
Code 39 Extended Printer In Java
Using Barcode generator for Java Control to generate, create Code 3/9 image in Java applications.
www.OnBarcode.com
Before you configure Database Mail, you need to review the following prerequisites:
Painting UPCA In Objective-C
Using Barcode generation for iPad Control to generate, create UPC-A Supplement 5 image in iPad applications.
www.OnBarcode.com
Code 3 Of 9 Reader In None
Using Barcode reader for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Database Mail must be enabled. Database Mail is not enabled by default; you need to enable it by using the SQL Server Surface Area Configuration tool, the Database Mail Configuration Wizard, or the sp_configure stored procedure.
Encoding Code 39 In Visual C#
Using Barcode encoder for .NET Control to generate, create Code39 image in .NET applications.
www.OnBarcode.com
USS Code 128 Printer In None
Using Barcode generation for Office Word Control to generate, create Code 128A image in Microsoft Word applications.
www.OnBarcode.com
The default Database Mail host database is msdb, and Service Broker is enabled on msdb by default.
Data Matrix 2d Barcode Drawer In None
Using Barcode generation for Font Control to generate, create Data Matrix ECC200 image in Font applications.
www.OnBarcode.com
Encoding PDF 417 In Java
Using Barcode generation for Android Control to generate, create PDF417 image in Android applications.
www.OnBarcode.com
Service Broker needs to be enabled in the Database Mail host database.
MORE INFO
Service Broker
You can get a full explanation about Service Broker from http://msdn.microsoft.com/library/ default.asp url=/library/en-us/dnsql90/html/sqlsvcbroker.asp.
The Database Mail external executable needs access to the SMTP server.
If the SMTP server requires authentication, the executable accesses the SMTP server by using the SQL Server service account credentials by default. You should ensure that the SQL Server service account can access the SMTP server.
2
Configuring SQL Server 2005
Understanding the Database Mail Architecture
Database Mail has four main components: configuration components, messaging components, the executable, and logging and auditing components.
Configuration components
There are two configuration components:
A Database Mail account contains the information that SQL Server uses to send e-mail messages to the SMTP server, such as the SMTP server name, the authentication type, and the e-mail address. A Database Mail profile is a collection of Database Mail accounts. Applications use Database Mail profiles to send e-mail messages so that the information about the accounts is transparent for applications, which lets DBAs change account information without modifying applications stored procedures. Database Mail profiles can be private or public. For a private profile, Database Mail maintains a list of users that can use the profile. For a public profile, members of the msdb database role DatabaseMailUserRole can use the profile.
Messaging components The main messaging component is the Database Mail host database, which contains all the Database Mail objects. The Database Mail host database is msdb. Database Mail executable To minimize the impact on SQL Server, Database Mail uses an external executable to process e-mail messages. The executable, called DatabaseMail90.exe, is located in the MSSQL\Binn directory in the SQL Server installation path. Database Mail uses Service Broker activation to start the external program when there are e-mail messages waiting to be processed. The external program connects to the database engine by using Microsoft Windows authentication with the SQL Server service account credentials.
Database Mail stores log information in tables in the Database Mail host database. You can see this log information from the Database Mail Log or by querying the sysmail_event_log system view.
Logging and auditing components
How to Configure Database Mail
SSMS provides the Database Mail Configuration Wizard for configuring your Database Mail environment. You can set up Database Mail; manage accounts, profiles, and security; and change system parameters from the wizard, which is shown in Figure 2-1.
Lesson 2: Configuring Database Mail
Figure 2-1
Database Mail Configuration Wizard
In the following example, you have an SMTP mail server called mail.adventureworks.com and an account on that server with an e-mail address of sql@adventureworks.com. To configure a Database Mail profile account for this e-mail account, follow these steps: 1. Expand the Management node within Object Explorer in SSMS. 2. Right-click Database Mail and select Configure Database Mail. The Welcome page of the Database Mail Configuration Wizard appears. Click Next. 3. On the Select Configuration Task page, verify that Set Up Database Mail By Performing The Following Tasks is selected and click Next. 4. A warning message appears: The Database Mail feature Is Not Available. Would You Like To Enable This Feature Click Yes. 5. In the Profile Name text box, type TestProfile and click Add to add a new SMTP account. 6. The New Database Mail Account dialog box appears. Fill in the text boxes as Figure 2-2 shows. Click OK and then click Next.
Copyright © OnBarcode.com . All rights reserved.