Chapter 23. SQL Mail


by Ray Rankins

IN THIS CHAPTER

  • Setting Up an E-Mail Client/Profile

  • Configuring SQL Mail

  • Configuring SQLAgentMail

  • SQL Mail Stored Procedures

One of the unique features of SQL Server 2000 is its ability to integrate with the existing server architecture of an established network. This integration provides SQL Server the functionality to send and receive messages and send query results to mail recipients via a configured mail provider.

SQL Server uses two separate mail sessions: one for SQL Server and one for SQL Server Agent. The MSSQLServer service uses a mail session that is referred to as SQL Mail. SQL Server uses the SQL Mail session when database applications execute the xp_sendmail extended stored procedure to send a message or query result set to a recipient. SQL Server Agent uses the SQLAgentMail mail session that is exclusive to SQL Server Agent activities to send messages related to job status or when an alert is triggered.

To send e-mail from SQL Server or SQL Server Agent, you must first set up a mail profile for the account(s) that SQL Server and SQL Server Agent run under and then associate the profile with SQL Server and SQL Server Agent. After that is completed, you can set up jobs, operators, and alerts for SQL Server Agent, which can be configured to notify the intended recipient by sending an e-mail or pager message through the SQL Agent mail system. You can also use the mail stored procedures provided with SQL Server to send messages or result sets to e-mail recipients.



Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net