FIX: Adding Several Constraints in a Single ALTER TABLE Statement May Get Assertion Followed by Error 3624 (283899)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q283899
BUG #: 55912 (SQLBUG_70)

SYMPTOMS

On a multiple CPU server with parallelism turned on, an ALTER TABLE statement with several ADD CONSTRAINT clauses in the same statement may receive a failed assertion with error 3624 if a parallel plan was used to execute the statement.

CAUSE

The computed row size was actually larger than a page, causing the execution to fail with an assertion.

WORKAROUND

Reduce the ALTER TABLE statement size to add fewer constraints in a single statement.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

MORE INFORMATION

Here is the stack dump and error message that can be found in the error log of SQL Server 7.0 Service Pack 2 (SP2) for the failed assertion when trying to add 44 constraints with a single ALTER TABLE statement:
Dump thread - spid = 8, PSS = 0x1fb5f130, EC = 0x31e70084
Stack Dump being sent to d:\sql7test\log\SQL00001.dmp
*******************************************************************************
*
* BEGIN STACK DUMP:
*   06/15/00 22:43:46 spid 8
*
* Input Buffer 15090 bytes -
*  A L T E R   T A B L E   [ t a b l e _ n a m e ]   A D D   
*    
*   	 C O N S T R A I N T  [ F K _ t a b l e 2 ]  f o r e i g n  k e y 
*		(f _ t a b l e 2 k e y)  r e f e r e n c e s  [ t a b l e 2 ]
*...

*******************************************************************************

... 
Short Stack Dump
0x77f97ac6 Module(ntdll+17ac6) (ZwGetContextThread+b)
0x006f6cd5 Module(sqlservr+2f6cd5) (stackTrace+187)
0x00784f83 Module(sqlservr+384f83) (utassert_fail+19f)
0x00667db0 Module(sqlservr+267db0) (CXPacketTyped<48>::SetData+50)
0x006671da Module(sqlservr+2671da) (CValExchange<48>::SetDataX+1a)
0x00422191 Module(sqlservr+22191) (CEs::FastMoveEval+33)
0x0066684b Module(sqlservr+26684b) (CQScanXProducer::Open+a6)
0x0066642c Module(sqlservr+26642c) (FnProducerThread+1e2)
0x004e9d2d Module(sqlservr+e9d2d) (subproc_main+f3)
0x41092a47 Module(ums+2a47) (ProcessWorkRequests+ec)
0x4109326b Module(ums+326b) (ThreadStartRoutine+138)
0x7800bea1 Module(MSVCRT+bea1) (beginthread+ce)
0x77e92ca8 Module(KERNEL32+12ca8) (BaseThreadStart+52)
2000-06-15 22:43:49.68 kernel   SQL Server Assertion: File: <r:\SPHINX\NTDBMS\query\qeexec\qsxchng.inl>, line=749 
Failed Assertion = '(m_cbPageMac + ulPxvarSize) <= m_pxpktdesc->m_cbPageMax'.
Dump thread - spid = 8, PSS = 0x1fb5f130, EC = 0x381d0084
Stack Dump being sent to d:\sql7test\log\SQL00002.dmp
...

2000-06-15 22:43:54.20 spid8    Error: 3624, Severity: 20, State: 1.
2000-06-15 22:43:54.22 spid8    Error: 3624, Severity: 20, State: 1.
2000-06-15 22:43:54.23 spid8    Error: 3624, Severity: 20, State: 1.
				

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbbug kbfix KB283899