You are currently offline, waiting for your internet to reconnect

FIX: Modifying a Table with DRI Cascade That Is Involved in an Indexed View May Cause Msg 8624

This article was previously published under Q288174
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 350912 (SHILOH_bugs)
When a user deletes or updates a record in SQL Server, an internal error may be raised:
Server: Msg 8624, Level 16, State 1, Line 1
Internal SQL Server error.
An error message is returned to the client. No error message or access violation information is written to the SQL Server error logs. The record is not deleted or updated.
This error can only occur when a member table of an indexed view is updated or deleted and there is a DRI CASCADE constraint between the table and other tables in the view. Check to see if the table is defined with either a cascading delete or update constraint. Then check to see if there is a view with an index that depends on the tables.
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
To work around this problem, remove the DRI CASCADE constraint or the index on the view.
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
To reproduce this problem, run the following script:
set ansi_nulls onset ansi_padding onset ansi_warnings onset arithabort onset concat_null_yields_null onset quoted_identifier onset numeric_roundabort offgoCREATE TABLE [dbo].[adults] (	[AdultId] [int] NOT NULL ,	[FName] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,	[LName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY]GOCREATE TABLE [dbo].[kids] (	[AdultId] [int] NOT NULL ,	[KidId] [int] NOT NULL ,	[FName] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,	[LName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY]GOALTER TABLE [dbo].[adults] WITH NOCHECK ADD 	CONSTRAINT [PK_adults] PRIMARY KEY  CLUSTERED 	(		[AdultId]	)  ON [PRIMARY] GOALTER TABLE [dbo].[kids] ADD 	CONSTRAINT [FK_kids_adults] FOREIGN KEY 	(		[AdultId]	) REFERENCES [dbo].[adults] (		[AdultId]	) ON DELETE CASCADE  ON UPDATE CASCADE GOSET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO/****** Object:  View dbo.v_AdultsWithKids    Script Date: 1/2/01 4:30:41 AM ******/ create view dbo.v_AdultsWithKidswith schemabindingasselect a.adultid, a.fname as 'Adult First Name', a.lname as 'Adult Last Name', k.kidid, k.fname as 'Kid First Name', k.lname as 'Kid Last Name'from dbo.adults a inner join k on a.adultid = k.adultidGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GOset ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIFIER,ANSI_NULLS on GOset NUMERIC_ROUNDABORT off GO CREATE  UNIQUE  CLUSTERED  INDEX [iv_cl_kidid] ON [dbo].[v_AdultsWithKids]([kidid]) ON [PRIMARY]GOinsert into adults values (1, 'Bob', 'Johnson')insert into kids values (1, 1, 'Joe', 'Johnson')insert into kids values (1, 2, 'Jack', 'Johnson')insert into kids values (1, 3, 'June', 'Johnson')insert into adults values (2, 'Mary', 'Thomas')insert into kids values (2, 4, 'John', 'Thomas')insert into adults values (3, 'Susan', 'Sist')godelete from adults where adultid = 2goset NUMERIC_ROUNDABORT off set arithabort  OFF GOSET QUOTED_IDENTIFIER OFF  SET ANSI_NULLS ON GO				
DRI Cascade Indexed views

Article ID: 288174 - Last Review: 01/16/2015 21:34:14 - Revision: 3.2

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB288174