Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

defragging an exchange 5.5 database 3

Status
Not open for further replies.

dpu

IS-IT--Management
Jan 24, 2005
179
0
0
US
My priv.edb database on my Exchange 5.5 is a little over 13 GB. It has never been defragged. There is not enough room on the server to perform the defrag. My question is can I just copy the priv.edb database over to another server with more room and run the esutil.exe to defrag the database then just copy the newly defragged .edb back onto the Exchange database?
 
I do this all the time for the same reason as you. Not enough room on the exchange server.

You need to have a mapped drive to a server with more room. For our purposes, lets call it drive G:

First I stop all exchange server services.
Next, I copy the priv.edb file to the g:\exchange directory on the other server (best to have a copy in case something goes wrong).
Then I run the following command:

eseutil /d /ispriv /tg:\exchange\tempdfrg.edb

/d - is a database switch
/ispriv - Private Information Store
/t<filename> - Creates and renames the new compacted database in the specified path

This will defrag your Exchange database to an alternate server. Once the defrag is complete, it copies the defragged tempdfrg.edb file back to your original priv.edb file on your Exchange server.

Please note that performing this operation over a network connection, that it will take a bit longer (in my case about 2 hours). The first hour for compression, and the second hour to copy back to the original database. The utililty will look like it has stalled (ie second hour), but be patient, and wait until you are returned to the command prompt.

Once completed, I normally reboot the Exchange server to get Exchange services restarted. Test it out to make sure it is running, and if all is well, you can go back to the second file server and delete tempdfrg.edb and your copy of priv.edb.

cheers.gif

Help! I've fallen and I can't reach my beer.
 
Ok, let me make sure i understand this. If the priv.edb is on C:\exchsrvr\mdbdata folder on the Exchange 5.5 server. I copy this (priv.edb) to another server using the mapped drive. I then run eseutil /d /ispriv /t g:\exchange\tempdfrg.edb. Once the defrag is complete will it automatically copy the defragged database to the original location and will it be now renamed tempdfrg. Also what is the difference between running the eseutil command to include the path of the priv.edb (i.e eseutil.exe /d c:\program files\exchsrvr\mdbdata\priv.edb) vs. just eseutil /d /ispriv? I aplogize for the questions I've never defragged the server and I am worried about the consequences.
 
Yes, copy the priv.edb to the other server using the mapped drive (in this case g:\exchange). This is your backup copy of priv.edb in case something goes wrong (ie server crash in middle of operation).

Yes, then run the eseutil /d /ispriv /tg:\exchange\tempdfrg.edb command. Please note there is no space between the "t" and the "g:".

Once complete, it will automatically copy the defragged database to the original location and original filename (ie. tempdfrg.edb will be copied back to priv.edb in the original location).

/ispriv and /ispub are standard command line switches. The Exchange server utility eseutil.exe knows where your databases are, so no need to path directly to them. I'm not even sure if "exeutil.exe /d c:\program files\exchsrvr\mdbdata\priv.edb" would be a valid command.

cheers.gif

Help! I've fallen and I can't reach my beer.
 
Ok, thanks. I'll give this a shot.
 
Have you read faq10-6005 before you go to all this effort?
 
I have read this FAQ and it was very informative. I performed the defrag just as you outlined and so far it worked like a charm. My database went from 13+ GB to 7GB. Based on the FAQ I will need to make sure that all my users continue to delete items. We are planning to migrate to Exchange 2003 which I understand can perform a nightly defrag of the database. Thanks for your help!
 
Both 5.5 and 2K3 do a nightly ONLINE defrag of the database. Neither does a nightly OFFLINE defrag of the database.
 
Folks,

I also need to do this tonight, and was wondering if I can get away with using a samba share as the remote location? I dont see any issue, but want to make sure before I go crazy :)

Thanks

-Roy
 
I used the advice above and it worked like a charm. I didn't have enough space to run the defrag so I took a chance and ran it from another drive with ample space.

Since eseutil searches the registry it figures out where priv.edb is located and works out the path. I kept trying to give it the path and it would fail with an 'out of space' message. Have a backup of the original and give it a try.

Kevin Sweeney
Nothings' so simple you can't complicate it!
 
In the past, worked like a charm for me as well, unfortunately now, my results are less fortunate.

Here is the exact command I have run in the past:

Eseutil /d d:\exchsrvr\mdbdata\priv.edb /ts:\tempdfrg.edb

It worked great and I was able to free up several Gig of space. But now, running the same command, I am only gaining 22k of space! (I have deleted nearly 6 gig from user mail boxes before the defrag, retention is set to 0) So i do not understand what I am not gaining the space back after the offline defrag.

What exactly does the switch /ispriv do? Should I expect different results from the following two commands?

Eseutil /d d:\exchsrvr\mdbdata\priv.edb /ts:\tempdfrg.edb
vs.
Eseutil /d /ispriv d:\exchsrvr\mdbdata\priv.edb /ts:\tempdfrg.edb

Thanks!
Dan

 
Maybe you don't have that much white space left - have you checked it?

The switch /ispriv works with the /d option, and means that instead of having to specify the filename and path of the db file that you want to defrag, it looks this info up in the registry - therefore your second command is technically wrong, you would specify either:

Eseutil /d d:\exchsrvr\mdbdata\priv.edb /ts:\tempdfrg.edb

or

Eseutil /d /ispriv /ts:\tempdfrg.edb

This info is in the online help, if you type eseutil /? and press D for defragmentation, and look at the notes.

 
I don't know why no one responding to this thread has set the record straight!

The ONLY time it is necessary to perform an offline defrag of an Exchange 5.5 server is when you absolutley MUST reclaim disc space. Exchange 5.5 performs a nightly online defrag, as has been pointed out. What has not been pointed out is that there is always a defrag process running when the system is not busy. Neither of these processes restores the empty space to the operating system. Whenever messages or attachments are deleted by a user, empty space is created within the database. Exchange uses this empty space before using more disk space. To be sure, the empty space is included in backups, but the backup systems are much faster than the defrag process.
 
O.K, I have used the offline defrag in the past to free up space and it's worked fine - I tried it last night after a week of deleting and archiving over 5gb of email data and to my suprise (and horror as I have only about 500mb of space left on my server)I found it only freed up 800mb.

After investigation I found that deleted items retention is set to 30 days - it's only been 7 days since I did the 5gb of email houskeeping.

So, is this the reason why I did not have the extra 5gb of mail I was expecting or have I missed something else?

Thanks in advance to any replies!
 
Yes, the 30 day retention period is why you're not seeing the extra 5 GB that you were expecting. Unles the users held the delete key down when deleting their email then it is being regtained for 30 days.

Have your users, if using Outlook, go into tools ->recover deleted items and delete the mail from there. Alternatively, temporarily or permanently set your retention period for less. We use 7 days and I've never had a user need to recover a deleted email that was older than that.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top