Starting Exchange Server with a blank Information Store

Starting Exchange Server with a blank Information Store

There are some situations where starting Microsoft Exchange with a blank database may be necessary. In my line of work, I run across a large amount of businesses that have had their Exchange Private Information Store corrupted and the whole organizations Email capabilities halted as well. Quite often, getting the users back up and running takes precedence over getting the data back. Don’t get me wrong; the data is still extremely important, however not having email capability can stop some businesses day to day operations dead in their tracks.

In a perfect world, there would and should be a backup Exchange server just waiting to take over in case of a catastrophic event. But in reality, that is rarely the case. Rather than wait a complete day or two, or even longer, for the systems administrator to get the Exchange database recovered, a viable alternative is to restart the information store with a blank database and import the data back in when it is recovered.

There may be other reasons for wanting to create a blank database as well. You may have an Exchange server that is years old, with tons of residual data from users no longer at the company. You may need to free up disk space on your server. You may have a database with minor corruption and decide to ExMerge your data out and import it back in to a clean corruption-free database. Whatever the reason, make sure you have a complete plan of action and be sure to backup your data in case you run into difficulties. The following article explains how to create a new database with Exchange Server.

To start Exchange Server with a blank Information Store:

  1. Locate the Exchange database directory and transaction log directory
    1. Open Exchange System Manager
    2. Navigate to Administrative Groups->First Administrative Group->Servers->servername
    3. Underneath servername click First Storage Group and then Action->Properties
    4. Transaction Log location will be listed on the General tab. Note this location (Image 1d)
    5. Navigate under First Storage Group to your Mailbox Store and click Action->Properties
    6. Click the Database tab to note the Exchange Database and Exchange Streaming Database locations (Image 1f)
    7. Do the same for the Public Store

  2. Image 1d


    Image 1f

  3. Stop the Exchange Information Store (IS) if it is currently running
    1. Click on Start->Programs->Administrative Tools and then on Services or you can go to Computer Management by Right-Clicking on My Computer and choosing “Manage”

      i. If using Computer Management, drill down to Services and Applications, and then Services underneath that

    2. In the right window of the Services or Computer Management console, locate Microsoft Exchange Information Store
    3. If it’s status is listed as “Started”, Right-Click it and choose “Stop” (Image 2c)
    4. It may give you a message stating that dependency services such as Microsoft Exchange Event will need to stop as well. Choose “Yes” to continue stopping the IS
  4. Image 2c

  5. Rename database and transaction log directories and create new ones
    1. Rename the database location MDBDATA directory to MDBDATA-old (Image 3a)
    2. Create a new MDBDATA directory
    3. Rename the transaction log MDBDATA directory to MDBDATA-old (if location is different from the database location)
    4. Create a new MDBDATA directory for the transaction logs (Image 3d)
  6. Image 3a

    Image 3d

  7. Start the Exchange Information Store service
  8. Create new data files
    1. From Exchange System Manager navigate to Administrative Groups->First Administrative Group->Servers->servername->First Storage Group
    2. Click on the Mailbox Store and then on Action->Mount Store (Image 5b)
    3. You will receive a message stating that mounting this store will force the creation of an empty database, choose “Yes” to continue (Image 5c)
    4. The Store should mount, give you a message stating it successfully mounted and the data files should be created in the MDBDATA directory. (Images 5d1 & 5d2)
    5. Follow the same steps for the Public database
  9. Image 5b

    Image 5c

    Image 5d1

    Image 5d2

  10. Test and Verify
    1. Verify the data files were created in the MDBDATA directory
    2. Check the Event Log for any errors
    3. Test connection to the Exchange server from Outlook

