Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Wednesday, December 10, 2014

Moving Exchange 2013 Databases Hangs at Validating Path

The consultant that set up my hybrid environment did a very basic install and loaded the mailbox database on the application drive and put the log files in the same folder with the database. We've not bothered backing up the Exchange system as we were not really using the local database.  Now I'm ready to use these on premise databases.  The backup app won't even load with the system configured with the logs and database on the same drive.  When I attempted to move the database the command hung while validating the path.

The problem is that the move database command checks to make sure that you have ~33% free disk space after the move has been completed for both the database and the log files.  Even though they would not be needed and would not be moved by the command there was a huge number of log files because we have not been completing an Exchange aware backup of these servers. 

I had to move the database manually:

1. Dismount the database
Dismount-Database "Mailbox Database

2. Verify clean shut down
Get-MailboxDatabase -Status | % { eseutil /mh $_.edbfilepath } | Select-String -Pattern "State:"

3. Manually copy the database to the new location

4. Verify the command with “what if”
Move-Databasepath “Mailbox Database” –EdbFilepath “F:\MailboxDatabase\Mailbox Database.edb” –LogFolderpath “E:\MailboxLogs” –ConfigurationOnly –whatif

 This checks the path so you’ll get an error if you don’t move the database ahead of time or there is a typo like this - WARNING: The Exchange database file path that you specified, "F:\MailboxDatabase\Mailbox Database.edb", doesn't exist.

5. Move the database using the configuration only command
Move-Databasepath “Mailbox Database” –EdbFilepath “F:\MailboxDatabase\Mailbox Database.edb” –LogFolderpath “E:\MailboxLogs” -ConfigurationOnly

6. Rename the old database to prevent confusion

7. Mount the database
mount-Database "Mailbox Database"

8. Verify logs are being created in E:\MailboxLogs

9. Verify the database is healthy
Get-MailboxDatabase -status |FL AutoDatabaseMountDial, EdbFilePath, LogFolderPath, Mounted

Friday, February 4, 2011

Exchange 2007 – Where Nothing Happens Fast

One thing that I really like about exchange 2007 is The Exchange Management Shell (and Powershell). I try to use it for most of my daily tasks but sometimes it’s just quicker to right-click and pick new.
... until you make a mistake. I meant to create a mailbox database but I created a public folder database.  No big deal right? just delete it. There’s no data on it? Not so fast. Here’s what I get:
Remove-PublicFolderDatabase : Exchange is unable to check the public folder rep
licas. Verify the Microsoft Information Store service is running, and that the da
tabase is properly mounted

OK. FINE I’ll mount the database. GRRRR now I get this:
The public folder database contains folder replicas. Before deleting the public
folder database, remove the folders or move the replicas to another public
folder database. For detailed instructions about how to remove a public folder
database, see http://go.microsoft.com/fwlink/?linkid=81409.

I’m going to rant a little here. I’m wrapping up my 2003 to 2007 migration this month. I really liked that Exchange 2003 had pretty much done away with the little idiosyncrasies we’d come to love/hate about earlier versions. Gone were the days of “Exchange is just that way.” Well I’m starting to see that those days are back.  2007 puts a copy of the public folder hierarchy on all public folder databases.  This is a good thing. But what this means for me right now is that I have to wait for this database to replicate to all of my other public folder servers around the world. I also have to wait for the store cache to flush which may take 2 hours. Then I can delete this database.
Well I have things to do. I can’t wait around all day until Exchange decides it can find all the replicas for this database.  So firing up ADSIEDIT I find the Exchange Administrative Group for 2007, drill down to the Server CN.  Next I expand the container for the server with the wayward public folder and expand the information store container.  Expand the Storage group and delete the database. Now all that’s left is to manually delete the edb file and logs and I can fix my mistake and go home on time.