<?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: What is the python command for deleting a GlobalID-based relationship class? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/what-is-the-python-command-for-deleting-a-globalid/m-p/299985#M23226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no tool in the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/main/arcgis-pro-arcpy-reference.htm"&gt;&lt;STRONG&gt;arcpy tre&lt;/STRONG&gt;&lt;/A&gt;e in Pro or *Map.&lt;/P&gt;&lt;P&gt;If there is a tool that you use to do this in ArcToolbox, then check the code example for it.&amp;nbsp; I suspect that there are a number of things that need to be done before locks are released on any file and they may not involve functionality that isn't available as a tool or an arcpy function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Nov 2017 17:44:45 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-11-01T17:44:45Z</dc:date>
    <item>
      <title>What is the python command for deleting a GlobalID-based relationship class?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-python-command-for-deleting-a-globalid/m-p/299984#M23225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;have two feature classes (wControlValve and wBlowOff) that I need to drop and recreate weekly (part of a migration of data from Smallworld to ESRI). Once they're recreated, I create an ObjectID-based relationship class which I then migrate to a GlobalID-based relationship class. I successfully created it once. The problem is I can't delete it in order to recreate it every week!&amp;nbsp; I've tried right-clicking it and choosing "Delete" which always appears to be successful - at first - but then when I refresh, the relationship class is still there.&amp;nbsp; I also haven't been able to delete it via python (which is actually how I need to accomplish it). I've tried when everyone is off but me (as sde - see attachment), but still get the lock message. Any ideas?&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = "Database Connections/aoprod-sde.sde"&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.Exists('gis.sde.wControlValve_wBlowOff')&lt;/P&gt;&lt;P&gt;True&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.Delete_management('gis.sde.wControlValve_wBlowOff')&lt;/P&gt;&lt;P&gt;Runtime error Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt; File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\management.py", line 4341, in Delete raise e ExecuteError: ERROR 000601: Cannot delete Database Connections/aoprod-sde.sde\gis.sde.wControlValve_wBlowOff. May be locked by another application. Failed to execute (Delete).&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2017 17:11:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-python-command-for-deleting-a-globalid/m-p/299984#M23225</guid>
      <dc:creator>AngelaDeegan1</dc:creator>
      <dc:date>2017-11-01T17:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is the python command for deleting a GlobalID-based relationship class?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-python-command-for-deleting-a-globalid/m-p/299985#M23226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no tool in the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/main/arcgis-pro-arcpy-reference.htm"&gt;&lt;STRONG&gt;arcpy tre&lt;/STRONG&gt;&lt;/A&gt;e in Pro or *Map.&lt;/P&gt;&lt;P&gt;If there is a tool that you use to do this in ArcToolbox, then check the code example for it.&amp;nbsp; I suspect that there are a number of things that need to be done before locks are released on any file and they may not involve functionality that isn't available as a tool or an arcpy function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2017 17:44:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-python-command-for-deleting-a-globalid/m-p/299985#M23226</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-01T17:44:45Z</dc:date>
    </item>
  </channel>
</rss>

