SQL Server data types supported in ArcGIS

When you create a table or add a column to a table in a database, you define a specific data type for the column. Data types determine the following:

  • What values you can store in the column
  • What operations you can use on the data in that column
  • How the data in that column is stored in the database

ArcGIS works with specific data types. When you access a database table through a Database Connection, query layer, or web service, ArcGIS filters out any unsupported data types. ArcGIS does not display unsupported data types, and you cannot edit unsupported data types through ArcGIS. Similarly, when you use ArcGIS to copy and paste tables containing unsupported data types from one database to another, ArcGIS only pastes columns that use a supported data type.

The first column in the following table lists the ArcGIS data types. The second column lists the SQL Server data type that ArcGIS creates. The third column shows what other SQL Server data types, if any, map to the ArcGIS data type when you view a table that you created outside ArcGIS (not registered with the geodatabase). The last column provides additional information when needed.

ArcGIS data typeSQL Server data types createdOther SQL Server data types that can be viewedNotes

Big integer

bigint

Blob

varbinary(max)

binary, image, timestamp, varbinary(n)

Date

datetime2(7)

datetime2(n), datetime, smalldatetime

Date only

date

Double

numeric(p,s)

decimal, float, money, smallmoney

The precision (p) and scale (s) specified in ArcGIS can affect the resultant data type created in the database. See ArcGIS field data types for more information.

Float

numeric(p,s)

real

The precision (p) and scale (s) specified in ArcGIS can affect the resultant data type created in the database. See ArcGIS field data types for more information.

Geometry

  • geometry
  • geography

Specify whether to use the geometry or geography spatial data type when a feature class is created.

ArcGIS does not support the following Geometry subtypes:

  • CircularString
  • CompoundCurve
  • CurvePolygon
  • GeometryCollection

Note:

The following geometry storage types have been deprecated in ArcGIS Pro:

  • SDEBINARY
  • WKB_GEOMETRY

You cannot create feature classes that use these storage types. Currently, you can view feature classes that use these geometry storage types, but this functionality will be removed in a future release. Use the Migrate Storage geoprocessing tool to migrate feature classes to supported data types to ensure you can continue to access the data.

If compressed binary data is present, it is stored as an INT data type in the database.

Global ID

uniqueidentifier

Supported in geodatabases only.

GUID

uniqueidentifier

Long integer

int

Raster

int

The ArcGIS raster data type is supported in geodatabases only.

In enterprise geodatabases in SQL Server, an integer field is created in the base table and BLOB fields in associated raster tables store the imagery data.

OBJECT ID

int(4) when created in an enterprise geodatabase

integer with identity property when created in a database

The ArcGIS Object ID data type is the registered row ID column for the table (or feature class.) Only one may exist per table.

Short integer

smallint

bit, tinyint

Text

varchar, nvarchar, varchar(max), nvarchar(max)

char, nchar

Time only

time

Timestamp offset

timestamp with time zone offset

SQL Server data types supported in ArcGIS

Text data types in SQL Server

If you create a varchar or varchar(max) field in a SQL Server database, it will be mapped to the ArcGIS text data type when viewed in ArcGIS. If you create a text field in a SQL Server database from ArcGIS, either nvarchar or nvarchar(max) is used.

In an enterprise geodatabase in SQL Server, if the UNICODE_STRING configuration parameter is set to FALSE and the text field is 7,999 characters or fewer, a varchar field is used.

If the UNICODE_STRING configuration parameter is set to FALSE and the text field is 8,000 characters or more, a varchar(max) field is used.

If the UNICODE_STRING configuration parameter is set to TRUE and the text field is 3,999 characters or fewer, an nvarchar field is used.

If the UNICODE_STRING configuration parameter is set to TRUE and the text field is 4,000 characters or more, an nvarchar(max) field is used.

Geometry data types in SQL Server

As indicated in the table, ArcGIS Pro creates and can work with two geometry data types in SQL Server: SQL Server Geometry and SQL Server Geography.

SQL Server Geometry

The following is a summary of the Microsoft Geometry type. For more information on the Geometry type and how to use it, see Microsoft SQL Server documentation.

  • The Microsoft Geometry type supports any X/Y coordinate system.
  • Planar (flat-Earth, Euclidean) calculations and straight-line interpolation between vertices are used for rendering and spatial comparisons.
  • Conforms to the Open Geospatial Consortium (OGC) Simple Features for SQL Specification version 1.1.9, and compliant with SQL MM, an ISO standard.

SQL Server Geography

The following is a summary of the Microsoft Geography type. For more information on the Geography type and how to use it, see Microsoft SQL Server documentation.

  • The Geography type supports many standard geographic coordinate systems, such as GPS latitude and longitude.

    Microsoft requires that you use SRIDs and the geographic coordinate systems defined in the SQL Server data dictionary.

  • An ellipsoid (round Earth) model and Great Elliptic interpolation of line segments between vertices are used for calculations and spatial comparisons.
  • The Geography type uses a global (spheroidal) layer extent.

    Coordinates of the data cannot exceed global extent.