<?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: Delete a feature class from a SDE database failed in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474376#M37133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My tool can delete feature class from a FileGeodatabase (*.gdb) but not SDE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jun 2020 19:34:45 GMT</pubDate>
    <dc:creator>YuLuo</dc:creator>
    <dc:date>2020-06-11T19:34:45Z</dc:date>
    <item>
      <title>Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474366#M37123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I tried to use&amp;nbsp;arcpy.management.Delete(fc) to delete a feature class from a SDE database, it failed with error message "&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)."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I add the following code before delete the feature class:&lt;/P&gt;&lt;P&gt;edit = arcpy.da.Editor(arcpy.env.workspace)&lt;BR /&gt;edit.startEditing(False, True)&lt;BR /&gt;edit.startOperation()&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.management.Delete(fc) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;edit.stopOperation()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;edit.stopEditing(True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I got different error message "&amp;nbsp;ERROR 000496: table is being edited. Failed to execute (Delete)."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help! Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 18:45:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474366#M37123</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T18:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474367#M37124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it in a map?&lt;/P&gt;&lt;P&gt;Did you restart Pro?&lt;/P&gt;&lt;P&gt;Where are you running this? from inside using Pro's python or external?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474367#M37124</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-11T19:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474368#M37125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running a python tool inside Pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474368#M37125</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474369#M37126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what about the first 2 questions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:06:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474369#M37126</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-11T19:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474370#M37127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a python toolbox tool and run it in Pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474370#M37127</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474371#M37128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I start a Arc Pro and add a new map,&amp;nbsp; add some feature classes from a SDE database, add my new toolbox in Catalog pan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474371#M37128</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474372#M37129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If one of the layers you are adding is one you are trying to delete, don't add it and see if you can delete it from the database.&lt;/P&gt;&lt;P&gt;If you are trying to just remove it from the map, then you should be using removeLayer from ...&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/layerfile-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/layerfile-class.htm"&gt;LayerFile—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:20:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474372#M37129</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-11T19:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474373#M37130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Dan. I tried to start new pro and not add any feature class, then run my tool from the toolbox. It gives me the same errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:27:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474373#M37130</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474374#M37131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It could be anything, including how you set up your parameters in the toolbox.&amp;nbsp; A lot more information would be needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474374#M37131</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-11T19:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474375#M37132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;However, when I run Pro built-in geoprocessing tool "Delete" with feature class I am trying to delete on the map, I can delete it successfully.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:32:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474375#M37132</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474376#M37133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My tool can delete feature class from a FileGeodatabase (*.gdb) but not SDE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474376#M37133</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474377#M37134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SDE just opens up a whole new set of issues&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474377#M37134</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-11T19:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474378#M37135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2020 19:43:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474378#M37135</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-11T19:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474379#M37136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's part of the map I think you need to programmatically remove the layer from the map before you can delete it in your code.&amp;nbsp; Otherwise, your map has a shared lock on it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2020 21:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474379#M37136</guid>
      <dc:creator>RandyKreuziger1</dc:creator>
      <dc:date>2020-06-12T21:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474380#M37137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I start ArcPro without a template that shows blank Contents pane, no maps at all. Then I add my toolbox to the Catalog and run my tool. It gives me same error like the database "&lt;SPAN style="background-color: #ffffff;"&gt;May be locked by another application". I think I have missed some code that should unlock SDE, but I don't know what is it.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 16:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474380#M37137</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-15T16:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a feature class from a SDE database failed</title>
      <link>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474381#M37138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;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 assigned a different server, the issue is resolved. Thank you for the helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 14:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-a-feature-class-from-a-sde-database-failed/m-p/474381#M37138</guid>
      <dc:creator>YuLuo</dc:creator>
      <dc:date>2020-06-18T14:07:38Z</dc:date>
    </item>
  </channel>
</rss>

