Article ID: 2504090 - Last Review: July 18, 2011 - Revision: 6.0

FIX: Access violation when you insert data into a new partition of a partitioned table after you drop a column of the table in SQL Server 2008 R2

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.

On This Page

Expand all | Collapse all
Microsoft distributes Microsoft SQL Server 2008 R2 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 R2 fix release.

SYMPTOMS

Consider the following scenario:
  • You drop a column of a partitioned table in SQL Server 2008 R2.
  • You create a new partition for the table.
  • You try to insert data into the new partition of the table.
In this scenario, an access violation may occur.

CAUSE

This issue occurs because the accessor that SQL Server uses to insert data into different partitions recognizes the metadata changes incorrectly. When data is inserted into the new partition that is created after a column is dropped, the number of the maximum nullable columns in the new partition may be one less than the number of the maximum nullable columns in the old partition.

RESOLUTION

Cumulative update information

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 1 for SQL Server 2008 R2 Service Pack 1. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2544793  (http://support.microsoft.com/kb/2544793/ ) Cumulative Update package 1 for SQL Server 2008 R2 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2567616  (http://support.microsoft.com/kb/2567616/ ) The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

SQL Server 2008 R2


The fix for this issue was first released in Cumulative Update 7. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2507770  (http://support.microsoft.com/kb/2507770/ ) Cumulative Update package 7 for SQL Server 2008 R2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356  (http://support.microsoft.com/kb/981356/ ) The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

Service pack information for SQL Server 2008 R2

To resolve this problem, obtain the latest service pack for SQL Server 2008 R2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2527041  (http://support.microsoft.com/kb/2527041/ ) How to obtain the latest service pack for SQL Server 2008 R2

WORKAROUND

To work around this issue, rebuild all partitions of the partitioned table after you drop one of its columns.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem was first corrected in SQL Server 2008 R2 Service Pack 1.

MORE INFORMATION

For more information about how to create compressed tables and indexes, visit the following MSDN website:
How to create compressed tables and indexes (http://msdn.microsoft.com/en-us/library/cc280449.aspx)


APPLIES TO
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Standard
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew KB2504090