BUG: Insert Through View May Cause Duplicated Identity Value

Last reviewed: October 21, 1997
Article ID: Q164691
The information in this article applies to:
  • Microsoft SQL Server, version 6.5
BUG #: 16450 (6.5)

SYMPTOMS

Inserts performed through a view may generate duplicated identity values in the base table if SQL Server's 'open objects' is not configured high enough. If a table has a primary key or a unique index, the insert fails with either of the following errors:

   2627 14 Violation of %s constraint '%.*s': Attempt to insert duplicate
   key in object '%.*s'.

   -or-

   2601 14 Attempt to insert duplicate key row in object '%.*s' with
   unique index '%.*s'.

The following message usually appears in SQL Server before the problem:

   Warning: OPEN OBJECTS parameter may be too low attempt was made to free
   up descriptors in localdes() Run sp_configure to increase parameter
   value.

WORKAROUND

To work around this problem, use sp_configure to increase 'open objects' (see the documentation on DBCC MEMUSAGE to find the memory overhead of each 'open object').

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: repeat same already exist key
Keywords : SSrvGen kbusage kbbug6.5
Version : 6.5
Platform : WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.