PROBLEM

Accessing data stored in Geometry or Geography spatial types in Microsoft SQL Server 2008 produces underlying DBMS errors

Last Published: April 25, 2020

Description

Feature Classes stored in SQL Server 2008 using the Geometry or Geography spatial type will not preview from ArcCatalog or ArcMap. The following error is returned:

"The selected object failed to draw:
Database:DBO.Feature Class: Underlying DBMS error [Microsoft OLE DB Provider for SQL Server: Deferred prepare could not be completed.][Database:DBO.Feature Class]"

Using the SQL Server Profiler to trace the failed operation returns an additional error:

"Error 206, Operand type clash: image is incompatible with geometry."

If trying to Load Data into this Spatial type or the data is not visible when published in a Map Service, other errors may occur that are related to underlying DBMS Errors.

Note:
This behavior may not occur across all client machines, as Microsoft has also provided the OLE DB and ODBC drivers through various Windows Updates depending on the operating system (OS).

Cause

To leverage the new functionality in Microsoft SQL Server 2008, the client computer making the connection to the database needs the Microsoft SQL Server 2008 Native Client installed. The native client contains necessary OLE DB and ODBC drivers required to query the spatial type.

For more information about this issue, please refer to the following Microsoft Developer Network topic: When to Use SQL Server 2008 Native Client.

Solution or Workaround

If Windows Updates on the client are current and the error persists, download and install the correct package available from Microsoft on all affected client machines. If the issue is related to publishing the data with ArcGIS Server, make sure the native client is installed on all server object container (SOC) Machines.

  1. Using the following link: Microsoft SQL Server 2008 Feature Pack, October 2008. Scroll down to the Microsoft SQL Server 2008 Native Client item listed and select the appropriate package for the system.
  2. If a connection can still not be made after installing the appropriate client software, reboot the machine.

Article ID:000010587

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic