Solved

moving Exchange 2013 mailbox database logs

Posted on 2014-11-24
12
619 Views
Last Modified: 2014-11-24
Hi,
I have had an issue where the Exchange 2013 server has used up the vast majority of the disk space on the server's C: drive, so I ran the PowerShell commands to move the database which has worked successfully.  However there are also a huge amount of files with names like "E00000000C8.log".  How can I instruct Exchange to relocate that folder to my new drive "E:\MailboxLogs"?  I have found procedures to list the log files using:

Get-TransportServer MailServerName | select *logpath

This lists me all the log paths for my server but none are in the same location as where the mailbox database used to be. So there must be another PowerShell command that can instruct the Exchange Server to relocate these logs?

Any help appreciated.

Siv
0
Comment
Question by:Siv
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 5

Expert Comment

by:basil2912
ID: 40461975
Use Move-DatabasePath:
http://technet.microsoft.com/en-us/library/bb124742(v=exchg.150).aspx

Be aware that while the move is occurring the DB will be offline.
0
 
LVL 18

Assisted Solution

by:suriyaehnop
suriyaehnop earned 167 total points
ID: 40462000
“DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb” –LogFolderpath “C:\Newlocation” 

Open in new window


http://careexchange.in/how-to-move-database-path-and-log-folder-path-in-exchange-2013/
0
 
LVL 8

Accepted Solution

by:
tshearon earned 333 total points
ID: 40462024
"Move-DatabasePath -LogFolderPath <path>"

This should have been done when you moved the database as it is just an additional switch to the move-database cmdlet. No biggie, you can just move the logfolderpath itself as I have shown above.
0
 

Author Comment

by:Siv
ID: 40462038
suriyaehnop,
As I have already moved the .edb file can I run this command again if I run this command:

[PS] C:\scripts>Get-MailboxDatabase "Mailbox Database 0828182752" | FL Name,*Path*


Name                    : Mailbox Database 0828182752
EdbFilePath             : E:\MailboxDatabase\Mailbox Database 0828182752.edb
LogFolderPath           : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 0828182752
TemporaryDataFolderPath :

As you can see my edb is in my E:\MailboxDatabase folder already and I want my logs in E:\MailboxLogs\ if I run the command to move the database as well as the logs will that cause any issues or will it just ignore the edb file if the path is the same as its current path?

Siv
0
 
LVL 8

Expert Comment

by:tshearon
ID: 40462043
If you just run the command I gave you above and specify the database with only the logfolerpath attribute then only the logfolderpath will move/change.
0
 
LVL 18

Expert Comment

by:suriyaehnop
ID: 40462069
Like tshearon said just run Move-Databasepath <databasename> -LogFilePath -Whatif. With "-whatif" it will let know you know the result of cmdlet. it doesn't exactly execute teh cmdlet, it like a testing. If you're ok with the result, you can run the repeat the cmdlet without specify "-whatif"
0
Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

 

Author Comment

by:Siv
ID: 40462129
I tried the command and it gave me this error:

[PS] C:\scripts>Move-DatabasePath -LogFolderPath E:\MailboxLogs\MailLogs

cmdlet Move-DatabasePath at command pipeline position 1
Supply values for the following parameters:
Identity: Mailbox Database 0828182752
Failed to connect to target server "ACMMAIL". Error: WMI exception occurred on server 'ACMMail.ACMorgannwg.local':
Quota violation
    + CategoryInfo          : InvalidOperation: (Mailbox Database 0828182752:DatabaseIdParameter) [Move-DatabasePath],
    InvalidOperationException
    + FullyQualifiedErrorId : BC23C35,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
    + PSComputerName        : acmmail.acmorgannwg.local

I did this without dismounting the database first so I am now re-running with the database dismounted and running this command:

Move-DatabasePath -Identity "Mailbox Database 0828182752" -LogFolderPath E:\MailboxLogs\MailLogs

It seems to be going longer before erroring? but if you have any ideas what might be causing the error I would like to hear what that is.

Siv
0
 

Author Comment

by:Siv
ID: 40462140
Bah!
It failed again with the same Quota Violation?

anyone know what would be causing that?

Siv
0
 

Author Comment

by:Siv
ID: 40462167
I checked the location where the log files are being moved to and there are no quotas set for that drive? I also checked the permissions and they are full control for administrators and for domain users its everything but full control and special permissions?  The error text sounds like it's something in Exchange Server?

Failed to connect to target server "ACMMAIL". Error: WMI exception occurred on server 'ACMMail.ACMorgannwg.local':
Quota violation
    + CategoryInfo          : InvalidOperation: (Mailbox Database 0828182752:DatabaseIdParameter) [Move-DatabasePath],
    InvalidOperationException
    + FullyQualifiedErrorId : BC23C35,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
    + PSComputerName        : acmmail.acmorgannwg.local

I am stumped now, I looked up the FullyQualifiedErrorID and there is nothing returned for that error?

Am looking into the Quota Violation to see if there is anything about that?

Siv
0
 
LVL 8

Assisted Solution

by:tshearon
tshearon earned 333 total points
ID: 40462168
Too many log files. You will need to remove some manually or through backup of the database first. If you manually remove some of them just make sure they have been committed to the database. Start with the oldest ones and copy them somewhere else for the time being and then try again.
0
 

Author Comment

by:Siv
ID: 40462316
tshearon,
Thanks for the advice, I have dismounted the database and then ran:

eseutil /MH "E:\MailboxDatabase\Mailbox Database 0828182752.edb"

I then checked for the State being "Clean Shutdown" which it was:
Extensible Storage Engine Utilities for Mic
Version 15.00
Copyright (C) Microsoft Corporation. All Ri

Initiating FILE DUMP mode...
         Database: E:\MailboxDatabase\Mailb


DATABASE HEADER:
Checksum Information:
Expected Checksum: 0x08cda997
  Actual Checksum: 0x08cda997

Fields:
        File Type: Database
         Checksum: 0x8cda997
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,20
 Engine ulVersion: 0x620,20
Created ulVersion: 0x620,20
     DB Signature: Create time:03/28/2014 1
         cbDbPage: 32768
           dbtime: 84510640 (0x50987b0)
            State: Clean Shutdown
     Log Required: 0-0 (0x0-0x0)
    Log Committed: 0-0 (0x0-0x0)

I then manually deleted all the .log files and the .chk file as per this blog post:

http://clintboessen.blogspot.com.au/2010/09/flush-transaction-logs-in-exchange.html

I was then able to run the command though because I had removed all log files I had to add this switch
( -ConfigurationOnly ):

Move-DatabasePath -configurationOnly -Identity "Mailbox Database 0828182752" -LogFolderPath E:\MailboxLogs\MailLogs

And then the commdn completed successfully.  If I now do :

[PS] C:\Windows\system32>Get-MailboxDatabase "Mailbox Database 0828182752" | FL Name,*Path*


Name                    : Mailbox Database 0828182752
EdbFilePath             : E:\MailboxDatabase\Mailbox Database 0828182752.edb
LogFolderPath           : E:\MailboxLogs\MailLogs
TemporaryDataFolderPath :

The logs are where I want them to be and I now have 77GB free on the C: drive so all is right with the World again!

Siv
0
 

Author Closing Comment

by:Siv
ID: 40462335
Thanks to tshearon and suriyaehnop I now have the system under control and loads of free space on the server's C: drive.
Thanks for all your help, another lesson learned today.

Siv
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Resolve DNS query failed errors for Exchange
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now