White space in Database

We have a Database size around 900 GB in exchange 2010 SP3 . Database is in DAG. I suspect there is a lot of white space in database. Can someone tell me the way to calculate the exact white space in database?

September 8th, 2015 1:37pm

This command is sometimes recommended to measure that:

Get-MailboxDatabase -Status | Select-Object Server,Name,AvailableNewMailboxSpace

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 2:26pm

Hi ,

This is for information .

Please use the below mentioned command to check the actual white space in the exchange database .

http://blogs.technet.com/b/rmilne/archive/2013/08/20/how-to-check-database-white-space-in-exchange.aspx

Note : Eseutil /MS "path of the database file"

Database should have to be in the dismounted state while you run that command against the targeted database

September 8th, 2015 3:10pm

Hi, 

In earlier versions of Exchange, after the online defrag of an Exchange database was completed, event 1221 was logged in the event viewer which would give the amount of available white space. In Exchange 2010 this process is running 247 so an event is not logged. There is an easy way to find out the amount of white space by running the following commands in the Exchange Management Shell:

This next command will give you the amount of available white space for each database and list the server the database is mounted on (in a DAG scenario it will list the server the active copy of the database is running on):

Get-MailboxDatabase -Status | select Identity,servername,AvailableNewMailboxSpace

If you want to reclaim the whitespace in a database, you need to perform an offline defrag.  You will dismount the database and run the Eseutil /D command

Regards,

David

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 2:27am

<independence day>That's not entirely accurate Mr president......

</independence day>

Look at the blog post above please David.  That cmdlet will not give you correct data.

September 9th, 2015 12:51pm

Unfortunately, it looks like this command (which I also suggested) does not provide accurate results:

Get-MailboxDatabase -Status | select Identity,servername,AvailableNewMailboxSpace

"So NewAvailableMailboxSpace looks good?  Well not so much.  This parameter only looks at the root portion of the database. "

That's from Nithyanandham's link above.

I would be interesting in knowing how much of a difference there is between the number given by "AvailableNewMailboxSpace" and eseutil but I do not have a database that I can take offline to test (my test databases are probably too small to provide meaningful results).

Also, it looks like a mailbox move to a new database is recommended more and more often rather than the traditional offline defrag:

http://blogs.technet.com/b/exchange/archive/2011/12/14/database-maintenance-in-exchange-2010.aspx

"Naturally, after seeing the available whitespace in the database, the question that always ensues is how can I reclaim the whitespace?

Many assume the answer is to perform an offline defragmentation of the database using ESEUTIL. However, that's not our recommendation. When you perform an offline defragmentation you create an entirely brand new database and the operations performed to create this new database are not logged in transaction logs. The new database also has a new database signature, which means that you invalidate the database copies associated with this database."

I interpret that to mean you might have problems if you are using a DAG.

Rhoderick Milne: could you confirm that is what we should be concerned about here?

In either case, I believe the operation will require disk space equivalent to that of the database that you are defragmenting / moving the mailboxes.

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 1:05pm

Hi David,

Concern was that the cmdlet says it is doing the right thing, but in reality it is not. 

All the points should be covered in both of my posts here:

http://blogs.technet.com/b/rmilne/archive/2013/08/20/how-to-check-database-white-space-in-exchange.aspx

and

http://blogs.technet.com/b/rmilne/archive/2013/08/23/offline-defrag-and-dag-databases_2c00_-oh-my_2100_.aspx

September 9th, 2015 1:24pm

Thanks Everyone for your responses. From the information I have gathered it seems that AvailableNewMailboxSpace does not  give the correct amount of white space. In my case it is showing 120 GB for a 1 TB of database. Which is not correct I guess. Also to go with ESUTIL option to check for whitespace is not feasible in production environment as you have to dismount DB. There is a script to generate exchange environment

https://gallery.technet.microsoft.com/office/Generate-Exchange-2388e7c9 

which gives the DB whitespace also. Not sure if it gives the correct amount of whitespace in EX2010 SP3 also. Can anyone suggest???

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 9:02am

From StevieG's excellent script:

# DB Size / Whitespace Info 
        [long]$Size = $Database.DatabaseSize.ToBytes() 
        [long]$Whitespace = $Database.AvailableNewMailboxSpace.ToBytes() 

What do you think it uses?

September 10th, 2015 9:22am

Thanks Rhoderick. I was also thinking it shows AvailableNewMailboxSpace only. So based upon our discussion here it can be concluded that exact whitespace can not be determined in EX2010 without dismounting the database and using ESUTIL option.
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 3:39am

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

Other recent topics Other recent topics