Select to view content in your preferred language

SQL Trigger on ArcSDE calling Python script

4633
11
11-21-2010 07:41 PM
JanetRogers
Frequent Contributor
I have searched everywhere for this information, but I have not been able to come up with an answer.  I do not have ArcSDE working so I cannot test this.

I need to run a script from a TRIGGER in SQL on an ArcSDE server.  I know that I can call java or C, however I would like to run a python script.  Is this possible?  Are there any contingencies (eg extra installs required on the server)?

The current install of SQL Server is 2005.
0 Kudos
11 Replies
VinceAngelo
Esri Esteemed Contributor
UPDATE and INSERT events don't occur when a versioned table is edited (both are modeled
as INSERTs to the Adds tables; UPDATEs also INSERT to the Deletes table).  When reconciied,
compressed, and posted, the changes are implemented as an INSERT (or DELETE then INSERT
in the case of an UPDATE), but this usually occurs *much* later than the original edit.

You might experiment with triggers on the Adds table, but that is unsupported (and outside the
scope of this thread).

- V
0 Kudos
justinperez
Deactivated User
I need to have an insert/update date applied to a record when the record is inserted/updated via Feature Services on SQL Server 2008 and ArcGIS Server 10.  The records, ideally, would be from a versioned feature class.  I thought this would be possible with a db trigger.  I am hearing from other spots on the web that this will not be possible with versioned feature classes.  After I get update/insert dates I will then have a python script do a gp.featurecompare to the original data to get changes whether attribute wise or spatial.

Otherwise maybe I could put a trigger on the add/delete tables (for each versioned feature class..correct?) and right the records out to a non-sde table.

Which tables are the add/delete tables in the SQL Server 2008 db?

Thanks.
0 Kudos