<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL Trigger on ArcSDE calling Python script in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404917#M23240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not possible with SQL-Server 2005, but it's *very* easy with SQL-Server 2008&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using GEOMETRY types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Nov 2010 22:15:24 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2010-11-23T22:15:24Z</dc:date>
    <item>
      <title>SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404913#M23236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have searched everywhere for this information, but I have not been able to come up with an answer.&amp;nbsp; I do not have ArcSDE working so I cannot test this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to run a script from a TRIGGER in SQL on an ArcSDE server.&amp;nbsp; I know that I can call java or C, however I would like to run a python script.&amp;nbsp; Is this possible?&amp;nbsp; Are there any contingencies (eg extra installs required on the server)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The current install of SQL Server is 2005.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 03:41:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404913#M23236</guid>
      <dc:creator>JanetRogers</dc:creator>
      <dc:date>2010-11-22T03:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404914#M23237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The lack of response appears to indicate that Python cannot be called from a SQL Trigger.&amp;nbsp; In that case,&amp;nbsp; is anyone able to tell me what sort of files can be?&amp;nbsp; Is it only java and C?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 20:33:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404914#M23237</guid>
      <dc:creator>JanetRogers</dc:creator>
      <dc:date>2010-11-23T20:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404915#M23238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What do you want the trigger to do? How many feature are involved in the table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How often would the trigger be executed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally speaking, triggers should be *very* light applications -- if it can't be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;executed in a few milliseconds (ideally, certainly under a second per event), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you probably should look at using a different mechanism.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 21:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404915#M23238</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-11-23T21:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404916#M23239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The trigger needs to copy a shape feature from&amp;nbsp; table one to table two.&amp;nbsp; This occurs when an INSERT is made to table one.&amp;nbsp; The trigger fires on an insert, just haven't been able to write the code that does the copy yet. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My client is adamant the copy is to occur by trigger.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 21:55:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404916#M23239</guid>
      <dc:creator>JanetRogers</dc:creator>
      <dc:date>2010-11-23T21:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404917#M23240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not possible with SQL-Server 2005, but it's *very* easy with SQL-Server 2008&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using GEOMETRY types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 22:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404917#M23240</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-11-23T22:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404918#M23241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that.&amp;nbsp;&amp;nbsp; Only trouble is client has 2005 and won't be ungrading any time soon.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 22:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404918#M23241</guid>
      <dc:creator>JanetRogers</dc:creator>
      <dc:date>2010-11-23T22:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404919#M23242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Then your only options are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Have the trigger write data to a file, then signal an application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to execute the instructions in the file (or if the data is small&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; enough, just signal with the data).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Re-architect the database so that the trigger can populate a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; row which participates in a view to re-use the source geometry. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have a developer skilled in interprocess communications,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;solution 1 may only take a week or two to implement (mostly &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcSDE 'C' API spin-up time).&amp;nbsp; If concurrency isn't an issue, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then a frequently-running application could execute the inserts&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(certainly for prototype purposes); I could code that app in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;days, but I have 20 years experience in real-time application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;development, 15 years with the ArcSDE 'C' API, and a very deep&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bag of tricks (aka 'se_toolkit') to speed development.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a shame, since this could be trivially accomplished with any &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RDBMS that wasn't SQL-Server 2005 (2008, Oracle, Informix, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DB2, or PostgreSQL).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 01:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404919#M23242</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-11-24T01:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404920#M23243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I am aware of all that.&amp;nbsp; I am currently working with a java script to do the work for me. Thanks for your estimates though, now I know that getting it done in a day or so (client preference0 is not feasible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; However this does bring me back to the original question - can I only call java and C from a SQL Trigger or is it possible to call Python or other types of files?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 01:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404920#M23243</guid>
      <dc:creator>JanetRogers</dc:creator>
      <dc:date>2010-11-24T01:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404921#M23244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you can get to C or Java, you can get to anything, but that doesn't mean you should.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using Python inside a trigger is a bit like using a 737 to deliver mail in the bush -- using &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcPy is more like an Airbus 380.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The key to a good trigger is minimalism. You can leave the large clunky app running &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outside the database, where the initialization and termination costs can be amortized &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;across the application life, and then put the effort into transmitting and queuing the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data messages, so that a bulk insert doesn't cripple your server with backlog (the best &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bet on the server side is a multi-threaded architecture that permits one queuing agent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to accept messages in milliseconds, and one or more worker threads to act on the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;requests -- make sure you have a way to preserve unsatisfied requests in the event&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;of system shutdown before they are completed, and a recovery protocol to restore &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;stability in the event of message loss).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A day or two might suffice, if you have a seasoned team of six developers ready to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pull a double all-nighter &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 11:26:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404921#M23244</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-11-24T11:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404922#M23245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How would I build a trigger that lets me write to a date field when a insert or update occurs on a versioned feature class?&amp;nbsp; I was told that it wouldn't work on a versioned feature class.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 03:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404922#M23245</guid>
      <dc:creator>justinperez</dc:creator>
      <dc:date>2011-09-14T03:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404923#M23246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;UPDATE and INSERT events don't occur when a versioned table is edited (both are modeled&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as INSERTs to the Adds tables; UPDATEs also INSERT to the Deletes table).&amp;nbsp; When reconciied,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;compressed, and posted, the changes are implemented as an INSERT (or DELETE then INSERT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the case of an UPDATE), but this usually occurs *much* later than the original edit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You might experiment with triggers on the Adds table, but that is unsupported (and outside the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;scope of this thread).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 10:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404923#M23246</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-09-14T10:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trigger on ArcSDE calling Python script</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404924#M23247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&amp;nbsp; The records, ideally, would be from a versioned feature class.&amp;nbsp; I thought this would be possible with a db trigger.&amp;nbsp; I am hearing from other spots on the web that this will not be possible with versioned feature classes.&amp;nbsp; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which tables are the add/delete tables in the SQL Server 2008 db?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 02:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-trigger-on-arcsde-calling-python-script/m-p/404924#M23247</guid>
      <dc:creator>justinperez</dc:creator>
      <dc:date>2011-09-15T02:33:14Z</dc:date>
    </item>
  </channel>
</rss>

