Microsoft KB Archive/88685

= BUG: Many Objects May Cause Error 703 in DBCC =

Article ID: 88685

Article Last Modified on 2/14/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition

-



This article was previously published under Q88685



BUG# NT: 673 (4.2)



SYMPTOMS
A dbcc checkcatalog attempted on a database which has many objects (for example, over 640 tables) may get a 703 error:

Memory request failed because more than 64 pages are required to run the query in its present form. The query should be broken up into shorter queries if possible.



WORKAROUND
The script below will create a stored procedure CatalogCheck which tests most items also tested by dbcc checkcatalog, but will not get the 703 error. The sa can execute the procedure in any database: execute master..CatalogCheck Key the following script into a file NEWCATCK.SQL and execute it:

isql /Usa /P /S /e /inewcatck.sql /onewcatck.rpt The script is:

create procedure CatalogCheck as /* Check syscolumns <---> sysobjects on &quot;id&quot;   */

if exists (select *          from syscolumns           where id not in (select id                            from sysobjects)) print &quot;A column exists in syscolumns with no associated object in sysobjects&quot;

/* Check syscolumns <---> systypes on &quot;usertype&quot; */

if exists (select *          from syscolumns           where usertype not in (select usertype from systypes))

print &quot;A column exists in syscolumns with no associated type in systypes&quot;


 * Check sysobjects <---> syscolumns on &quot;id&quot; for views */

if exists (select *          from sysobjects           where type in ('v', 'V')           and id not in (select id                           from syscolumns))

print &quot;A view exists in sysobjects with no columns in syscolumns&quot;

/* Check sysobjects <---> sysprocedures on &quot;id&quot; for views */

if exists (select *              from sysobjects           where type in ('v', 'V')           and id not in (select id                          from sysprocedures))

print &quot;A view exists in sysobjects with no entry in sysprocedures&quot;

/* Check sysobjects <---> sysprocedures on &quot;id&quot; for

procedures */ if exists (select *          from sysobjects           where type in ('p', 'P')           and id not in (select id                          from sysprocedures))

print &quot;A procedure exists in sysobjects with no entry in sysprocedures&quot;

/* Check sysobjects <---> sysprocedures on &quot;id&quot; for rules &

defaults */ if exists (select *          from sysobjects           where type in ('d', 'D', 'r', 'R')           and id not in (select id                          from sysprocedures))

print &quot;A rule and/or default exists in sysobjects with no entry in sysprocedures&quot;

/* Check sysobjects <---> syscolumns on &quot;id&quot; for tables */

if exists (select *          from sysobjects           where type in ('s', 'S', 'u', 'U')           and id not in (select id                          from syscolumns))

print &quot;A table exists in sysobjects with no entry in syscolumns&quot;

/* Check sysobjects <---> sysindexes on &quot;id&quot; for tables */

if exists (select *          from sysobjects           where type in ('s', 'S', 'u', 'U')           and id not in (select id                          from sysindexes))

print &quot;A table exists in sysobjects with no entry in sysindexes&quot;

/* Check sysindexes <---> sysobjects on &quot;id&quot; */

if exists (select *          from sysindexes           where id not in (select id                            from sysobjects))

print &quot;An entry exists in sysindexes with no entry in sysobjects&quot;

/* Check sysindexes <---> syssegments on &quot;segment&quot; */

if exists (select *          from sysindexes           where segment not in (select segment from syssegments))

print &quot;An entry in sysindexes has a 'segment' value with no entry in syssegments&quot;

/* Check sysprocedures <---> sysobjects on &quot;id&quot; */

if exists (select *          from sysprocedures           where id not in (select id                            from sysobjects))

print &quot;An entry exists in sysprocedures with no entry in sysobjects&quot;

print &quot;Catalog Check complete&quot; go



STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 4.2 and 4.21a. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: sp_configure tempdb Windows NT

Keywords: kbprogramming KB88685

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.