laptop and a wrench

Bug

Using the 'Create Database Connection String' command fails for versioning workflows in Python.

Last Published: December 27, 2019 ArcGIS Pro
Bug ID Number BUG-000127252
SubmittedDecember 10, 2019
Last ModifiedDecember 12, 2024
Applies toArcGIS Pro
Version found2.4.2
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

CreateDatabaseConnectionString can be used instead of connection files, when there is an automated geoprocessing workflow (script or model) that uses database or enterprise geodatabase datasets. Generate a connection string which can be used as input to any geoprocessing tool that supports the specified dataset type, rather than using a path to the database through the connection file workspace. ListVersions requires the input to be either the path to a connection file as an argument to the function. Alternatively, set the workspace environment to the connection file. CreateDatabaseConnection is the correct tool to use as an input for ListVersions: e.g. new_db_connection = arcpy.CreateDatabaseConnection_management("C:\\TEMP", "connection_file.sde", "SQL_SERVER", "sql_server_instance", "DATABASE_AUTH", "gdb", "gdb", "SAVE_USERNAME", "database_name", "#", "TRANSACTIONAL", "dbo.DEFAULT") versionList = arcpy.ListVersions(new_db_connection) print (versionList)

Steps to Reproduce

Bug ID: BUG-000127252

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options