The Entourage User's Weblog has been relocated.

You should be automatically redirected to the new location in 5 seconds. If not, please click on the link below.
Please remember to update your web browser bookmarks.

This page has been moved to

http://www.barryw.net/weblog/files/74436f13b0f77dee824ca5a9b5475323-1.html.

content="all" /> The Entourage User's WebLog
Rebuilding the Database
This is probably the most common solution to problems reported in the mailing lists.

Background

Entourage stores many different types of data: emails, contacts, calendar events, tasks, notes, links, categories, projects and various other stuff as well. To improve the interaction and linking between the various elements in Entourage (and externally to Messenger, Word & Excel) the Microsoft developers took the decision way back in the early days to store all this information in one large, central database. This database can be found in the folder named after your identity ("Main Identity" by default) in the "Office 2004 Identities" subfolder of the "Microsoft User Data" folder in your 'Documents' folder. It can grow quite large. Mine is currently a little over 3Gb. I have heard of people exceeding 4Gb (which used to be a hard size limit in earlier versions of Office). For most people, around 1Gb seems to be a common size.

† This refers, obviously, to Office 2004. Earlier versions of Office have differently named Identity folders

The Database Utility

Now, occasionally, this data store can become corrupted. With each release of Office (even with each Service Pack and minor 'dot release') the database becomes more stable, more reliable and more robust. Microsoft has built in the tools to repair the database in the event that corruption does occur and, new in Office 2004, has provided a tool (the "Database Utility") which can continuously scan the database when your computer is not busy looking for corruption.

Now, if the Database Utility finds some corruption you will be guided through the steps necessary to rebuild, see the next section for an explanation of the various steps.

Manual Rebuilds

Sometimes you may hit problems before the utility can find them for itself (maybe you turned the integrity check off, or maybe you run your PowerBook mainly on batteries, in which case the integrity check turns itself off so as to conserve your battery life). Typical symptoms of a corrupt database are issues like 'phantom' messages appearing in folders (messages that can't be selected, displayed or deleted), crashes when you select a particular folder, alarms firing for events that you cannot find or open, messages containing headers from other messages in their body text etc., etc.

If you are fairly sure that the database is corrupted then the rebuild is pretty simple to accomplish, even though it can take some time (several hours on a database as large as mine!). If you're Using Office 2004 the easy way is to find the Database Utility application (it's at "/Applications/Microsoft Office 2004/Office/Database Utility" by default) and double-click it. This will then guide you through the steps you need to follow (which will start with quitting ALL office applications if you have any open). Don't worry too much (unless you're a 'Belt and Braces' sort of person) about backing up the database first, the rebuild routine works always on a copy of your data, not the original, so you can always revert to your pre-rebuild version later if things go badly wrong.

Alternatively, if you quit all office applications then start up Entourage whilst holding down the Option key (double-click the actual application icon for Entourage, don't use any 'launcher' type utilities as these can fail to pass the option key through to Entourage itself). Keep the Option key held down as Entourage launches until you see the rebuild screen.

If you have any Office applications open (including Messenger or even the hidden "Database Daemon") you will get a prompt to quit them all. If only the daemon is running, this will be automatically quit by the Database Utility.

Once you have quit all the apps, you can continue to the next screen, where all your identities are listed (if you have more than one) and you are asked to select which Identity you wish to rebuild. You are also given a choice of 4 actions you may wish to carry out:

1. "Verify Database Integrity" - This is a new option in Office 2004 which should
reduce unnecessary rebuilding. Apparently it's quite sensitive. And see (4) below.

2. "Compact the Database". - Was called "Typical rebuild" in Office vX and earlier.
It is useful for reducing the size of a database when you have deleted a lot of
material, but uses the existing indexes to re-order things. This can cure some
minor problems, but is unlikely to fix any serious corruption.

3. "Rebuild the Database" - Was called "Advanced Rebuild" in Office vX and earlier.
This is the main rebuild routine. It will recreate all the indexes within the database
from the information that is available in the messages and other data. This should
(in theory) result in a database that is completely free from all kinds of corruption,
but may (in extreme cases) result in data that could not be reconstructed being
lost. Since this data would probably not have been accessible anyway, you are
unlikely to be any worse off

4. "Set Database Preferences". Actually there's only one pref: you can turn
on or off "Verify database in background ".

Select the option you want and let it run!

When the rebuild is finished, take a look in the Identity folder and you will see your new database, and a backup copy of the original. It's worth hanging on to the original in case you need to revert back to it because something went wrong with the rebuild (which very rarely happens). If you do need to revert, simply delete the file called "Database" and rename the backup copy to simply "Database".

Caveats

Rebuilds should never be done more often than necessary. Some people have been recommending a rebuild once a month as a preventative measure. This will not work. If you are unlucky enough to get your database corrupted, it will happen whether or not you have already rebuilt the database 600 times. Also, the rebuild process involves the moving around of a lot of data - data corruption is most likely to strike during the read-write phases of disk transfer. By frequent rebuilding you are actually increasing the risk of this happening.

In addition, a rebuild does loose some ancillary information. Links between items will be lost. local caches of newsgroups, exchange accounts, HotMail accounts and IMAP accounts will be deleted, meaning all those messages must be downloaded from the server once again. any Rules or Mailing List Manager entries that refer to specific folders will be reset to the local Inbox. All of this can be re-created, but it is a pain (especially resetting all the rules) and is not a task to be undertaken without good cause.

So, my major recommendation is to Verify before rebuilding, and only rebuild when you are convinced there is real corruption.
|