BUG: Use of Sp_dboption by an Aliased DBO Fails with Error 15244

Last reviewed: August 19, 1997
Article ID: Q172751
The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 and 6.5
BUG #: 16242 (6.5)
       15545 (6.0)

SYMPTOMS

When an aliased database owner (DBO) attempts to change any of the database options using the sp_dboption system stored procedure, the following error message is raised from the stored procedure:

   Msg 15244, Level 16, State 1
   Only the System Administrator (SA) or the owner of the database may set
   db options

Consider the following scenario:

Assume you have a login name of Raj aliased as the DBO in the pubs database. Log on as Raj and try to change the database option for the pubs database by executing the command below. You will encounter the error message described above.

   sp_dboption pubs, 'single', true

This behavior is incorrect; Raj should be able to change the database options.

CAUSE

SQL Server incorrectly checks the user validation in the sp_dboption system stored procedure for aliased DBOs.

WORKAROUND

To work around this problem, log on as a system administrator (SA) to be recognized as the only DBO who will be able to make database option changes using the sp_dboption system stored procedure.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words:
Keywords : kbbug6.00 kbbug6.50 SSrvProg SSrvTran_SQL kbprg kbusage
Version : 6.0 6.5
Platform : winnt
Issue type : kbbug
Solution 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: August 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.