Select to view content in your preferred language

Attachment out of sync with the corresponding feature class

377
2
11-03-2024 04:45 PM
yockee
by
Frequent Contributor

I have successfully (sort of..) exported attachments that contain many photos. Here is what I do in order:

1. Copy the Feature Class. 

2. Paste it on the target SDE geodatabase Postgresql. This will copy the whole thing, including the relationship class

Error comes up. Not all pictures are copied but the whole objects in the Feature Class are copied.

3. I create a new the attachment table with random name. Then turn it into UNLOGGED (ALTER TABLE mytable SET UNLOGGED; then start copying. After 4 hours, the whole attachments are copied successfully. No errors. 

4. I set the table back to LOG.

5. Rename the attachment table above to the original hoping that it will sync automatically

6. Reindex the table.

Then I do random check. Seems that the attachment picture is wrong. One object should have a picture of "mountain", but instead I get "sea". 

How can I fix the relationship table ?

I am using: Arcgis Pro 11.0 and Arcgis Enterprise 11.0 with Postgresql 17


thanks

 

 

 

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

what is the source?  Is it a feature class with attachments?  If so, for this type of thing, I often just create an empty featureclass in my SDE with matching fields, enable attachments on the new FC, then use append tool with preserve attachments = True to 'copy' the features and attachments into the new featureclass.

R_

0 Kudos
yockee
by
Frequent Contributor

The source is from another table on the same schema in the same database.

I just solved it... 

Suppose the old table (the original attachment table that the relationship class is mapped to) failed to be loaded. then there is this new table (completely new but with exactly the same schema). I succesfully load the attachment into this new table. So now, I have 2 tabels: one is the old attachment (with a few thousand picture data), second is the new table (with all picture data)

The main problem is that the attachment can not be re-synced to a new table.

 

I tried several attempts using all geoprocessing tools relating to attachment. But all fail. Even using Load data (rigtht click on the target table), it gives out error "00117 Attachments are not supported in this Geodatabase release". Funny, these attachment tables are on exactly the same schema in the same database.

Then I try to load data using query: insert into schem1.oldtable_attachment select * from schem1.newtable_attachment;

It works like a charm

0 Kudos