Select to view content in your preferred language

Modify existing Geodatabase Sequences

3435
13
05-05-2020 12:25 PM
Status: Open
Labels (1)
JoeBorgione
MVP Emeritus

There are two geoprocessing tools in the Geodatabase Admin tool box: Create and Delete Database Sequence.  You can get access to a sequence's properties using arcpy.ListDatabaseSquences.

 

The database sequence help page states: DatabaseSequence objects cannot be initialized directly and the properties table shows all the properties as read only.

 

I guess the only way to alter an existing database sequence is to delete it and recreate it.  It would be cool if an existing one could be altered or modified.

13 Comments
SSWoodward
Status changed to: Open
 
MatthewStull1

I keep getting the error message "Could not open SDE workspace." when I run this code:

import arcpy
arcpy.env.workspace = r"R:\GIS_Ongoing\Cityworks\Cityworks GIS Editing Environment\Cityworks Catalog ONLY\Cityworks Development matts.sde"
seqwork = r"R:\GIS_Ongoing\Cityworks\Cityworks GIS Editing Environment\Cityworks Catalog ONLY\Cityworks Development matts.sde"
sq_list = arcpy.da.ListDatabaseSequences(seqwork)
#attribue rule sequences
for seq in sq_list:
      arcpy.management.DeleteDatabaseSequence(seq)

I haven't done python scripting for a while so I'm just trying to make this work.  I'm using Pro 3.1

SSWoodward

Hard to say. 

Check to make sure you have the correct access: Delete Database Sequence Doc

Does ListDatabaseSequences() work on its own for you?