Upgrade Geodatabase (Data Management)

Summary

Upgrades a geodatabase to the latest ArcGIS release to take advantage of new functionality.

Usage

  • This tool accepts a file geodatabase or an enterprise geodatabase connection file as input.

  • You cannot upgrade enterprise geodatabases from ArcGIS Pro with a Basic license.

  • Before you upgrade an enterprise geodatabase, you must perform the preparatory steps needed for the database management system you are using, including creating a backup of the database. For Oracle and for geodatabases in PostgreSQL that use the ST_Geometry type, you must download the DatabaseSupport folder from My Esri to obtain a new ST_Geometry library. For other preparatory steps, see the following topics:

  • You must check the Perform Pre-Requisite Check parameter, the Upgrade Geodatabase parameter, or both. You cannot run the tool until you check at least one of these parameters.

  • Use the prerequisite check before upgrading the geodatabase to determine if it is ready for upgrading. If any prerequisites are not met, an error is logged in the geoprocessing history. This saves you from starting the upgrade only to have it fail due to one of these prerequisites not having been met. If any checks fail, you must correct the problem and restart the upgrade process.

  • Upgrades from beta versions of the geodatabase are not supported.

  • The Perform Pre-Requisite Check parameter runs different checks for each type of geodatabase.

    • For file geodatabases, it determines if any of the following are true:
      • The geodatabase is read-only.
      • There are no other users connected to the geodatabase.
      • The current connection is not editing data in the geodatabase.
      • All the information in the current geodatabase system tables can be opened.
    • For enterprise geodatabases, it determines if the following criteria are met:
      • 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.
  • For enterprise geodatabases that contain branch versioned data, the upgrade process analyzes branch versions and branch versioned data for inconsistencies and writes results of the analysis to a log file. See How Upgrade Geodatabase works for more information.

  • The version of ArcGIS Pro or ArcGIS Server that you use to run the upgrade determines the version of the upgraded geodatabase.

    Tip:

    For information about running Python from an ArcGIS Server machine, see ArcGIS Server and ArcPy.

Parameters

LabelExplanationData Type
Input Geodatabase

The geodatabase that will be upgraded. When upgrading an enterprise geodatabase, specify a database connection file (.sde) that connects to the geodatabase as the geodatabase administrator.

Workspace
Perform Pre-Requisite Check

Specifies whether the prerequisite check will be run before upgrading the geodatabase.

  • Unchecked—The prerequisite check will not be run. This is the default.
  • Checked—The prerequisite check will be run before upgrading the geodatabase.
Boolean
Upgrade Geodatabase

Specifies whether the input geodatabase will be upgraded to match the release of the ArcGIS client that is running the tool.

  • Unchecked—The geodatabase will not be upgraded. This is the default.
  • Checked—The geodatabase will be upgraded.
Boolean

Derived Output

LabelExplanationData Type
Updated Input Geodatabase

The upgraded geodatabase.

Workspace

arcpy.management.UpgradeGDB(input_workspace, input_prerequisite_check, input_upgradegdb_check)
NameExplanationData Type
input_workspace

The geodatabase that will be upgraded. When upgrading an enterprise geodatabase, specify a database connection file (.sde) that connects to the geodatabase as the geodatabase administrator.

Workspace
input_prerequisite_check

Specifies whether the prerequisite check will be run before upgrading the geodatabase.

  • NO_PREREQUISITE_CHECKThe prerequisite check will not be run.
  • PREREQUISITE_CHECKThe prerequisite check will be run before upgrading the geodatabase. This is the default.
Boolean
input_upgradegdb_check

Specifies whether the input geodatabase will be upgraded.

  • NO_UPGRADEThe geodatabase will not be upgraded.
  • UPGRADEThe geodatabase will be upgraded. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_workspace

The upgraded geodatabase.

Workspace

Code sample

UpgradeGDB example 1 (Python window)

The following Python window script demonstrates how to use the UpgradeGDB function in immediate mode to upgrade a file geodatabase.

import arcpy
default_gdb = "C:/temp/Default.gdb"
arcpy.management.UpgradeGDB(default_gdb, "PREREQUISITE_CHECK", "UPGRADE")
UpgradeGDB example 2 (stand-alone)

The following stand-alone Python script demonstrates how to use the UpgradeGDB function in Python scripting to upgrade a file geodatabase.

 
# Description: Upgrade a file geodatabase
 
# Import arcpy module
import arcpy

# Local variables:
default_gdb = "C:/temp/Default.gdb"

# Process: Upgrade Geodatabase
arcpy.management.UpgradeGDB(default_gdb, "PREREQUISITE_CHECK", "UPGRADE")
UpgradeGDB example 3 (stand-alone script)

The following stand-alone Python script demonstrates how to use the UpgradeGDB function in Python scripting to upgrade an enterprise geodatabase using an existing .sde connection file:

# Description: Upgrade a geodatabase

# Import arcpy module
import arcpy

# Local variable:
default_gdb = "C:\\connections\gdbconnection.sde"

# Process: Upgrade Geodatabase
arcpy.management.UpgradeGDB(default_gdb, "PREREQUISITE_CHECK", "UPGRADE")
UpgradeGDB example 4 (stand-alone script)

The following stand-alone Python script demonstrates how to use the UpgradeGDB function in Python scripting on a Linux machine to upgrade an enterprise geodatabase using an existing .sde connection file:

# Description: Upgrade a geodatabase

# Import arcpy module
import arcpy

# Local variable:
default_gdb = "<user>/connections/<Connection_file>"

# Process: Upgrade Geodatabase
arcpy.management.UpgradeGDB(default_gdb, "PREREQUISITE_CHECK", "UPGRADE")

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics