FIX: Access violation when DTA runs a query against a table in SQL Server 2008 if an index on a spatial data type column of the table exists

Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.
Consider the following scenario:
  • You have a table that has a spatial data type column in Microsoft SQL Server 2008.
  • An index for the spatial data type column exists.
  • A query references the spatial data type column in the workload that is used by Database Tuning Advisor (DTA).
In this scenario, an access violation might occur in the SQL Server engine. The connection that DTA uses to handle the workload is automatically closed. Additionally, the following error message is logged in SQL Server error log:
<Date> <Time> spid#  SqlDumpExceptionHandler: Process# generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.


Service pack information for SQL Server 2008

To resolve this issue, obtain the latest service pack for SQL Server 2008. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

968382 How to obtain the latest service pack for SQL Server 2008

To work around this issue, use one of the following methods:
  • Disable or drop the spatial index on the spatial data type column and rebuild the index after the DTA analysis is finished.
  • Remove the query that references the spatial data type columns and that references the spatial data type indexes in the workload that is used by DTA.
Note By design, DTA does not recommend spatial indexes on spatial columns for tables.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the DTA utility, visit the following MSDN website:


Article ID: 2588453 - Last Review: 08/22/2011 22:55:00 - Revision: 1.0

Microsoft SQL Server 2008 Developer, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Enterprise Evaluation

  • kbqfe kbfix kbexpertiseadvanced kbsurveynew KB2588453