1

I am not quite sure how to title this post, so please bear with me as I explain what is going on...

I am using ArcGIS 10.7.1 with OracleDB as our database back-end.

I have a table with approximately 310k records. I need to append records from another table but it won't let me due to an error within ArcPy which says 'Failure to Insert record' which leads to an error within OracleDB to throw 'ORA 000001 Unique Constraint 'SDE.R78_ROWID_UK' Violated'.

I know that the issue is being caused by duplicate 'ObjectID''s conflicting with one another, but I am not quite how to resolve said issue. I just want to be able to append the new records and assign them a new 'ObjectID'.

I had an idea to unRegister the table & then append, because I have read in ESRI documentation that registering a table to a database is what assigns the 'ObjectID' within ArcGIS geodatabases.

Am I going down the wrong rabbit hole with my thinking for dealing with this problem?

5
  • You don't state how you're inserting rows, but it appears to be incorrect. The general rule of thumb is to leave the registered rowid column out of the INSERT column list, leaving ArcObjects/ArcPy to assign unique values. Commented Jun 9, 2020 at 16:48
  • @Vince Hey Vince, Im using the built in arcPy methods for inserting or appending records, the append managment function to be exact. Commented Jun 9, 2020 at 17:15
  • Please Edit the question to contain details, including the "Copy as Python snippet" from Geoprocessing results. If you're using the right procedure, then your geodatabase has been corrupted, and you'll need to delve backward in time to how the feature class was created and modified. Commented Jun 9, 2020 at 17:19
  • @Vince Is there a surefire way to tell if the Feature Class is corrupted? anyway I could do a test? Commented Jun 9, 2020 at 17:23
  • Tech Support is the best mechanism for both making that determination and for fixing it. Commented Jun 9, 2020 at 17:24

2 Answers 2

0

There are documented workflows for editing data using SQL but you must determine if your data is versioned or if it participates in complex geodatabase functionality. ESRI uses delta tables to allow multiuser editing workflows and these must be taken into consideration when using SQL to make transactions by editing via a versioned view. SDE incudes procedures for creating versions and views to do so. Inserts to the versioned view result in generation of a SDE managed Object ID.

I'd suggest reading all of the documentation related to interacting with SDE using SQL but these are the most relevent:

https://desktop.arcgis.com/en/arcmap/10.7/manage-data/using-sql-with-gdbs/sql-access-to-geodatabase-data.htm

For versioned data in Oracle:

https://desktop.arcgis.com/en/arcmap/10.7/manage-data/using-sql-with-gdbs/overview-edit-versioned-data-with-sql.htm

https://desktop.arcgis.com/en/arcmap/10.3/manage-data/using-sql-with-gdbs/edit-versioned-data-using-sql-oracle.htm

I will also note that I believe in older versions of SDE (cir. pre-10.4) a different workflow was supported for editing geodatabase data without a versioned view for example there were functions allocating of object IDs. I would be careful to reference version specific documentation.

-1

There is no possible way to unregister the table once registered with the geodatabase. We can try to create a new table from Oracle and then append from that table example CREATE TABLE tablename as SELECT * from the_registered_table. Append the data to this table > Register this table with GDB > Append from this table to the original table.

1
  • You certainly can unregister a table -- by deleting it from ArcObjects/ArcPy/UI. This answer does not address the issue of unique key constraints. Commented Mar 6, 2021 at 20:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.