Summary
The Enable Enterprise Geodatabase tool creates geodatabase system tables, stored procedures, functions, and types in an existing database, thereby enabling geodatabase functionality in the database.
Usage
- You must have ArcGIS for Desktop (Standard or Advanced), ArcGIS Engine Runtime with the Geodatabase Update extension, or ArcGIS for Server (Standard or Advanced) installed on the computer from which you connect to the database and enable geodatabase functionality.
The database connection file you provide to the tool must connect as a user who qualifies as a geodatabase administrator. Connect as the sde user to create a geodatabase in an IBM DB2, Informix, or PostgreSQL database. Connect as the sde user to create a master geodatabase in Oracle. Connect as a different schema owner to create a user-schema geodatabase in Oracle. For 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 Microsoft SQL Server instance to create a geodatabase in the dbo schema in the database.
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 be set to ON.
The user who creates the geodatabase requires specific privileges. See the topic appropriate to your database for information on required privileges to create a geodatabase:
You must configure the st_geometry library before you can enable geodatabase functionality in Oracle. See Set up a geodatabase in Oracle for details.
You must place the st_geometry library in the PostgreSQL lib directory on the PostgreSQL server before you can enable geodatabase functionality in PostgreSQL. See Set up a geodatabase in PostgreSQL on Linux or Set up a geodatabase in PostgreSQL on Windows for details.
Syntax
EnableEnterpriseGeodatabase_management (input_database, authorization_file)
Parameter | Explanation | Data Type |
input_database | Provide the path and connection file name for the database in which you want to enable geodatabase functionality. You must connect as a user that qualifies as a geodatabase administrator. | Workspace |
authorization_file | Provide the path and file name of the keycodes file that was created when you authorized ArcGIS for Server Enterprise. This file is in the \\Program Files\ESRI\License<release#>\sysgen folder on Windows or /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen directory on Linux. If you have not already done so, authorize ArcGIS for Server to create this file. | File |
Code sample
EnableGeodatabase example 1
This script uses an existing database connection file (my_db_connection.sde) located in the default ArcGIS for Desktop database connection location to enable geodatabase functionality with a keycodes file on a remote server.
##Import Arcpy module
import arcpy
arcpy.EnableEnterpriseGeodatabase_management("Database Connections\my_db_connection.sde", "//myagsserver/Program Files/ESRI/License10.1/sysgen/keycodes")
EnableGeodatabase example 2
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 module
import arcpy
arcpy.EnableEnterpriseGeodatabase_management("C:\myconnections\database1.sde", "C:\authfiles\keycodes")
Environments
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes