Skip To Content

Delete Database Sequence

Summary

Deletes a database sequence from an enterprise geodatabase.

Usage

  • This tool can be used with geodatabases in IBM Db2, Microsoft SQL Server, Oracle, PostgreSQL, and SAP HANA.

Syntax

DeleteDatabaseSequence_management (in_workspace, seq_name)
ParameterExplanationData Type
in_workspace

The database connection (.sde) file to connect to the geodatabase from which you want to delete a sequence. The user specified in the database connection must have the following permissions in the database:

  • Db2—DBADM authority
  • Oracle—Must be the sequence owner or have DROP ANY SEQUENCE system privilege
  • PostgreSQL—Must be the sequence owner
  • SAP HANA—Must be a standard user
  • SQL Server—ALTER OR CONTROL permission on the database schema where the sequence is stored

Workspace
seq_name

The name of the database sequence you want to delete. Once deleted, the sequence cannot be used to generate sequence IDs when called from existing custom applications or expressions.

String

Code sample

DeleteDatabaseSequence example (Python window)

Delete the custom_sequence database sequence.

import arcpy
arcpy.DeleteDatabaseSequence_management(r"C:/myconnections/mygdb.sde", "custom_sequence")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics