Microsoft KB Archive/96768

= BUG: Message 511 After Running Stored Procedure =

Article ID: 96768

Article Last Modified on 2/14/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition

-



This article was previously published under Q96768



BUG# NT: 892 (4.2)



SYMPTOMS
When you execute a stored procedure under SQL Server 4.2, error message 511 is displayed:

Updated or inserted row is bigger than maximum size ( bytes ) allowed for this table.

Other errors may also appear, such as error 515:

Attempt to insert the value NULL into column ' ', table' '; column does not allow nulls. Update fails.



CAUSE
A stored procedure that uses temporary tables may be invalidated when a new object is added to the model database and the SQL Server is shutdown and restarted. When tempdb is rebuilt, the new object in the model database becomes an object in tempdb as well. This new object grabs the object ID the stored procedure was using to reference the temporary table. If one new object in model is added, then one stored proc may be invalidated. If two objects are added, then two references to temp tables in stored procedures may be invalidated, and so on.



RESOLUTION
To correct the problem, simply drop and recreate the affected stored procedure. The INSTMSTR.SQL and INSTCAT.SQL script files may be used to rebuild the system and catalog stored procedures, respectively. You need to stop and restart SQL Server for the changes to take affect.



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

Additional query words: Windows NT

Keywords: kbbug kbprogramming KB96768

-

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

© Microsoft Corporation. All rights reserved.