Microsoft KB Archive/241636

= BUG: BOL Incorrectly Documents Permissions to System Stored Procedures =

Article ID: 241636

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q241636



BUG #: 55837, 56428 (SQLBUG_70)



SYMPTOMS
There following system stored procedures check to verify that you are logged in as the system administrator (SA) rather than a member of the System Administrators (sysadmin) role as Books Online (BOL) states:

sp_resetstatus

sp_certify_removable

sp_add_file_recover_suspect_db

sp_cycle_errorlog

sp_create_removable

If you are a member of the sysadmin role and you attempt to run one of these stored procedures, you will receive the following error message:

Server: Msg 15003, Level 16, State 1, Line 0

Only members of the sysadmin role can execute this stored procedure.



CAUSE
These procedures are incorrectly checking to see if SUID <> 1. If SUID is <1>, then the execution of the stored procedure is aborted.



WORKAROUND
To work around this problem, log in as SA rather than as a member of the sysadmin role.

The exception to this rule is sp_cycle_errorlog. This stored procedure is basically executing DBCC ERRORLOG and members of the sysadmin role are able to execute that command directly. This is an undocumented DBCC command but the syntax is very simple. Members of the sysadmin role should run: dbcc errorlog and it will return the following message indicating that the errorlog has been cycled:

DBCC execution completed. If DBCC printed error messages, contact your system administrator.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.

Keywords: kbbug kbpending KB241636

-

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

© Microsoft Corporation. All rights reserved.