BUG: Error 225 When Using ALTER TABLE in a Batch

Last reviewed: April 28, 1997
Article ID: Q89068

The information in this article applies to:
  • Microsoft SQL Server version 4.2 for OS/2
  • Microsoft SQL Server, versions 4.21 and 4.21a
BUG# OS/2: 1375 (4.2)
       NT:  871 (4.2)

SYMPTOMS

If the ALTER TABLE statement is used with other SQL statements in a single batch, the following error message appears:

   Can not run query -- referenced object (name NAME NOT
   RECOVERABLE) dropped during query optimization.
   (msg 225, level 16, state2)

CAUSE

The ALTER TABLE statement cannot be combined with other SQL statements in a batch.

WORKAROUND

Do not combine ALTER TABLE with other SQL statements in a single batch.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2 and Microsoft SQL Server versions 4.21 and 4.21a. We are researching this problem and will post new information here as it becomes available.


Additional query words: Transact-SQL together Windows NT
Keywords : kbbug4.20 kbprg SSrvServer SSrvWinNT
Version : 4.2 | 4.21 4.21a
Platform : OS/2 WINDOWS


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 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.