<?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>idea Use ArcPy to Determine Underlying Database in ArcGIS Enterprise Ideas</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idi-p/937395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;It would be nice if the arcpy Describe function would return the database name you are connected to. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; print arcpy.Describe(r"c:\temp\scratch.gdb").databaseName&lt;BR /&gt;File Geodatabase&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;print arcpy.Describe(r"c:\temp\someconnection.sde").databaseName&lt;BR /&gt;Oracle&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;print arcpy.Describe(r"c:\temp\someconnection.sde").databaseName&lt;BR /&gt;PostGRESql&lt;BR /&gt;&lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;This would really help in developing the slight SQL differences between databases in handling of specific datatypes.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;

&lt;!-- content transformation source ID: 087E00000005Fll --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 17:06:14 GMT</pubDate>
    <dc:creator>AndrewChapkowski</dc:creator>
    <dc:date>2014-08-28T17:06:14Z</dc:date>
    <item>
      <title>Use ArcPy to Determine Underlying Database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idi-p/937395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;It would be nice if the arcpy Describe function would return the database name you are connected to. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; print arcpy.Describe(r"c:\temp\scratch.gdb").databaseName&lt;BR /&gt;File Geodatabase&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;print arcpy.Describe(r"c:\temp\someconnection.sde").databaseName&lt;BR /&gt;Oracle&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;print arcpy.Describe(r"c:\temp\someconnection.sde").databaseName&lt;BR /&gt;PostGRESql&lt;BR /&gt;&lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;This would really help in developing the slight SQL differences between databases in handling of specific datatypes.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;

&lt;!-- content transformation source ID: 087E00000005Fll --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 17:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idi-p/937395</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2014-08-28T17:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use ArcPy to Determine Underlying Database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idc-p/937396#M864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your examples you could craft a routine to tell you this information&lt;BR /&gt;anything ending in a gdb will be file geodatabase&lt;BR /&gt;do a describe on a sde connection and look at the instance will tell you that database it is based on the connection string &amp;nbsp;e.g.&lt;/P&gt;

&lt;UL&gt;&lt;LI&gt;&lt;I&gt;sde:sqlserver:svr-gis-01&lt;/I&gt;&amp;nbsp; is SQL server&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;sde:oracle11g:GISDATA&lt;/I&gt;&amp;nbsp; is Oracle 11g&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;

&lt;PRE class="ckeditor_codeblock"&gt;
desc = arcpy.Describe(Database Connections\Localhost SQL.sde)
cp = desc.connectionProperties
print cp.instance
&amp;gt; &lt;SPAN style=""&gt;sde:sqlserver:svr-gis-01&lt;/SPAN&gt;&lt;/PRE&gt;

&lt;P&gt;The only issue I see are the old style SDE connection where the instance will be a port number.&lt;/P&gt;

&lt;!-- content transformation source ID: 00aE0000008ACxE --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 11:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idc-p/937396#M864</guid>
      <dc:creator>MatthewYager</dc:creator>
      <dc:date>2014-10-14T11:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use ArcPy to Determine Underlying Database - Status changed to: Closed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idc-p/1277930#M3263</link>
      <description />
      <pubDate>Wed, 12 Apr 2023 17:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/use-arcpy-to-determine-underlying-database/idc-p/1277930#M3263</guid>
      <dc:creator>MaggieBusek</dc:creator>
      <dc:date>2023-04-12T17:52:40Z</dc:date>
    </item>
  </channel>
</rss>

