System process is locking my database file MDF

3.2k Views Asked by At

I can't access my database file, because "System Process" is locking it. SQL server services are NOT running at the moment.

How to stop this locking for I have the ability to move a file or do something with it?

EDIT 1

So, I have solved the problem, but the actual reason of locking remains unknown for me.

I used Unlocker program, which also could not determine the locking source, but has a feature to program file move on system reboot. I did this and then put another version of a file, copied and modified earlier.

This new fila also as moved old one were never locked in the same way. The active file is locked by sqlservr.exe process which looks usual. No unremoveable locking occur.

2

There are 2 best solutions below

0
On

Use sysinternals ProcMon to see what is using the file...

0
On

As already mentioned, you might have luck with tool like the ones from Sysinternals e.g. Process Explorer as it might point to a specific process. This might give you additional information in future.

Often, the anti-virus software can grab and hold a lock e.g. during a scan.