<?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 programmatically updating an SDE feature class referenced by an AGS service in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603612#M34011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We're writing an app that will programmatically update an SDE feature class using the C API.&amp;nbsp; The SDE logic is a command-line C program, which accepts the usual SDE service flags:&amp;nbsp; -s server, -i instance, -d db, -u user, -p password.&amp;nbsp; The program reads from a DB table from which it will determine lat, long, attribute data, etc. and create a feature to insert into a feature class.&amp;nbsp; This feature class will, in turn, be referenced in a MXD that is used for an AGS MapServer service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've only ever seen that to modify a feature class (usually when using AGS toolbox tools and/or python scripts against it) there are locks that require that the AGS service be shut down, otherwise an error is thrown.&amp;nbsp; And even when shutting down the service, it seems that there are frequently persistent locks that need to be forcefully killed w/ sdemon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We're actually re-writing an existing app that runs the update process in a nightly batch program, but users want to see the feature changes in "real time" (the C API is invoked by a .NET app which has an embedded map viewer), so we have to be able to update w/o shutting down the AGS service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For additional background, the feature class is a simple feature class that is not versioned and does not participate in a topology or network or anything else.&amp;nbsp; ArcSDE version is 9.2 for Oracle and AGS version is 9.3.1.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is:&amp;nbsp; Has anyone had similar issues with updating a feature class used by an AGS service (or otherwise have locks against it) and been able to work around them?&amp;nbsp; If so, how?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Mar 2011 00:49:22 GMT</pubDate>
    <dc:creator>ChrisBeaudette</dc:creator>
    <dc:date>2011-03-26T00:49:22Z</dc:date>
    <item>
      <title>programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603612#M34011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We're writing an app that will programmatically update an SDE feature class using the C API.&amp;nbsp; The SDE logic is a command-line C program, which accepts the usual SDE service flags:&amp;nbsp; -s server, -i instance, -d db, -u user, -p password.&amp;nbsp; The program reads from a DB table from which it will determine lat, long, attribute data, etc. and create a feature to insert into a feature class.&amp;nbsp; This feature class will, in turn, be referenced in a MXD that is used for an AGS MapServer service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've only ever seen that to modify a feature class (usually when using AGS toolbox tools and/or python scripts against it) there are locks that require that the AGS service be shut down, otherwise an error is thrown.&amp;nbsp; And even when shutting down the service, it seems that there are frequently persistent locks that need to be forcefully killed w/ sdemon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We're actually re-writing an existing app that runs the update process in a nightly batch program, but users want to see the feature changes in "real time" (the C API is invoked by a .NET app which has an embedded map viewer), so we have to be able to update w/o shutting down the AGS service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For additional background, the feature class is a simple feature class that is not versioned and does not participate in a topology or network or anything else.&amp;nbsp; ArcSDE version is 9.2 for Oracle and AGS version is 9.3.1.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is:&amp;nbsp; Has anyone had similar issues with updating a feature class used by an AGS service (or otherwise have locks against it) and been able to work around them?&amp;nbsp; If so, how?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2011 00:49:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603612#M34011</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2011-03-26T00:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603613#M34012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Disregard - found my answer &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/3047-Feature-classes-locked-by-ArcGIS-server-services"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2011 16:14:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603613#M34012</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2011-03-26T16:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603614#M34013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a similar need 11 years ago, so I wrote a 'C' utility I called 'sdeupdate' to modify the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rows in an SDE table in batch mode. It was designed to work with the output of 'sdequery'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with a WHERE clause that identified only the updated features. Both utilities are part of&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the 'se_toolkit' suite, available by &lt;/SPAN&gt;&lt;A href="ftp://ftp.esri.com/pub/staff/vangelo/se_toolkit/index.html"&gt;FTP download&lt;/A&gt;&lt;SPAN&gt; (the documentation has examples of&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using the two piped together).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I regularly INSERT, UPDATE, and DELETE rows in non-versioned layers which are also&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;being served via AGS. If you are having SDE lock issues, it might be because you have&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;auto-locking enabled. You can disable autolocking with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdelayer -o alter -l table,geomcol -L OFF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Of couse, today you can modify the geometry when a coordinate column is updated by&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using ST_GEOMETRY or a native geometry type with a trigger to execute the update&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(which would yield real-time update, instead of updates dependent on the frequency&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;of batch execution).&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>Sun, 27 Mar 2011 12:53:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603614#M34013</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-03-27T12:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603615#M34014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Awesome, thanks Vince.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 16:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603615#M34014</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2011-03-29T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603616#M34015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please do you still have the link to this FTP. I tried it but it is not working. I have a need to&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;INSERT, UPDATE, and DELETE rows in non-versioned layers&lt;SPAN&gt;&amp;nbsp;in ArcSDE.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;I want to see if your 'C' utility here can provide me with the solution&amp;nbsp;i need.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Irene&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 14:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603616#M34015</guid>
      <dc:creator>IreneEgbulefu1</dc:creator>
      <dc:date>2019-05-06T14:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically updating an SDE feature class referenced by an AGS service</title>
      <link>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603617#M34016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, the ArcSDE API was deprecated at 10.2, and hasn't been available since 10.3.&amp;nbsp; `se_toolkit` survived (for 10.2.2 and before) until the &lt;A _jive_internal="true" href="https://community.esri.com/people/vangelo-esristaff/blog/2017/05/16/end-of-an-era"&gt;FTP server was decommissioned&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can certainly execute arbitrary SQL from ArcPy (with &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/arcsdesqlexecute.htm"&gt;arcpy.ArcSDESQLExecute&lt;/A&gt;) and INSERT with arcpy.da.InsertCursor and&amp;nbsp;UPDATE and&amp;nbsp;DELETE with arcpy.da.UpdateCursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 15:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/programmatically-updating-an-sde-feature-class/m-p/603617#M34016</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2019-05-06T15:20:06Z</dc:date>
    </item>
  </channel>
</rss>

