Select to view content in your preferred language

Control schema locking behavior in ArcGIS Pro

06-12-2024 06:07 AM
Labels (2)
New Contributor II

Is there a way to load a FGDB feature class into an ArcGIS Pro map as read-only with no schema-locking?

I would like to achieve the following scenario:

  • Load a feature class from a file geodatabase as read-only into an ArcGIS Pro map. The point being it will not establish a schema lock, but I can view the data.

The context is - when developing Python scripts with arcpy, I will typically have a Pro project set up to inspect the results and data as I run and debug the scripts.

Because Pro locks the schemas when the map is loaded... I have to shut down Pro to free the lock, run my script, wait for it to complete, open Pro, and then inspect results. During the development process I may have to do this over 100 times.

With an enterprise GDB I can use a Query Layer to establish a read-only layer, however during development our best practice is to use localized FGDBs until the script is debugged and the data has been validated.

Am I missing something? Does anyone have a workaround for this? Feature Request?

5 Replies
Honored Contributor

Assorted thoughts:

  1. As a workaround, would Make Query Table do what you want?
  2. I like your idea of submitting a specific feature request for this.
  3. I see you have voted for File geodatabase query layers. Anyone else viewing this post could vote for it too.
  4. You could consider asking this question in the Python community too, if you haven't already.
  5. As a very last resort, maybe you could create a file geodatabase database view. Views don't lock data.
New Contributor II

Thanks Bud, those are good suggestions I will have to test out. At first glance an FGDB database view may be preferable because I think it would be agnostic of schema changes.

0 Kudos
MVP Regular Contributor

So... why not just run the script from within the Pro Python Window to get around that lock?

0 Kudos
New Contributor II

Mainly because I prefer my IDE, but also we require version control, multiple devs.

0 Kudos
Esri Notable Contributor

There is a Compress File Geodatabase GP tool that sets the GDB, FC and/or FDS to "read-only"  Might be worth an experiment.