How to delete and recreate Public Folder database
Hi,We have single domain controller with Exchange Server 2007. Our Public folder is a mess and we want to delete the current database and recreate a fresh database. What is the best option to do the same.NzmNzm
September 10th, 2009 12:42pm

I assume that you are not worried about all data available in PFs or you have backup of all at safe place. You can get list of all Folders available under Root with below cmdlet. Get-PublicFolder -Identity \ -Recurse | where{$_.name -ne "IPM_SUBTREE"} You can delete all folders available under Root with below cmdlet. Get-PublicFolder -Identity \ -Recurse | where{$_.name -ne "IPM_SUBTREE"}| Remove-publicfolder Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2009 1:15pm

If you remember my last months post I had setup Archival on public folder which resulted into creation of more log file. I have disabled the feature and created it teh way you suggested in that post. Now my public folder databse size is huge because I have not defragmenetd it. Instead of deframenting I was thinking is there a way where I can delete teh current database and recreate a fresh one. This way I'll save my disk space. I am not worry about Public folder data as I have only one contact folder item in public folder which has been backed up.NzmNzm
September 10th, 2009 1:21pm

Ah, I got you... :) Well, if it was mailbox database I would have asked you to dial tone (means, dismount the DB, delete the edb file and mount it back which will create a blank database with zero size) but this is public folder so I would recommend you to do the defragmentation since it contains OAB, F/B and event root and other hidden system folders etc..and dial toning the PF DB may harm functionality of those. However check the white space available in public folder DB as per event id 1221 and it should be almost equal to size of PF EDB file before running defragmentation. Also running defragmentation on this DB wouldn't take much time since it contains only white space... :)Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2009 1:41pm

Should I use eseutil to defrage or something else. I have tried eseutil since the file name isPublic Folder Database.edb it's not recognizing it and givign me error.How can I defrage the database.NzmNzm
September 10th, 2009 2:01pm

- You need to dismount the database first, (I also suggest you to take the backup before going forward). - Open cmd prompt. - Go to the bin directory of Exchange installation. - Run the Eseutil with below command C:\program files\microsoft\exchange server\bin> Eseutil /d c:\program files\exchange server\PublicFolderDatabasePath\<database_name>.edb Eseutil /D Defragmentation Mode http://technet.microsoft.com/en-us/library/aa997972.aspx How to Run Eseutil /D (Defragmentation) http://technet.microsoft.com/en-us/library/aa998863.aspx Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2009 4:43pm

I run the command its giev me following error because my directory name and edb file name has space in between.C:\Program Files\Microsoft\Exchange Server\Bin>eseutil /d e:\Exchange Server\Second Storage Group\Public Folder Database.edb Usage Error: Invalid argument 'Server\Second'. Options must be preceded by '-' or '/'. Extensible Storage Engine Utilities for Microsoft(R) Exchange ServerVersion 08.01Copyright (C) Microsoft Corporation. All Rights Reserved. DESCRIPTION: Database utilities for the Extensible Storage Engine for Microsoft(R) Exchange Server. MODES OF OPERATION: Defragmentation: ESEUTIL /d <database name> [options] Recovery: ESEUTIL /r <logfile base name> [options] Integrity: ESEUTIL /g <database name> [options] Checksum: ESEUTIL /k <file name> [options] Repair: ESEUTIL /p <database name> [options] File Dump: ESEUTIL /m[mode-modifier] <filename> Copy File: ESEUTIL /y <source file> [options] Restore: ESEUTIL /c[mode-modifier] <path name> [options] <<<<< Press a key for more help >>>>>D=Defragmentation, R=Recovery, G=inteGrity, K=checKsum,P=rePair, M=file duMp, Y=copY file, C=restore=> DEFRAGMENTATION/COMPACTION: DESCRIPTION: Performs off-line compaction of a database. SYNTAX: ESEUTIL /d <database name> [options] PARAMETERS: <database name> - filename of database to compact OPTIONS: zero or more of the following switches, separated by a space: /t<db> - set temp. database name (default: TEMPDFRG*.EDB) /p - preserve temporary database (ie. don't instate) /b<db> - make backup copy under the specified name /8 - set 8k database page size (default: auto-detect) /4 - set 4k database page size (default: auto-detect) /o - suppress logo NOTES: 1) If instating is disabled (ie. /p), the original database is preserved uncompacted, and the temporary database will contain the defragmented version of the database.NzmNzm
September 11th, 2009 11:36am

Give the path between double quote. C:\Program Files\Microsoft\Exchange Server\Bin>eseutil /d "e:\Exchange Server\Second Storage Group\Public Folder Database.edb"Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 11:51am

Thank you very much. It worked, my public folder size has come down to 2.3GB from 56GB.NzmNzm
September 11th, 2009 12:00pm

Really quick, just in 10 mins defrag completed... :)Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 12:02pm

yes really quick.NzmNzm
September 11th, 2009 12:15pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics