Sunday, September 21, 2008

Tricking Exchange - A Different Database Move

The issue arose of moving a database to a new location.  Now there are built in commands for this:

FOR LOGS:
Move-StorageGroupPath -identity SERVER\StorageGroup -LogFolderPath X:\PathToLogFiles -SystemFolderPath X:\SystemFolderPath

FOR DATABASES:
Move-DatabasePath  Server\StorageGroup\MailboxStore -EDBFilePath X:\PathToDatabase

The problem was that we wanted to specifically use eseutil to move the databases.  We used eseutil to push a good copy over, however, we couldn't repoint the database without Exchange trying to copy it over.  I believe you can repoint the registry, but we opted to just trick Exchange in a manner of speaking.  Due to size constraints, we created a new empty database, ran the above command to move it, then deleted the new database and replaced it with the eseutil copied one.  This mounted up and worked great.

An alternative method to the normal methods of moving it over if you have odd circumstances to work under.

2 comments:

jerephil said...

You could have saved yourself a lot of work. :)

The ConfigurationOnly parameter changes the configuration of the database without moving any files. A value of $true only changes the configuration in Active Directory. A value of $false changes the configuration in Active Directory and moves the files. The default value is $true.

Joshua Raymond said...

Ah Capital! In my midnight stupor I mistook that for -WhatIf for some reason. It certainly would have been more proper in Exchange's eyes, though luckily it didn't take long to do it my strange way either. Thanks for the note on that though.