Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm looking for the simplest way to track changes ([delete, update, create] feature(s)) made to the DEFAULT version of a given feature class in ArcSDE(10) and Oracle(11g).

Qualifier: I am not a dba and I have only enough of an understanding of versions to get by as a self-proclaimed developer.

I'm trying to avoid:

  1. Mucking around with state IDs, delta tables, and triggers if poss.
  2. Running expensive feature-by-feature comparisons with target datasets.

I'm hoping to access this 'change log' table/query with python/cxOracle or .Net if necessary.

Update: *Here are some additional items I'd like to avoid:*

  1. Developing, deploying, and managing custom editing class extensions to all editing users' machines.
  2. Upgrading to ArcGIS 10.1
share|improve this question
1  
Define "tracking changes". As for "easiest" I find making periodic backups and adding a "date created" and "date modified" field for each feature class (and making sure editors are populating it, either manually or with an add-in/extension) is about as easy as it gets. –  blah238 Mar 12 '12 at 19:05

3 Answers 3

up vote 7 down vote accepted

This is exactly what Historical Versions (aka Archiving) were created for. Go ahead and Enable Archiving in ArcCatalog. Create a Historical Marker for the initial source version and another one for the end. Then you can open the table in a version created from the first marker, another one for a version in the target marker. A difference cursor will spit out all the changes. There are examples on the website that do exactly this.

You will not need to muck with triggers, expensive comparissons nor edit extensions since this is all out-of-the-box functionality. Also has been there since 9.2.

share|improve this answer
    
And what if the DBAs don't want you enabling archiving? :) –  blah238 Mar 12 '12 at 23:10
2  
Ah yes, the kind of DBA that doesn't want to change anything because they are afraid it will make their job more difficult. Show them this: cdn.memegenerator.net/instances/400x/16158389.jpg –  Ragi Yaser Burhum Mar 13 '12 at 0:29
    
oracle has almost the same (database functionality) maybe showing your dba the similarities would convince them to allow the esri model –  Brad Nesom Mar 13 '12 at 14:34
1  
I'm looking at this from an automation point of view (weekly, possibly nightly). Can I programmatically create an historical marker? It doesn't look like it. forums.arcgis.com/threads/23896-Creating-historical-marker (NOTE CHRIS SNYDER'S EXCELLENT RESPONSE). –  valveLondon Mar 14 '12 at 22:42
    
@valveLondon Yes you can. Chris' response is referring to the gp wrapper methods. This arcobjects interface allows you to add markers: help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/… –  Ragi Yaser Burhum Mar 15 '12 at 8:34

I've done this two ways that you might not like ;-)

1) for attribute change tracking we use a database insert/update trigger to populate create_date/create_user, last_update_date/last_update_user columns. You could get more specific and flag when individual attributes have changed. This is handy because it is in the DB, deploy once, use everywhere.

2) we have an ArcMap extension that subscribes to some Editor events when an edit session is started. This sets flags specifically if the shape changed, and specifically how (like we check for flipped arcs, changes in polygon area, etc), Hassle here is the extension has to be deployed and registered on each editor's workstation. Cast the IEditor to the IEditEvents (IEditEvents_Event) interface and see what editor events you can handle. Then for example if you listen to the IEditEvents.OnChangeFeature event, you can cast its arg to an IFeatureChanges to see whether it was the feature's shape that changed, and compare the new shape to the old.

I found this for 9.2 to point you towards the docs: http://edndoc.esri.com/arcobjects/9.2/NET/3e306e15-d0f9-4c0c-a6b7-ef9c69077132.htm

Good luck!

share|improve this answer
    
I like the first bit but I really, really, really don't want to listen to edit events on the clients. –  valveLondon Mar 14 '12 at 22:44
    
Yep. Then you have to figure out if they made an edit. I had this running and someone accidentaly did a calculate geometry in ArcMap and updated every record in the fc's editedby field with their credentials..nice! –  Justin Mar 15 '12 at 17:30

Version ArcGIS 10.1 will include this functionality if you can wait for the release: http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#//01m600000069000000

Otherwise, I would recommend developing an editor extension that responds to the editing events: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Working_with_editing_events/000100000154000000/

Edit: FYI, If you decide to try and use triggers you will want to make sure that you are applying them to the correct tables. If your data is registered as versioned your edits go into the adds and deletes tables first, and they may stay there for some time unless you achieve a full compression, which would move records to the business table. Also keep in mind that a trigger at the oracle level will only be able to determine which oracle user account was connected, not the windows user account that was used to perform the edits in ArcMap. The two can be different, especially if your users share mxds or layer files. Good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.