Enable Enterprise Geodatabase (Data Management)

Summary

Creates geodatabase system tables, stored procedures, functions, and types in an existing database, which enable geodatabase functionality in the database.

Usage

  • ArcGIS AllSource (Desktop Standard or Desktop Advanced) or ArcGIS Server must be installed on the computer from which you connect to the database.

  • You can use this tool to create a geodatabase in the following database cloud service offerings provided your ArcGIS software is running in the same cloud platform and region as the database service: Microsoft Azure SQL Database, Amazon Relational Database Service (RDS) for SQL Server, Google Cloud SQL for SQL Server, Amazon Aurora (PostgreSQL-compatible edition), Amazon RDS for PostgreSQL, Google Cloud SQL for PostgreSQL, Microsoft Azure Database for PostgreSQL, Amazon RDS for Oracle, and Autonomous Transaction Processing and Autonomous Data Warehouse workload types in Oracle Autonomous Database.

  • You can use this tool to create a geodatabase in SAP HANA Cloud. The ArcGIS client from which you run this tool should be as geographically close as possible to the SAP HANA Cloud region where your database service exists.

  • You must enable a spatial type in the database before you run this tool on PostgreSQL. If you place the st_geometry library in the PostgreSQL lib directory on the PostgreSQL server before running this tool, the geodatabase will use the ST_Geometry type to store spatial data. If you enable PostGIS in the database, the geodatabase will store spatial data in PostGIS geometry columns. For PostgreSQL-based cloud database-as-a-service instances, ensure that PostGIS is available in the instance before you enable a geodatabase; ST_Geometry is not supported in database services.

  • Before you run this tool on Amazon RDS for Oracle, you must enable Oracle Spatial in the database.

  • The database connection file you provide must connect as a user who qualifies as a geodatabase administrator. Connect as the sde user to create a geodatabase in an IBM Db2, Oracle, PostgreSQL, or SAP HANA database or database service. For Microsoft SQL Server, you can connect as a user named sde to create an sde-schema geodatabase or as a user who is dbo in the SQL Server instance to create a geodatabase in the dbo schema in the database. For database services based on SQL Server, you must connect as a user named sde and create an sde-schema geodatabase.

    Note:

    Creating or upgrading user-schema geodatabases in Oracle is no longer supported.

  • If you connect to a SQL Server database, the SQL Server instance must use a case-insensitive collation. The database must also have READ_COMMITTED_SNAPSHOT and ALLOW_SNAPSHOT_ISOLATION set to ON.

  • The user who creates the geodatabase must have specific privileges. See the page appropriate to your database or comparable database service for information on the required privileges to create a geodatabase:

  • You must configure the st_geometry library before you can enable geodatabase functionality in Oracle. See Create a geodatabase in Oracle for details. This does not apply to database services based on Oracle.

  • To generate a license file for an enterprise geodatabases licensed with ArcGIS Enterprise on Kubernetes, use the exportGeodatabaseLicense REST operation.

Parameters

LabelExplanationData Type
Input Database Connection

The path and database connection file (.sde) name for the database in which geodatabase functionality will be enabled. The database connection must connect as a user that qualifies as a geodatabase administrator.

Workspace
Authorization File

The keycodes file that was created when ArcGIS Server was authorized. If you have not done so, authorize ArcGIS Server to create this file.

This file is in the <drive>\Program Files\ESRI\License<release#>\sysgen folder on Windows or the /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen directory on Linux.

Tip:

The /.wine directory is a hidden directory.

You may need to copy the keycodes file from the ArcGIS Server machine to a location that is accessible to the tool.

File

Derived Output

LabelExplanationData Type
Output Workspace

The enabled enterprise geodatabase.

Workspace

arcpy.management.EnableEnterpriseGeodatabase(input_database, authorization_file)
NameExplanationData Type
input_database

The path and database connection file (.sde) name for the database in which geodatabase functionality will be enabled. The database connection must connect as a user that qualifies as a geodatabase administrator.

Workspace
authorization_file

The keycodes file that was created when ArcGIS Server was authorized. If you have not done so, authorize ArcGIS Server to create this file.

This file is in the <drive>\Program Files\ESRI\License<release#>\sysgen folder on Windows or the /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen directory on Linux.

Tip:

The /.wine directory is a hidden directory.

You may need to copy the keycodes file from the ArcGIS Server machine to a location that is accessible to the tool.

File

Derived Output

NameExplanationData Type
out_workspace

The enabled enterprise geodatabase.

Workspace

Code sample

EnableEnterpriseGeodatabase example (stand-alone script)

This script uses an existing database connection file (database1.sde) in a user-defined location to enable geodatabase functionality with a keycodes file in a user-defined location on the local computer.

import arcpy
arcpy.management.EnableEnterpriseGeodatabase("C:\myconnections\database1.sde", 
                                             "C:\authfiles\keycodes")

Environments

Related topics