I have created a Python script to automate the maintenance process for our enterprise geodatabase. The script checks to ensure that there are no locks before performing the maintenance tasks (e.g. Compressing the database). I'm using arcpy.TestSchemaLock to check for locks on 200+ feature classes. TestSchemaLock returns False for more than 30 feature classes, indicating that locks exist. However, when I open ArcMap, right-click the connection file, select Administration > Administer Geodatabase, and go to the Locks tab, there are no locks found. The only user listed on the Connections tab is the admin user that I am connected as.
Are these phantom locks? How can they be removed? Is there an alternative way to check for locks? Checking for *.lock files works for a file geodatabase, but not an enterprise geodatabase.
We are using ArcGIS Server 10.1 + MS SQL Server + direct connect.
Thanks in advance.