This error message from SQL Source Control usually occurs due to an anti-virus or similar software locking the file in a process such as scanning.
We recommend adding the SQL Source Control folders to an exclusion list to resolve this issue.
If you still encounter this issue, then the solution is to disable caching altogether in the tool.
To disable caching you would need to edit %localappdata%\Red Gate\SQL Source Control 7\RedGate_SQLSourceControl_Engine_EngineOptions.xml and add the following:
<MaxCacheSizeInMB>0</MaxCacheSizeInMB>
<DisableCaching>True</DisableCaching>
(Please note that %localappdata% usually corresponds to C:\Users(username under which SSMS runs - usually the logged in user)\AppData\Local).
This prevents the cache folder from being populated by the operations you're performing, so the engine options file should look like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!---->
<EngineOptions version="3" type="EngineOptions">
<MaxCacheSizeInMB>0</MaxCacheSizeInMB>
<DisableCaching>True</DisableCaching>
</EngineOptions>
If you close SSMS, change the file, add the new line and delete the Cache folder, it will recreate the Cache folder, but then once you open SSMS and try to perform the operations it shouldn't give you the error anymore.
Was this article helpful?
Articles in this section
- The process cannot access the file 'C:\Users\*******\AppData\Local\Red Gate\SQL Source Control 7\Caches
- Duplicate definition troubleshooting in SQL Source Control
- The target principal name is incorrect
- SQL Source Control can't access this database - make sure the database is online and you have permission to access it
- Meanings of the colored dots in the SSMS Object Explorer for SQL Source Control
- Last Changed By column shows Unknown
- How to Link SQL Source Control to TFS
- How to link to an existing SVN repository
- GIT Push/Pull greyed out
- Objects changed by unknown