Exchange Server is highly interdependent with other services in Windows -- such as Active Directory. These interdependencies become much more pronounced when Exchange is installed on a domain controller. One of the ways this can create problems (although not intractable ones) is during the shutdown process. Shutdown ungracefully, and you'll feel more pressure than you care to deal with from management that can't get its e-mails.

The shutdown order for system services can't be directly dictated, so a system that attempts to shut down the Active Directory services before Exchange will cause Exchange to throw a whole series of spurious errors and hold up the shutdown process for minutes—sometimes as much as half an hour or more. The errors in question are usually MSExchangeAL 8026 and 8250, and MSExchangeDSAccess 2104 and 2102—signs that the Exchange Server is trying (futilely) to contact the AD service to update user information.

Getting Exchange to shut down before Active Directory is not something you can do wholly automatically. One mechanism that might look like it affords a solution is to alter service dependencies, but dependencies don't govern the order in which services terminate—only the order in which they are launched. Another possible fix involves editing the WaitToKillServiceTimeout Registry entry (a REG_SZ entry, calibrated in milliseconds, and found in HKEY_LOCAL_MACHINESystemCurrentControlSetControl

    Requires Free Membership to View

). This governs how long the system will wait for a service to terminate gracefully, which by default is 20 seconds. Increasing it to 60 seconds (or more if needed) may reduce the amount of cross-contention between services trying to shut down, but it may not help a system where for whatever reason Exchange is being shut down after Active Directory.

One way to solve this problem is to write a batch file that uses the NET STOP command to gracefully turn off the services in the proper order: Exchange first, then Active Directory (if needed). Since each command in the batch file has to be evaluated one at a time, this prevents other services from "jumping the gun". The last command in the batch file should be the SHUTDOWN command (available in Windows 2003 Server, and in the Windows 2000 Resource Kit), which will then invoke a shutdown for all other services and the system as a whole. Run the batch file as a way of shutting down the system, rather than invoking the usual Shutdown command.


Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter. Check out his Windows 2000 blog for his latest advice and musings on the world of Windows network administrators – please share your thoughts as well!


This was first published in November 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.