If I do a ListDatasets() in python, then I don't get the correct result in the list except for datasets belong to other schema owners, so why can I still see the datasets in ArcCatalog.

The code is staightforward:

workspace = r'Database Connections\\enidb.sde'
arcpy.env.workspace = workspace
dslist = arcpy.ListDatasets()

The dslist is empty bar the CULTURAL.ESRI_DATASETS - I should be able to see all the ENIDB ones as I am logged in as that schema owner:

enter image description here enter image description here

Any clues folks?

1 Answer 1


I found out the problem just use :


and this clears any locks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.