Comments

  1. Great article I have had to use this myself

  2. David Jacobs says:

    Hi,

    I have 3 mailstores, and only 1 store is corrupt, i am busy with a repair, and I cannot rename the folder, can I create a new file, with a different filename, and just mount that store to create an empty one?

    Thanks

  3. David,

    I am sending this to one of our Exchange engineers for an answer.

  4. David, I am sure it is probably too late now, but in case anyone else runs into this problem I will try to answer your question. I would not recommend anyone ever run a repair on their database directly from the exchange database directory. You should always copy the database to a different location and then run Eseutil on the copy. But in the case where it is too late to do that, this is what I would do:
    1. In earlier versions of Exchange, the database directory parameter was stored in the registry, so you could change the path to a different folder (e.g. D:\Program Files\Exchsrvr\MDBDATA-New) and then follow the steps to mount the store. But in Exchange 2000 and later, that information is stored in the Active Directory.
    2. Using Exchange System Manager to try and move the location and/or filename will not work because doing so causes Exchange to copy the current database to the new location.
    3. You will need to use ADSI Edit to edit the Active Directory to modify the location of the Data files. Be sure to set both the EDB file location as well as the STM file location. Also set the Log file path to a new location as well. I would pick a new Folder such as MDBDATA-NEW. (Be sure to actually CREATE that folder manually on the drive.)
    4. Once the paths are modified to the new location, mounting the mailbox store will see that the data files do not exist and will then create new ones.

    Here is a Knowledgebase article that explains manually setting the database directory with ADSI Edit:
    http://support.microsoft.com/kb/822676

    I hope this helps!

    John

  5. Hi,
    Great article. The best I saw amongst others. The best thing is that it has illustrations and is explained in a streaming format.
    I have a question please.
    We are running Exchange 2003 SP2 standard, with a single store.
    I’m facing error 478 while trying to backup. The corrupt database is the stm one but Exchange server is up and running, fine and dandy
    I have done some readings and come to understand this:
    1 – The stm database hols, among other things, attachments.
    2 – There is very little chance I can get back that damaged part of the database and personally, I’m willing to sacrifice the corrupt part(s) regardless of the user(s).
    3 – The best remedy in my scenario is to create a new store and upload (or merge, whatever the right term would be) the current mailboxes into the new database.

    If number 3 above it correct, and as you have just detailed the procedure on creating and mounting a blank database, can you please talk about imprting mailboxes into the new database?

    Regards
    Yba

  6. YBA,

    You are correct about the best remedy in your situation being to import your data into a new database. You are going to want to use EXMerge to export your user mailboxes into PST files, create the blank database and then use EXMerge to import the data back in. I wrote an article on the import process which you can reference here:
    http://www.dtidata.com/resourcecenter/2007/05/11/exchange-server-tools-use-exmerge-import-pst-files/
    Using EXMerge to export is very similiar, you will need to follow the same process for setting mailbox permissions and instead of choosing step 2 for import as explained in the article, you will choose the first step for export.

    Let me know if this helps,

    John

  7. Hi,
    Thanks big time for your care and prompt reply John.
    I have chosen another procedure that came under my hand, which has started from your article here, the blank database.
    I have created a new blank information store and started moving mailboxes to it. The process is still ongoing now and is smooth and flawless. However, I ran across a problem.
    I’m unable to move my own mailbox. The errors returned were 9175, 9168 and 1008. I came to understand that it might be because the system attendant is logged on under my user account. I have two questions/requests:
    1 – How to move my own email box?
    2 – Is this approach a “real” cure for the corrupt part of the database and that mailboxes now reside in a brand-new, healthy database.
    3 – The old database is still of the same size, can I simply delete it?

    Regards
    Yba

  8. YBA,

    Answers to your questions:
    1. Here are some things I would try:
    a. If the system attendant is configured to start with your account, I would change that to a different account.
    b. If you have Active Directory Connector(Exch 2000 & 5.5 mixed environment) installed, try stopping it and see if that helps.
    c. Create a new account, give it the appropriate permissions for Exchange server and use it to move your mailbox.
    d. Go to your workstation and log into Outlook. Click on File–> Import and Export, export your mailbox to a PST file. Then configure your account to use the new Exchange server, connect to it and then Import the PST file. (since it is only 1 account that is having issues, this could be a viable work-around.)
    e. If you have Outlook 2003 or later and cached mode is enabled, your computer will have an OST file on it. This OST file can be converted to a PST file, which can be imported into the new database.
    f. If you are still having issues, give me a call at 727-345-9665. We will definateley find a solution to your problem.

    2. Exchange will not move corrupt data to a non corrupt database, so yes this is a “cure”, so to speak. However, whatever caused the data to get corrupt in the first place (for instance Anti-Virus software which was not configured to EXCLUDE the MDBDATA directory for its real time scan) could very well corrupt the new database if not taken care of.

    3. I hate to delete anything. I have seen WAY too many instances where someone has deleted, only to find out they REALLY need what was deleted. I recommend copying it off somewhere and waiting 2 weeks. After 2 weeks if you are SURE you no longer need it, then delete it.

    Hope this helps,
    John

  9. Hi,
    Thanks John.
    The problem was that I was logged in with my name. I simply logged off and on again with a different name and things went smooth. All mailboxes have been moved to the new store. I have dismounted the old store and moved its files to a safe place for later deletion. In general, things seem within norms, so far ,except for These
    A – system mailboxes.
    There are four system mailboxes with a different remarks:
    1 – System Attendant: Marked for deletion and when i use reconnect, no relevant account name shows. Same applies for a mailbox called Calender Connector. Both boxes are of 0 kb size.
    2 – SMTP ans SystemMailbox: both are doubled with one of each marked for deletion.
    Any idea on why these are so?

    B – Backup works again. I intend to delete the default first storage group (now dismounted) since it is not working now. Is it ok to do so?

    Regards
    Yba

  10. Ravi kumar says:

    sir
    Can I solve smtp problem in exchange system manager

  11. Since theres Exchange 2007 out now, will this still be possible and does anyone have the documented procedure to do this please? I am busy with DR testing in my lab.

  12. eric kipkorir ng'etich says:

    I have successfully renamed mdbdata files, but then their is nom connection with exhange server, please help.

  13. Is it normal to get an error when I open Outlook on a client station after going throught his process about the server creating a temporary mailbox? It appears I have to create a new profile for all of my client stations after going through this process.

    BTW, thanks for this info!! It is very helpful!

  14. Brilliant article. Many Thanks.

    I have a similar scenario. well i can export out the user’s mail box and import them via exmerge to the new store. but before proceeding i am concerned about the system created mailboxes.

    How are the System Attendant, System Mailbox and SMTP mailboxes managed or exported or recreated? Or do they need to be exmerged like a users mailbox or not?

    Thanks

  15. Om Joshi says:

    Hi, Thanks for sharing the procedure for creating new Exchange Database.

    I have a very simple queries, which are:

    1. What happens to existing mailboxes within the old db?
    2. Do they get copied into new DB? or should be imported separately?
    3. Is there any option to archieve only mailboxes? i.e. using date range, without using outlook any option or rule in exchange 2003 which does this automatically?

    Look forward to hearing from you with favourable reply.

    Thanks,
    Om

  16. I would like to thank you as I am working on a project with a dead exchange server corrupt database on the server and the backups.

    this helped me out alot. :-)

  17. thanks for the article, I used it at a clients.

  18. Hi,

    The article is very good. I need further help.

    so, I followed all the step and i have the new database up and running. Now i want to restore mailboxes from old DB to new. I tried recovery storage group but could not find the DB which is the D:\ drive.

    Can you please urgently help.

    Regards,
    Om

  19. When it recreates the new database, does it also recreate any mailboxes that were on the system with the old database, just as empty mailboxes? Or do I have to recreate the mailboxes manually?

  20. Nazmul Hoque says:

    Hi Dear,

    Thanks for the Valuable tips. It seams this a very useful me if it works. I have query as below (ex-2003) :

    To create new database using Mount Store command we need to start IS as mention option 4. Can we start IS without any problem as the new folder are blank. Can you pls know us what problem we may face.

    Thanks

Speak Your Mind