Document ID: TEC510609
You're running a CA Arcserve RHA scenario and you encounter the following error in the RHA manager:
'Unable to Execute Write for : The Process Cannot Access the File Because it is Being Used by Another Process (32)'
You will see an error in the RHA event pane similar to the one shown in the screenshot below.
NOTE: The 'HOST/SCENARIO' column in the RHA event pane will reference the host which is returning the error in question, this will may likely be the inactive server. In the example, the master is named 'SQLPRD1' and the replica is named 'SQLDR1'. In the screenshot below the host SQLDR1 (The inactive server) is the host receiving the error.
This issue can occur if you are running a scenario that replicates a database and the database application services are accidentally started on the inactive server.
1. Stop the Database Application services on the inactive server.
2. Restart the scenario and resynchronize the database.
NOTE: When you start an RHA scenario for applications, RHA will stop the DB application services on the inactive server and change the service startup type to manual. This will allow RHA to commit the replicated data directly to the DB files on the inactive server. When a database application is online it will typically automatically mount the databases. When the databases are mounted, the DB application itself has a lock on the files on the file system which prevent RHA from committing replicated changes to those files. RHA specifically sets the DB application service startup type to manual to prevent the DB files from being locked as a result of the service startup type starting the DB instance and automatically mounting the DB files and inadvertently locking the same files as the result of a reboot.
To prevent data corruption as a result of this action, the RHA scenario will need to be stopped and restarted so we can properly resync all the data to the inactive server. If a resync is not done after this error subsequent switchovers and assured recovery tests will fail due to corruption on the inactive server as a result of the act of bringing the DB's on the inactive server online while the scenario is running.
If this error is occuring in a non-database scenario like file server it may be necessary to run a program like 'handle' or 'process monitor' on the server getting the error to determine which process has a lock on the files in the errors. For more information on using Process Monitor to do this advanced troubleshooting please see the following article:
You should also review your antivirus settings and make sure the RHA spool folder is excluded from all types of scans and if possible exclude the RHA engine process (ws_rep.exe) from scans as well if your antivirus has that option. For more on best practices with antivirus exclusions see the following article: