Picking Up the Pieces: An IIS/Exchange hiccup requires a careful double reinstall

Recover from an Exchange Outlook Web Access failure

If you're unlucky enough to find yourself in the position of having a broken IIS installation where the server is also running Exchange 2000 or Exchange 2003, then you have little choice but to bite the bullet and reinstall both applications. Why both if only IIS is broken? The answer is because you need to rebuild the SMTP and Outlook Web Access (OWA) links provided by IIS to Exchange.

Watch out
Although the process of reinstalling both is not overly difficult, most administrators will agree that, because you're dealing with preserving an existing Exchange Information Store, you need to be very careful so that you don't lose any data. Imagine what management would say if you had to tell them that you lost the entire sales team's e-mail database and that the most recent backup you have is from Monday (and, of course, on Tuesday, they closed numerous deals for which they now have no correspondence). Doubtless, you would not be the most popular person in the office, so be sure to exercise caution with this operation and double check every step.

Back up
The first thing to do is to perform an online backup of the Exchange Information Store. To do this, you can use the native Windows NTBackup utility or a third party application (e.g., Veritas Backup Exec). In the NTBackup Utility, you'll need to expand the Exchange Server tree so you can drill down to whichever directory and Information Store you need to back up. Once you've completed this step, be sure to double check that the backup actually worked and that the files are accessible. Depending on the size of the Information Store, this could take quite a while.

Service packs and security patches
You're also going to need access to all of the latest service packs and security patches for both IIS and Exchange, so have them ready to install from CD before you start—that way, you'll save time. In my experience, anything that involves an outage on an Exchange box is a big deal, so cutting the downtime to a minimum is a must.

Next, you'll need to unmount both the mailbox store and the public folder store from within the Exchange System Manager. To do this you'll need to expand the server container (make sure it's the one on which you're going to reinstall) and drill down through the storage group to find the Mailbox Store (servername) and the Public Folder Store (servername). Then, right-click both of these and choose to unmount each one.

Services and reinstallation
Now, navigate to the services node of the Computer Management Console and stop the Microsoft Exchange Information Store Service. Alternatively, you can do this from a command line by typing "net stop MSExchangeIS." For the Exchange gurus out there, Table A shows a list of all the Exchange 2000 services with which you need to be familiar.

Table A
Service Name Internal Name
Microsoft Exchange Chat MSExchangeChat
Microsoft Exchange Conferencing MSExchangeConf
Microsoft Exchange Event MSExchangeES
Microsoft Exchange Internet Message Access Protocol, Version 4rev1 (IMAP4) IMAP4Svc
Microsoft Exchange Information Store MSExchangeIS
Microsoft Exchange Management MSExchangeMGMT
Microsoft Exchange Message Transfer Agent (MTA) Stacks MSExchangeMTA
Microsoft Exchange Post Office Protocol version 3 (POP3) POP3Svc
Microsoft Exchange Routing Engine RESvc
Microsoft Exchange System Attendant MSExchangeSA
Microsoft Exchange Site Replication MSExchangeSRS

Now, you're ready for the next step, which is to rename the MDBData folder(s) to MDBData_OLD from within the \Exchsrvr folder (located wherever Exchange is currently installed on your system). Once the folder has been renamed, move it to a different location, such as the %systemroot% (e.g. C:\). If you were dealing with more than one MDBData folder, be sure to document the original location of each.

Now, you can uninstall IIS by going to the Control Panel and selecting Add/Remove Programs and then Add/Remove Windows Components. Before you kill IIS altogether, expand the details of installed IIS components and uncheck everything except "Common Files." Then, just make your way through the prompts to finish the uninstall process. Reboot the server and disconnect it from the network.

You can now reinstall IIS from Control Panel | Add/Remove Programs | Add/Remove Windows Components. Again, expand the Details section to verify that both SMTP and NNTP will be installed. The prompts will walk you through the rest of the installation. Reboot and then apply all necessary service packs and security patches before reconnecting the server to the network. This is why you need to have all of those security patches and service packs handy on a CD before you start.

Now, you're ready to reinstall Exchange, so pop the installation CD in the tray and wait for the setup program to spin up. Follow the installation process and, when you see an Action column and a Component column, verify that all components are selected for installation. Then, follow the prompts until the process completes. Apply all the Exchange service packs and security patches once you're done.

Earlier, you unmounted the mailbox and public folder stores and renamed one or more MDBData folders. You're now ready to start restoring the Information Store. First, go back to the service node and stop the Exchange Information Store service.

Now, go to the \Exchsrvr folder (the new installation) and rename the recently created MDBDATA folder to MDBDATABLANK (or a name of your choosing). Find the old MDBDATA folder (which you renamed to MDBData_OLD) and, once again, change its name, but, this time, change it back to MDBDATA and then move the whole folder back to where it originally came from. You'll now need to remount the mailbox store and the public folder store. You do exactly the same process as you did for the unmount operation except that when you right-click, you choose Mount. If, for any reason, you can't mount the stores with MSExchangeIS stopped, then start it up and try again. Then, restart all Exchange services again, when the stores are mounted. In fact, for good measure, you might want to reboot the server.

Small Business Server = Small difference
There is a slightly different procedure to follow if you're using Small Business Server (SBS). Because everything in SBS is integrated, you need to do everything from the SBS CD setup program. Clicking your way through the setup routine, you'll need to log on manually to start. When you get to the Component Selection Screen, check the Maintenance box and select to reinstall Exchange. When you've clicked finish at the end of the procedure, reapply all of those service packs and security patches. Restoring the Information Store and renaming the folders is the same as it is in the standard procedure.

A potential error
Finally, you may receive an error when reinstalling Exchange that says:
"The component 'Microsoft Messaging and Collaboration Services' cannot be assigned the action 'install' because:
Active Directory has not replicated all of the necessary permissions for the deleted items container. Please wait until replication completes before running setup."

Basically, this is a rights issue caused, usually, by a lack of Exchange Full Administrator rights. To install Exchange, you need Full Exchange Administrator rights as well as administrator rights on the server onto which Exchange is to be installed. During the ForestPrep portion of the first Exchange installation, you will have been required to choose an account to which to apply Full Exchange Administrator Rights. If you're not sure about which account this was, you can find out by examining the Exchange Server Setup "Progress.log" file found on the root of the drive when the Setup /ForestPrep was run. You should see a line similar to this:
[08:27:16] PTAdministratorAccount = DOMAIN\User

Use this account to reinstall Exchange or do it when logged on as a member of the Enterprise Administrators security group (do a "find" operation to locate the entry for PTAdministratorAccount). You can also delegate these rights to another account by right-clicking Organization Name and selecting Delegate Control in the Exchange System Manager MMC. Add the account and select Exchange Full Administrator for the role.

Editor's Picks

Free Newsletters, In your Inbox