Skip To Content

Register with Geodatabase


Registers feature classes, tables, views, and raster layers that were created in the database using ArcGIS clients with the geodatabase. Once registered, information about the items—such as table and column names, spatial extent, and geometry type—is stored in the geodatabase's system tables, allowing these registered items to participate in geodatabase functionality.


  • Use this tool to register with the geodatabase the feature classes, tables, views, and raster layers you create in the database with third-party tools or SQL. Views you created using the Create Database View geoprocessing tool can also be registered with the geodatabase.

  • To register with the geodatabase, you must be connected as the owner of the input dataset.

  • Before a feature class, table, or raster layer can fully participate in geodatabase functionality, it must be registered with the geodatabase. If it is not registered with the geodatabase, only limited functionality is available from ArcGIS clients and services.

  • Database views that are registered with the geodatabase cannot participate in some geodatabase behavior, and are read only via ArcGIS clients and services. See the topic Views in an enterprise geodatabase for more information.


RegisterWithGeodatabase(in_dataset, {in_object_id_field}, {in_shape_field}, {in_geometry_type}, {in_spatial_reference}, {in_extent})
ParameterExplanationData Type

The feature class, table, view, or raster created using third-party tools or SQL that you want to register with the geodatabase. The dataset must exist in the same database as the geodatabase.

Table View; Raster Layer

The field that will be used as the ObjectID field. This input is required when registering a view, and you must supply an existing integer field. This parameter is optional when registering other dataset types; if using an existing field it must be an integer data type. If an existing field is not supplied, a new ObjectID field will be created and populated.


If the input dataset contains a shape column, include this during the registration process.


If the in_shape_field is present, you must specify a geometry type. If the dataset being registered contains existing features, the geometry type specified must match the entity type of these features.

  • POINTPoint geometry type
  • MULTIPOINTMultipoint geometry type
  • POLYGONPolygon geometry type
  • POLYLINEPolyline geometry type

If the in_shape_field is present and the table is empty, specify the coordinate system to be used for features. If the dataset being registered contains existing features, the coordinate system specified must match the coordinate system of the existing features. Valid values are a Spatial Reference object, a file with a .prj extension, or a string representation of a coordinate system.

Spatial Reference

If the in_shape_field is present, specify the allowable coordinate range for x,y coordinates in the following order: "XMin YMin XMax YMax". If the dataset being registered contains existing features, the extent of the existing features will be used.


Derived Output

NameExplanationData Type

The registered dataset.


Code sample

RegisterWithGeodatabase example 1 (Python window)

The following Python window script demonstrates how to use the RegisterWithGeodatabase function in the Python window for a spatial table that contains point geometry features. Since the underlying table contains existing features the coordinate reference and feature extent information can be discovered and does not have to be explicitly listed.

import arcpy
arcpy.env.workspace = r"Database Connections/connection.sde"
arcpy.RegisterWithGeodatabase_management("database.owner.COUNTIES", "OID", 
                                         "Shape", "POINT")
RegisterWithGeodatabase example 2 (stand-alone script)

The following stand-alone script is a simple example of how to apply the RegisterWithGeodatabase function in scripting.

# Description: Simple example showing use of RegisterWithGeodatabase tool
# Import system modules
import arcpy

# Set variables
inTable = r"c:\connectionFiles\Connection to esriServer.sde\database.dbo.cities"
oid_field = "OID"
shape_field = "Shape"
geometry_type = "POINT"
sr = arcpy.SpatialReference(4326)
in_extent = "11 10 14 34"

# Process: Register With Geodatabase
arcpy.RegisterWithGeodatabase_management(inTable, oid_field, shape_field, 
                                         geometry_type, sr, in_extent)


Licensing information

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

Related topics