FIX: Error 1203 Occurs when Trigger Fires on Insert to Table with Foreign Key Constraint

ID: Q241304


The information in this article applies to:
  • Microsoft SQL Server versions 6.5, 6.5 Service Pack 5a

BUG #: 18803 (SQLBUG_65)

SYMPTOMS

The following error may occur:

Msg 1203, Level 20, State 2, Line 2 Caller of lock manager is incorrectly trying to unlock an unlocked object. spid=10 locktype=4 dbid=8 lockid=912006280
If all of the following are true:
  • A row is inserted into a table that has a foreign key constraint to another table.


  • An INSERT trigger is fired by the INSERT.


  • The trigger rolls back the transaction, but continues processing and starts a new transaction.


  • The server is running SQL Server 6.5 SP5a or later.


NOTE: The values listed for spid, locktype, dbid and lockid will differ from case to case.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this fix should have the following file attributes or later:

   File name    Platform
   ---------------------
   sql456i.exe  x86
   sl456a.exe   Alpha    
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.


MORE INFORMATION

This fix requires that trace flag 251 be enabled to resolve the problem. To enable this trace flag, add -T251 to the startup parameters of SQL Server.

Additional query words:

Keywords : kbSQLServ650bug
Version : winnt:6.5,6.5 Service Pack 5a
Platform : winnt
Issue type : kbbug


Last Reviewed: December 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.