FIX: Indexed Computed Column Based on Text/Image Column Causes AV When You Run DBCC CHECKDB (308775)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q308775
BUG #: 352982 (SHILOH_BUGS)

SYMPTOMS

An access violation (AV) may be generated when you run a DBCC CHECKDB or DBCC CHECKTABLE statement on a table that has the following conditions:
  1. An inrow text/image column.
  2. A computed column based on the text/image column.
  3. An index on the computed column.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

STATUS

Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.

MORE INFORMATION

The following short stack dump is generated on SQL Server 2000 Service Pack 1:
Short Stack Dump
00422DAB Module(sqlservr+00022DAB) (CEsCompValSeg::CreateExecValSeg+0000007B)
00422CC0 Module(sqlservr+00022CC0) (CEsExec::CEsExec+00000119)
00422C62 Module(sqlservr+00022C62) (CEs::Startup+0000006C)
006054E2 Module(sqlservr+002054E2) (CInrowTblExprEval::CompileExpressions+000001C6)
008DCA4A Module(sqlservr+004DCA4A) (CheckTables::InitIterator+00000B4C)
008DA3DE Module(sqlservr+004DA3DE) (CheckTables::AddIndex+000003B0)
008DB26C Module(sqlservr+004DB26C) (CheckTables::CheckIndexList+0000055F)
008D9D39 Module(sqlservr+004D9D39) (checktables+000000EC)
008CEDE7 Module(sqlservr+004CEDE7) (CheckDatabase+00000763)
005F127F Module(sqlservr+001F127F) (d_callcheckdb+00000135)
005F00AE Module(sqlservr+001F00AE) (CStmtDbcc::XretExecute+000006BA)
00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)
004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)
00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)
00448916 Module(sqlservr+00048916) (language_exec+000003E1)
00411D4C Module(sqlservr+00011D4C) (process_commands+000000E0)
41073379 Module(UMS+00003379) (ProcessWorkRequests+0000024A)
41073071 Module(UMS+00003071) (ThreadStartRoutine+000000BD)
7800A27B Module(MSVCRT+0000A27B) (_unDNameEx+00004849)
77E8758A Module(KERNEL32+0000758A) (SetFilePointer+0000018A)
-----------------------------------------------------------------------
The following script demonstrates the problem:
USE pubs
GO

CREATE TABLE Descr (
 UID int NOT NULL ,
 Descr text COLLATE SQL_Latin1_General_CP1251_CI_AS NULL ,
 Entered smalldatetime NOT NULL ,
 Verified smalldatetime NULL ,
 NeedUpdate AS (convert(tinyint,case when ((descr is null or
datalength(descr)=  0 or Verified is null or Entered < Verified))
then 1 else 0 end))
) ON PRIMARY TEXTIMAGE_ON PRIMARY
GO

INSERT INTO descr VALUES (1, 'hello', 24000, null)
GO

CREATE  INDEX [NX_NU] ON [dbo].[Descr]([NeedUpdate]) ON [PRIMARY]
GO

DBCC CHECKTABLE(Descr)
GO
				

Modification Type:MajorLast Reviewed:10/17/2003
Keywords:kbbug kbfix KB308775 kbAudDeveloper