<?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: I can't delete a feature class from a SDE database in Pro in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789287#M1425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried arcpy.management.Delete(fc) and got the same results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2020 14:09:52 GMT</pubDate>
    <dc:creator>YuLuo</dc:creator>
    <dc:date>2020-06-16T14:09:52Z</dc:date>
    <item>
      <title>I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789284#M1422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing an ArcGIS Pro toolbox tool using Python. I am using&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;arcpy.management.Delete(fc) to delete a feature class and it works on File Geodatabase (*.gdb). However it does not work for a SDE database. I open the Pro and add the feature classes from a SDE database and add my toolbox on Catalog pane. When I try to delete some feature classes, it fails with error message&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;"&amp;nbsp;ERROR 000601: Cannot delete ..\SECore_Tools_Testing_sde.DBO.point_windmill.&amp;nbsp; May be locked by another application. Failed to execute (Delete)." &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;For investigating the functionality and access, I use Pro built-in geoprocessing tool "Delete" to delete some feature classes and it works successfully. I can see the deleted feature classes are gone from map even they were on the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Please help! Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2020 16:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789284#M1422</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-12T16:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789285#M1423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll investigate. Meanwhile, could you please share snippet of your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Nobbir&lt;/P&gt;&lt;P&gt;GP Team.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 22:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789285#M1423</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2020-06-15T22:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789286#M1424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Nobbir, here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def process_feature_classes(workspace, fc_list):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; arcpy.env.workspace = workspace&lt;BR /&gt;&amp;nbsp; &amp;nbsp; try:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; featureclass_count = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for i, fc in enumerate(fc_list):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; feature_count = int(arcpy.GetCount_management(fc).getOutput(0))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if feature_count == 0:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arcpy.Delete_management(fc)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; except:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arcpy.AddError("Failed to process_feature_classes. {0}\n{1}".format(sys.exc_info()[0], sys.exc_info()[1]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 14:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789286#M1424</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-16T14:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789287#M1425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried arcpy.management.Delete(fc) and got the same results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 14:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789287#M1425</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-16T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789288#M1426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yu Luo, here are two topics that you can consult as to how to handle SDE data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/geodatabase-locks.htm"&gt;https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/geodatabase-locks.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/manage-geodatabase-locks.htm"&gt;https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/manage-geodatabase-locks.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you handle SDE data you need to be aware of whether data is locked or not. Delete will fail if you don't have proper permission to manipulate the data.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 19:33:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789288#M1426</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2020-06-16T19:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: I can't delete a feature class from a SDE database in Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789289#M1427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hi, Nobbir, thank you for the help. The issue is due to the SDE process&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;permission&lt;/SPAN&gt;&lt;SPAN&gt;. After our SQL administrator assign a different server, the issue is resolved.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 14:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/i-can-t-delete-a-feature-class-from-a-sde-database/m-p/789289#M1427</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-18T14:06:02Z</dc:date>
    </item>
  </channel>
</rss>

