Link to home
Start Free TrialLog in
Avatar of Tom Skowyrski
Tom SkowyrskiFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL database files in use by another process prevent backup

Hi

We have SQL database files on the computer Windows 7 Pro x64. We use Asigra for Cloud Backup. Asigra is using VSS backup. The backup started failing a week ago with the error message:
"The process cannot access the file because it is being used by another process." when trying to access .ldf and .mdf files.
I checked the permissions and it is fine. I tried adding exceptions to AVG antivirus but AVG could not access files either.
I used Process Explorer and the files are in use by sqlserv (64 bit) and not sqlserv*32. I checked on another computer we have similar set up and the same backup type and the files over there are not in use by any process.

How can I fix it?
Regards,
Tom
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

Check the status of the VSS writers for SQL:
vssadmin list writers

Open in new window

Will show you the status of everything. There's a different writer for each VSS function, and SQL should have its own. If it shows as failed, SQL can't be backed up with VSS until the problem with VSS is resolved.
Avatar of Tom Skowyrski

ASKER

VSSAdmin list writers reports nor errors for any vss writers including SQL one.
SOLUTION
Avatar of Alexander Ardatov
Alexander Ardatov
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you using the latest version 13.1?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Asigra is 13.1.2.0.

What is weird that this backup worked fine in current set up for over 2 years.

We did not change much recently, except replacing the hard disk and cloning the old one to new one using Acronis in the machine we are having issues with but no other issues.

Also, I should add that sometimes when we check vss list writers, we get time out for all or some of the writers.

What's more, we have the same set up of software and backup on another 2 machines but those two machines have Server OS and the problematic one is Windows 7.
We are just going to backup SQL Backups folder with Asogra monitoring it if no new files have been uploaded so then we will know that SQL Backups script on the local server failed.