Select to view content in your preferred language

Preserving GlobalID from enterprise database to fileGDB

551
5
01-21-2026 03:20 AM
YoavTal
New Contributor

We are trying to export data from Microsoft SQL SEREVER 2019 to FileGDB. we implement this by utilizing a python script to put the data into a FileGDB template. The issue we encountering is that the GlobalID from the SQL database is not preserved in the fileGDB. Any ideas for solving this problem?

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

Preserve Global IDs (Environment setting)—ArcGIS Pro | Documentation

does this apply to your situation?


... sort of retired...
0 Kudos
YoavTal
New Contributor

Thanks. Since we want to run  the python externally, this solution will not help. It works only in ArcPro.

0 Kudos
RyanUthoff
MVP Regular Contributor

What do you mean by you want to run the python externally? Does that mean you do not want to use ArcPy since that requires ArcGIS Pro (even if you run it completely outside of ArcGIS Pro)?

If you're fine using ArcPy, @DanPatterson's solution should work since you can set that parameter in the Python script. 

0 Kudos
DavidSolari
MVP Regular Contributor

If Preserve Global ID won't fit your workflow: create the destination feature class with the "Guid" field type for every Global ID field. When you append the Global ID will be stored as-is in that Guid field. This also works with Object ID fields, just use "Long" (or the new 64-bit field type if needed) instead of "Guid".

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi All

The Append command respect this env but the doc's say it will work only for Enterprise geodatabase (why?)

I checked and the Copy Features also respect this env and it let you copy the layer from Enterprise to FGDB and keep the global ids