Error: Couldn't get write lock
DROP_TABLE_Students
Posts: 50 Silver 1
Getting these errors frequently recently. Usually a refresh will be successful. Anyone know what the problem is? Running latest available version of SSC and SSMS 18.9.2.
Tagged:
Answers
If this doesn't fix this issue for you, would it be possible to get a copy of the log file (https://documentation.red-gate.com/soc7/troubleshooting/logging-and-log-files)?
Dan Jary | Redgate Software
Have you visited our Help Center?
I have added "C:\Users\my_user_name\AppData\Local\Red Gate\SQL Source Control 7" to my Microsoft Defender exclusions. I'll monitor and see if the issue comes up again - if so, I'll send logs.
Dan Jary | Redgate Software
Have you visited our Help Center?
Curious as to what are the specific files it's trying to get a lock on, and why is trying to write when it's looking for differences? This is only happening after I click on a database and I'm waiting for SSC to find any pending changes. If it matters, we use the shared development model.
Dan Jary | Redgate Software
Have you visited our Help Center?
Dan Jary | Redgate Software
Have you visited our Help Center?
Dan Jary | Redgate Software
Have you visited our Help Center?
Also, there has been a suggestion that a change included in SQL Source Control v.7.2.32 could possibly be causing this issue. Are you able try using the previous version (v7.2.31 - https://download.red-gate.com/checkforupdates/SQLSourceControl/SQLSourceControl_7.2.31.12796.exe) and then v7.2.32 (https://download.red-gate.com/checkforupdates/SQLSourceControl/SQLSourceControl_7.2.32.12853.exe) to see if you see this same issue in both versions?
Dan Jary | Redgate Software
Have you visited our Help Center?
No - I'd estimate about 25% of the time
Does it happen when switching from one database to another?
Yes, sometimes
Were there any pending changes on the database?
Sometimes yes and sometimes no - seems unrelated to pending changes
Were there any changes on the linked TFS repository?
Sometimes yes and sometimes no - seems unrelated
Does it only reproduce on one/certain database(s), or can reproduce it on any database?
Happens on any databases
Does it only happen with TFS repository (does it still occur when using git or working folder)?
Like @pablolerner, we only use TFS because this is a restriction to use SSC in the Shared Dev Model.
I've been busy lately, but when I get some time I will try 7.2.31 to see if it's any different. Thanks @pablolerner for testing with the LockHunter application - I'm not able to install unknown 3rd party software on my company machine without jumping through hoops.
Dan Jary | Redgate Software
Have you visited our Help Center?
Dan Jary | Redgate Software
Have you visited our Help Center?
Dan Jary | Redgate Software
Have you visited our Help Center?
Dan Jary | Redgate Software
Have you visited our Help Center?
Sorry this took so long to get to.
I was not able to replicate the issue in 7.2.31.
I was able to replicate the issue in 7.2.32.
Hope this helps narrow down the root cause.