Registering a table with Geodatabase fails when GDB_GEOMATTR_DATA exists

810
1
03-11-2020 05:50 AM
AndreasFrid
New Contributor

I'm not sure if this is the correct place to add this "question" or "bug report", but it might help someone else that receives this message.

When i try to register a table that is created within my MS SQL server (without arcgis) and the column GDB_GEOMATTR_DATA exists the tool "register with geodatabase" will fail with the error 999999. 

With the help of MS SQL Profiler i found out that the column that already exists were GDB_GEOMATTR_DATA.

Preferably the geoprocessing tool would not try to add this column if it already exists, or at least inform the user what column that already exists?

Kind Regards 

Andreas

1 Reply
CassKalinski
Occasional Contributor

Additional info for others that may be searching for this like I was. 

The RegisterWithGeodatabase tool now throws out 'ERROR 160328: Cannot create a table with a duplicate column' if the GDB_GEOMATTR_DATA column exists in the table you are trying to register. 

For a python script, I am using  'try...except arcpy.ExecuteError' to trap for this. If ERROR 160328 is presented, it deletes the GDB_GEOMATTR_DATA and reruns RegisterWithGeodatabase(). Registration will recreate that column, so do not be spooked if you see it show up again.

Arcpy 2.9
MS SQL 14
Pro v2.9.1

0 Kudos