<?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 arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556085#M43457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three different levels of database connection in ArcCatalog on my PC which I use to connect to our Enterprise GDB for various reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my user level connection for data editing.&lt;/P&gt;&lt;P&gt;I have one called GISADMIN which is the &lt;STRONG&gt;Data Owner&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And another with is called SDE which is the &lt;STRONG&gt;Geodatabase Admin User&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have no access to the Database Admin User, this is managed by our in house I.T Dept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//03q300000088000000" rel="nofollow noopener noreferrer" target="_blank"&gt;arcpy.DisconnectUser&lt;/A&gt;&amp;nbsp;function in a python script, but no matter which of the connections mentioned above I use, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DisconnectUser&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'Database Connections\SDE@SDE_Spatial@SDE-DB.sde'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;123494&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Runtime error 
Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"&amp;lt;string&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1086&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; DisconnectUser
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; gp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;disconnectUser&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sde_workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; users&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;504&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; val&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;gp_fixargs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
RuntimeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Unable to disconnect&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; The connection ID provided &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; the current administrator connection
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; ‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have confirmed this by trying to use all three connections, also trying to disconnect several different connections from my Enterprise GDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something strange is that if I put a completely random session ID in my python snippet, the exact same error is returned....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="281977" alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/281977_2016-12-13 134412 Geodatabase Administration (SDE@arges.alburycity.nsw.gov.au_SDE_SPATIAL).jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am perplexed as to why this is happening to me, and I am unable to track down why this seems to have started happening all of a sudden.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any troubleshooting ideas for me? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/47933" target="_blank"&gt;Nathan Duncan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:01:23 GMT</pubDate>
    <dc:creator>BenVan_Kesteren1</dc:creator>
    <dc:date>2021-12-12T00:01:23Z</dc:date>
    <item>
      <title>arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556085#M43457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three different levels of database connection in ArcCatalog on my PC which I use to connect to our Enterprise GDB for various reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my user level connection for data editing.&lt;/P&gt;&lt;P&gt;I have one called GISADMIN which is the &lt;STRONG&gt;Data Owner&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And another with is called SDE which is the &lt;STRONG&gt;Geodatabase Admin User&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have no access to the Database Admin User, this is managed by our in house I.T Dept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//03q300000088000000" rel="nofollow noopener noreferrer" target="_blank"&gt;arcpy.DisconnectUser&lt;/A&gt;&amp;nbsp;function in a python script, but no matter which of the connections mentioned above I use, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DisconnectUser&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'Database Connections\SDE@SDE_Spatial@SDE-DB.sde'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;123494&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Runtime error 
Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"&amp;lt;string&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1086&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; DisconnectUser
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; gp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;disconnectUser&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sde_workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; users&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;504&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; val&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;gp_fixargs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
RuntimeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Unable to disconnect&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; The connection ID provided &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; the current administrator connection
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; ‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have confirmed this by trying to use all three connections, also trying to disconnect several different connections from my Enterprise GDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something strange is that if I put a completely random session ID in my python snippet, the exact same error is returned....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="281977" alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/281977_2016-12-13 134412 Geodatabase Administration (SDE@arges.alburycity.nsw.gov.au_SDE_SPATIAL).jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am perplexed as to why this is happening to me, and I am unable to track down why this seems to have started happening all of a sudden.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any troubleshooting ideas for me? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/47933" target="_blank"&gt;Nathan Duncan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556085#M43457</guid>
      <dc:creator>BenVan_Kesteren1</dc:creator>
      <dc:date>2021-12-12T00:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556086#M43458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to close off my own question, it turns out that for some reason the permissions had changed on my Geodatabase Admin (SDE) User and this was causing the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to elevate to my in house IT Dept to resolve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 23:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556086#M43458</guid>
      <dc:creator>BenVan_Kesteren1</dc:creator>
      <dc:date>2016-12-19T23:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556087#M43459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This same thing happened to me.&amp;nbsp; I suspect the solution will be the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 14:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556087#M43459</guid>
      <dc:creator>DonnaRiebe</dc:creator>
      <dc:date>2017-08-18T14:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556088#M43460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe what happened is that our IT team audited the SQL Server permissions and noticed our SDE account had quite high privileges, and as I am not located 'within' the IT team this is against business rules, so they revoked my access as SDE Admin, which in turn caused this error to rear its head.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once my IT team restored previous permissions all was good again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 02:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/556088#M43460</guid>
      <dc:creator>BenVan_Kesteren1</dc:creator>
      <dc:date>2017-08-19T02:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.DisconnectUser is throwing this error - RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator conn</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/1593595#M73886</link>
      <description>&lt;P&gt;I know this was quite some time ago now, but any idea what permissions were restored to the SDE user? I'm getting the same error using the arcpy.DisconnectUser, only this time on a 10.9.1 geodatabase.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 00:37:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-disconnectuser-is-throwing-this-error/m-p/1593595#M73886</guid>
      <dc:creator>LDreyfuss</dc:creator>
      <dc:date>2025-03-08T00:37:31Z</dc:date>
    </item>
  </channel>
</rss>

