<?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: ListDatabaseSequences issue? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343709#M69083</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/366436"&gt;@DominicRobergeIADOT&lt;/a&gt;&amp;nbsp; , this documentation does state that&amp;nbsp;&lt;STRONG&gt;ListDatabaseSequences&lt;/STRONG&gt; is &lt;EM&gt;"only supported for file geodatabases."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/listdatabasesequences.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/listdatabasesequences.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is an Enhancement already logged, ref&amp;nbsp;ENH-000141842, "&lt;EM&gt;Add the ability to view or export database sequences from an enterprise database in streamlined fashion from ArcGIS Pro"&lt;/EM&gt;, which should address what you want to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 09:33:22 GMT</pubDate>
    <dc:creator>ChrisUnderwood</dc:creator>
    <dc:date>2023-10-31T09:33:22Z</dc:date>
    <item>
      <title>ListDatabaseSequences issue?</title>
      <link>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343529#M69072</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use the&amp;nbsp;ListDatabaseSequences function and when using a SDE connection, I always get following error:&amp;nbsp;OSError: Could not open SDE workspace. If I use a FGDB connection it's working fine.&lt;/P&gt;&lt;P&gt;If I use the same SDE connection with the ListDomains function everything works just fine.&lt;/P&gt;&lt;P&gt;I am testing the code "as is" from the AGS Pro on-line documentation.&lt;/P&gt;&lt;P&gt;I am using AGS Pro 3.1.3&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

#this works for ListDatabaseSequences
#gdbFGDB = r"D:\droberge\temp\coa_GIS\dr_testArcade.gdb"

#this works for ListDomains
gdbSDE = r"D:\droberge\programs\GIS_PRO\dr_coa_MASTER\coaUNWater_coa_gis.sde"

sequences = arcpy.da.ListDatabaseSequences(gdbSDE)
domains = arcpy.da.ListDomains(gdbSDE)

try:
    for seq in sequences:
        print("------------------------")
        print('Sequence name: {}'.format(seq.name))
        print('Sequence start value: {}'.format(seq.startValue))
        print('Sequence increment value: {}'.format(seq.incrementValue))
        print('Sequence current value: {}'.format(seq.currentValue))

##    for domain in domains:
##        print(f"Domain name: {domain.name}")
##        if domain.domainType == "CodedValue":
##            coded_values = domain.codedValues
##            for val, desc in coded_values.items():
##                print(f"{val} : {desc}")
##        elif domain.domainType == "Range":
##            print(f"Min: {domain.range[0]}")
##            print(f"Max: {domain.range[1]}")        

except:
    print(" we are in the except section... no bueno")
    arcpy.AddMessage(arcpy.GetMessages(2))
    print(arcpy.GetMessages(2))

print("Process is over!")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sequences = arcpy.da.ListDatabaseSequences(gdbSDE)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OSError: Could not open SDE workspace.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 20:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343529#M69072</guid>
      <dc:creator>DominicRobergeIADOT</dc:creator>
      <dc:date>2023-10-30T20:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: ListDatabaseSequences issue?</title>
      <link>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343709#M69083</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/366436"&gt;@DominicRobergeIADOT&lt;/a&gt;&amp;nbsp; , this documentation does state that&amp;nbsp;&lt;STRONG&gt;ListDatabaseSequences&lt;/STRONG&gt; is &lt;EM&gt;"only supported for file geodatabases."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/listdatabasesequences.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/listdatabasesequences.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is an Enhancement already logged, ref&amp;nbsp;ENH-000141842, "&lt;EM&gt;Add the ability to view or export database sequences from an enterprise database in streamlined fashion from ArcGIS Pro"&lt;/EM&gt;, which should address what you want to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 09:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343709#M69083</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2023-10-31T09:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: ListDatabaseSequences issue?</title>
      <link>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343941#M69084</link>
      <description>&lt;P&gt;for SQL server you can use SQL Management Studio or SQL to find sequences as noted &lt;A href="https://community.esri.com/t5/data-management-ideas/ability-to-view-database-sequence-in-arcgis-pro/idc-p/1219664/highlight/true#M1988" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 16:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatabasesequences-issue/m-p/1343941#M69084</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-10-31T16:02:16Z</dc:date>
    </item>
  </channel>
</rss>

