BUG: No List of AutoStart Stored Procedures in SP_HELPSTARTUP

Last reviewed: April 8, 1997
Article ID: Q152546
6.00 6.50 The information in this article applies to:
  • Microsoft SQL Server, version 6.0

SYMPTOMS

If the stored procedure SP_HELPSTARTUP is executed from a database other than master, SP_HELPSTARTUP will not show the list of autostart stored procedures.

CAUSE

This is because the stored procedure is selecting a list of autostart procedures by checking the appropriate value of the category field in sysobjects, but the sysobjects table is not qualified by the master database in the procedure text. So the sysobjects table of the current database will be searched, resulting in no output because all the autostart stored procedures are created only in the master database.

The stored procedure should return correct results because by definition a stored procedure whose name is preceded by 'sp_' can be executed in any database. If the stored procedure is not existent in the database, the stored procedure is assumed to be in the master database and the server tries to find the stored procedure in the master database. The issue here is that though the stored procedure exists, the sysobjects table referenced will be that of the database currently in use, because the text of the procedure does not qualify the sysobjects table with the master database.

WORKAROUND

Execute the procedure SP_HELPSTARTUP from the master database. An alternative is to drop and re-create the stored procedure with the following change to its text::

    select 'Startup stored procedures:' = name from master..sysobjects

where category & 16 = 16

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. the list of autostart stored procedures.


Additional query words:master autostart sp_helpstartup 6.0 stored
procedure database
Keywords : kbbug6.00 SSrvDRI
Version : 6.00 6.5
Platform : 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 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.