Hi,
We want to copy branch versioned standalone tables from one GDB to another GDB with GlobalIDs preserved. When we use export tool for this activity, It converts GlobalIDs to text format. We've copied the feature classes using python script and GlobalIDs are preserved without any issue.
We've tried the following ways to copy the stand alone tables which are in relationship with feature classes-
1. TableToGeodatabase function in arcpy: GlobalID field is converted to Text type.
2. copy & paste: Gives error as Underlying DBMS error [[Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'sde.R_featureclassA_featureclassB' and the index name 'UUID_199'. The duplicate key value is (00000000-0000-0000-0000-000000000000).]
'sde.R_featureclassA_featureclassB' is a Relationship class and the table is not related to any of the two feature classes in the relationship class.
3. Export table Geoprocessing tool: GlobalID field is converted to Text type.
Question: Can we export the standalone table without converting the GlobalID field to text type in GDB?
In the Export Table GP tool, if you click the Environments tab near the top there is a Geodatabase Advanced setting checkbox "Preserve Global IDs" that should accomplish what you want.
When using ExportTable with Preserve GlobalIDs, the GlobalID values are preserved, but they are stored as a Text field in the exported table. Once GlobalIDs are reenabled in the properties of the exported table, a proper GlobalID field is created and managed by ArcGIS. Here's the screenshot of the the fields.