PRB: Stored Procedure Scripts Not Generated in Dependency Order

Last reviewed: May 14, 1997
Article ID: Q168257
The information in this article applies to:
  • Microsoft SQL Server, version 6.5

SYMPTOMS

In Microsoft SQL Server version 6.5, scripts for stored procedures are generated in alphabetical order if the object dependencies options is not selected. When you run the script to create the stored procedures, you will get the following error message:

   Msg 2007: Cannot add rows to Sysdepends for the current stored procedure
   because it depends on the missing object <object name>. The stored
   procedure will still be created.

This error does not affect your ability to use the stored procedures. They will be created and you will be able to run them. You can avoid this error message by selecting the "include object dependencies" option when the scripts are generated. However, the script will include all other objects that the stored procedures depend on. This may cause problems if you select the drop objects option and the stored procedures depend on tables.

WORKAROUND

To work around this problem, do either of the following:

  • Generate the scripts without including the object dependencies and ignore the error you receive when running the script to create the stored procedures.

    -or-

  • Include the object dependencies and then delete the drop and create table sections.


Additional query words: Enterprise manager SEM DMO ::Script()
Keywords : kbtool kbusage SSrvEntMan
Version : 6.5
Platform : WINDOWS
Issue type : kbprb
Resolution Type : kbworkaround


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