Hi all,
Relatively new to python and Model Builder. ArcGIS Pro 3.3.5 and ArcGIS Enterprise 11.3 and SQL Server 2022.
I'm trying to use arcpy.TestSchemaLock in a python script tool in my SQL geodatabase Model Builder model that I'm scheduling to run from the ArcGIS Pro geoprocessing 'schedule the tool'. This is similar to this 10 year old post: https://community.esri.com/t5/python-questions/arcpy-testschemalock/td-p/300632
It seems like arcpy.TestSchemaLock does not work in this scenario as it is always detecting a schema lock when there isn't one. I stop all of my Map Services first in a python script tool my Model.
Has anyone done this before?
I reached out to Esri tech support and their solution was to manually stop the ArcGIS Server Service on the Services window on the server Every Night at the end of the work day then restart it manually Every Morning. There is No Way this is realistic. I guess they think the reason I can't get a schema lock is because that Service is still running. But if I don't include the arcpy.TestSchemaLock python tool in my model it runs just fine. I want to include it in case someone leaves ArcGIS Pro open over night with a SQL connection.
I thought of posting this in the ModelBuilder question area too https://community.esri.com/t5/modelbuilder-questions/bd-p/modelbuilder-questions but maybe an Admin can link it?
Thank you!
Andrea