HOW TO

Upgrade an Enterprise Geodatabase using ArcGIS Server

Last Published: March 17, 2026

Summary

ArcGIS Server Utility Network and Data Management patches require the geodatabase to be upgraded via ArcGIS Server upon completing their installation. This ensures that fixes meant to address referenced feature services (including branch versioning) are applied at the geodatabase level.

To do this, one must utilize the ArcGIS Server's Python environment.

Procedure

Use Notepad++ or a Python notebook to create a script named "upgrade_gdb.py" using the following syntax:

import arcpy
Connection_File_Name_full_path="C:\\temp\\sysadmin_connection.sde"
arcpy.UpgradeGDB_management(Connection_File_Name_full_path, "PREREQUISITE_CHECK", "UPGRADE")

Please note that upgrading the geodatabase via ArcGIS Server will require a database administrator (sa/dbo/sys/postgres) connection file instead of a geodatabase administrator (sde) connection file, which is used for the same purpose while upgrading via ArcGIS Pro.

The usual geodatabase upgrade prerequisites still apply:

  • The connected user has the appropriate privileges to upgrade the geodatabase.
  • The connected user is not editing data in the geodatabase.
  • No other users are connected to the geodatabase.
  • The database is enabled to support XML data types.
  • All the information in the current geodatabase system tables can be opened.
  • For geodatabases in Oracle and for geodatabases in PostgreSQL that use the ST_Geometry type, it detects whether the database can access the current version of the ST_Geometry library.
  1. On Windows, run the upgrade script explicitly using the Python 3 environment. If ArcGIS Server is installed to the default location, the script can be executed with either of the following commands:
"C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\scripts\propy.bat" C:\temp\upgrade_gdb.py

Or,

"C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe" C:\temp\upgrade_gdb.py
  • On Linux, launch the Python 3 environment using the following commands:
source /<arcgis_server_installation_directory>/arcgis/server/framework/etc/arcenv
unset LD_PRELOAD
unset CONDA_DEFAULT_ENV
  1. Execute the upgrade script with the following command:
wine "Z:\<arcgis_server_installation_directory>\arcgis\server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe" <path_To>\upgrade_gdb.py

Article ID: 000037807

Software:
  • ArcGIS Server

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options