Microsoft KB Archive/328197

= BUG: SQL Server Agent Job with E-Mail Notification Option Stops Responding When Microsoft Exchange Server is Not Available =

Article ID: 328197

Article Last Modified on 4/6/2004

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q328197





SYMPTOMS
When you run a SQL Server Agent job, the job may not respond if all the following conditions are true:
 * The job is configured to send an e-mail notification when it completes.
 * The SQL Server Agent mail profile is configured to use Microsoft Exchange Server, and the Microsoft Outlook Address Book service.
 * The Outlook Address Book service references the Outlook Contacts folder.
 * The computer that is running Exchange Server is not available.

When the computer that is running Exchange Server is not available, a SQL Server Agent job that is configured to send an e-mail notification by using that computer may stop responding. If you verify the job history of the SQL Server Agent job, you may see that the job steps completed successfully, but the job remained active with a status of &quot;Performing completion actions.&quot; This status indicates that the job is trying to send the e-mail notification.

Even if the computer that is running Exchange Server is available later, the affected job may not respond. At the next scheduled time, the affected job still has a status of &quot;Performing completion actions.&quot; Also, the affected job may not run until you restart the SQL Server Agent service.



CAUSE
The SQL Server Agent mail connectivity is handled by a single mail interface thread. All the SQL Server Agent job uses this mail interface thread for is e-mail communication. Each SQL Server Agent job waits without any timeout limit until the mail command of the job returns from the mail interface thread. If the mail interface thread stops responding because of some external reason, the dependent job keeps waiting infinitely.

The problem that is mentioned in the &quot;Symptoms&quot; section occurs because the mail interface thread stops responding while it is trying to resolve the mail recipient names through the Microsoft Outlook Address Book.



WORKAROUND
To work around this problem, perform one of the following tasks:
 * Remove the reference to the Contacts folder from the Microsoft Outlook Address Book service in the SQL Server Agent mail profile.
 * Remove the complete Microsoft Outlook Address Book service from the SQL Server Agent mail profile.

If any one of these tasks is performed, the mail interface thread detects if the Microsoft Exchange Server is unavailable. The SQL Server Agent job that is configured to send an e-mail notification when it finishes, completes the job after approximately two minutes of wait time for sending the e-mail notification. The job will not fail or stop responding if there is a failure in sending e-mail notification.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.

Keywords: kbbug kbsqlservmail kbserver kbservice kbpending kbstack KB328197

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.