I am writing an ArcGIS Pro toolbox tool using Python. I am using arcpy.management.Delete(fc) to delete a feature class and it works on File Geodatabase (*.gdb). However it does not work for a SDE database. I open the Pro and add the feature classes from a SDE database and add my toolbox on Catalog pane. When I try to delete some feature classes, it fails with error message
" ERROR 000601: Cannot delete ..\SECore_Tools_Testing_sde.DBO.point_windmill. May be locked by another application. Failed to execute (Delete)."
For investigating the functionality and access, I use Pro built-in geoprocessing tool "Delete" to delete some feature classes and it works successfully. I can see the deleted feature classes are gone from map even they were on the map.
Please help! Thanks!