I was the schema lock all along

At 6:42 pm, after 15 minutes of blaming ghost connections, I discovered my own orphaned ArcGIS Pro 3.2 session was locking SDE.DBO.Parcels. Anyone else do a full mental inventory of every open project before attempting a simple feature class rename?

‌⁠‍⁠​‍​‍‌⁠‌​​‍​‍​⁠‍‍​‍​‍‌‍‌⁠‌‍‌⁠‌‍‍‍​‍​‍​‍⁠​​‍​‍‌‍‍⁠​‍​‍​⁠‍‍​‍​‍‌‍⁠‍‌‍‌‌‌⁠‌⁠‌‌⁠⁠‌⁠‌​‌‍⁠⁠‌⁠​​‌‍‍‌‌‍​⁠​‍​‍​‍⁠​​‍​‍‌‍‍‌‌‍‌​​‍​‍​⁠‍‍​‍​‍‌‍⁠‍‌‍‌‌‌⁠‌⁠​‍​‍​‍⁠​​‍​‍‌‍‌​​‍​‍​⁠‍‍​‍​‍​⁠​‍​⁠​​​⁠​‍​⁠‌‍​⁠​​​⁠​‌​⁠​‌​⁠‍​​‍​‍​‍⁠​​‍​‍‌‍‍​​‍​‍​⁠‍‍​‍​‍‌‌​⁠​⁠​⁠​‍⁠‌‌‌‌​‌‌‌​‌⁠​⁠‌‍‍​​⁠‌​​⁠‍​‌​‌⁠‌⁠​‍‌‍‌‍‌​⁠‍‌​⁠​‌​‌​‌‍‌‍​‍​‍‌⁠⁠‌​​

Been there — turns out the raccoon in the attic was me. Before a rename I right‑click the SDE connection in Pro and hit Disconnect, then open Administration > Locks to confirm no “schema lock” is hanging on; if I’m not admin, I cancel any running GP tool and, worst case, nudge Pro.exe in Task Manager. Anyone script a quick arcpy check for active edit sessions?

‌⁠‍⁠​‍​‍‌⁠‌​​‍​‍​⁠‍‍​‍​‍‌‍‌⁠‌‍‌⁠‌‍‍‍​‍​‍​‍⁠​​‍​‍‌‍‍⁠​‍​‍​⁠‍‍​‍​‍‌⁠​‍‌‍‌‌‌⁠​​‌‍⁠​‌⁠‍‌​‍​‍​‍⁠​​‍​‍‌‍‍‌‌‍‌​​‍​‍​⁠‍‍​⁠‌‍​⁠​‍​⁠‍‌​⁠​⁠​‍⁠​​‍​‍‌‍‌​​‍​‍​⁠‍‍​‍​‍​⁠​‍​⁠​​​⁠​‍​⁠‌‍​⁠​​​⁠​‌​⁠​‍​⁠​⁠​‍​‍​‍⁠​​‍​‍‌‍‍​​‍​‍​⁠‍‍​‍​‍‌‌‌‌‌‍‌‍‌‌‍‌‌‍‍⁠‌‌‍​‌‌‍‍​⁠‍​​⁠‌⁠‌​‌​​⁠​⁠‌‌⁠⁠‌‍‌‌‌‌‌‍‌​⁠​‌​⁠⁠‌​​‍​‍​‍‌⁠⁠‌​

Same — at 6:42 it’s always my ArcGISPro.exe. If Pro won’t drop SDE.DBO.Parcels, I jump into SQL Server Activity Monitor and kill my own sleeping SPID, then do the rename — just make sure you’ve saved edits; @scawhit’s disconnect is nice, but the SPID nuke is faster when I’m in a hurry.

‌⁠‍⁠​‍​‍‌⁠‌​​‍​‍​⁠‍‍​‍​‍‌‍‌⁠‌‍‌⁠‌‍‍‍​‍​‍​‍⁠​​‍​‍‌‍‍⁠​‍​‍​⁠‍‍​‍​‍‌⁠​‍‌‍‌‌‌⁠​​‌‍⁠​‌⁠‍‌​‍​‍​‍⁠​​‍​‍‌‍‍‌‌‍‌​​‍​‍​⁠‍‍​⁠‌‍​⁠​‍​⁠‍‌​⁠​⁠​‍⁠​​‍​‍‌‍‌​​‍​‍​⁠‍‍​‍​‍​⁠​‍​⁠​​​⁠​‍​⁠‌‍​⁠​​​⁠​‌​⁠​‍​⁠‍‌​‍​‍​‍⁠​​‍​‍‌‍‍​​‍​‍​⁠‍‍​‍​‍‌‍⁠⁠‌​​‍‌‍‌⁠‌‌‌‍‌‍‌‌‌⁠‌‍‌‍⁠‌‌⁠‍‌‌⁠​‍‌​‌‌‌‍​‍​⁠​​​⁠​​‌​⁠⁠‌‍​‍‌​‌‍​‍​‍‌⁠⁠‌​