FIX: sp_execute Results in Handled AV After Error 2627

Article translations Article translations
Article ID: 239475 - View products that this article applies to.
This article was previously published under Q239475
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 56102 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

In certain circumstances, when you perform the following steps in the exact order listed, a handled access violation (AV) may occur:
  1. The existing primary key constraint is dropped from a table.
  2. An attempt is made to add a new primary key constraint to that same table.
  3. The attempt to add the new primary key constraint fails with the following error because of the existence of duplicates in the column (or columns) on which the key is being added:
    Msg / Error 2627 Violation of %s constraint '%.*s': Attempt to insert duplicate key in object '%.*s'.
  4. An attempt is made to run the sp_execute function against that table to delete a row or rows from the table.

WORKAROUND

Before adding the new primary key constraint, make sure that there are not any duplicate or null values in the column (or columns) on which the key is being added.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack SP2 for Microsoft SQL Server 7.0. For information about how to download and install the latest SQL Server Service Pack, see the following Microsoft Web site:
http://www.microsoft.com/sql/prodinfo/previousversions/downloads/servicepacks.mspx
For more information, contact your primary support provider.

Properties

Article ID: 239475 - Last Review: October 21, 2013 - Revision: 3.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB239475

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com