PRB: Procedures May Fail w/ Msg 2821 After v.6.0 Upgrade

Last reviewed: April 30, 1997
Article ID: Q134749

The information in this article applies to:
  • Microsoft SQL Server, version 6.0

SYMPTOMS

After you upgrade to Microsoft SQL Server version 6.0, you may encounter Msg 2821 when you try to access a stored procedure, trigger, or view:

   You must drop and recreate procedure %.*s.

CAUSE

When you upgrade a database to SQL Server version 6.0, all procedures, triggers, and views are recreated from the text definition stored in syscomments. If any of these objects fail this process during the upgrade, any attempt to access the object fails with Msg 2821. The upgrade process continues to check each object within a database, even if one fails.

Any attempt to execute a procedure fails with Msg 2821 specifying the procedure name. Any attempt to access a view results in Msg 2821 and Msg 4401. Additionally, any attempt to execute a command that causes a trigger to fire results in Msg 2821 with no procedure name specified in the error message.

WORKAROUND

After you upgrade to SQL Server version 6.0, you should scan the UPGRADE.OUT file found in the SQL60\INSTALL directory for any errors reported while upgrading user databases. Pay close attention to the section titled "Upgrading procedures, triggers, views....". Once the cause of the error is found and corrected, run the sp_db_upgrade procedure in the database that failed during the upgrade. This ensures the database has been properly upgraded for version 6.0.


Additional query words: sql6 sysprocedures syscomments
Keywords : kbsetup SSrvInst SSrvStProc
Version : 4.21a 6.0
Platform : WINDOWS
Issue type : kberrmsg


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.