MSExchangeRepl Error: “The process cannot access the file because it is being used by another process.”

Recently my Get-DAGHealth.ps1 report alerted me that the active copy of a mailbox database in the DAG was on a server that was not the first activation preference. This indicated that an unplanned failover had occurred overnight.

A review of the event logs on the server revealed the following event:

Index : 29023683
EntryType : Error
InstanceId : 489
Message : msexchangerepl (3644) An attempt to open the file “D:\Logs\Mailbox Database 1\E01.log” for read only access failed with system error 32 (0×00000020): “The process cannot access the file because it is being used by another process. “. The open file operation will fail with error -1032 (0xfffffbf8).

This indicated that a file lock had occurred, although the server has interpreted that as memory exhaustion and has failed over the database.

Index : 29023694
EntryType : Error
InstanceId : 3221487736
Message : At ’08/07/2013 10:25:19 AM’ the Exchange store database ‘Mailbox Database 1′ copy on this server appears to have failed due to insufficient memory. For more details about the failure, consult the Event log on the server for other “ExchangeStoreDb” events. A successful failover restored service.

After considering the possible causes of a file lock occurring for a transaction log file I discovered that the antivirus software on the server did not have an exclusion configured for the transaction log path. Transaction log files are one of many recommended exclusions for file-level antivirus scanning.

If you are experiencing unplanned failovers of databases in your DAG I recommend reviewing your antivirus exclusions.

About Paul Cunningham

Paul is a Microsoft Exchange Server MVP and publisher of Exchange Server Pro. He also holds several Microsoft certifications including for Exchange Server 2007, 2010 and 2013. Connect with Paul on Twitter and Google+.

Leave a Comment


We are an Authorized DigiCert™ SSL Partner.