FIX: Insert Through View May Cause Duplicated Identity Value

ID: Q164691


The information in this article applies to:

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 SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: repeat same already exist sp sp5 sp5a


Keywords          : kbusage SSrvGen kbbug6.50 kbfix6.50.SP5 
Version           : winnt:6.5
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: April 9, 1999