BUG: SQL Enterprise Manager May Show Incorrect Permissions

Last reviewed: April 15, 1997
Article ID: Q166203
The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 and 6.5
BUG #: 16745

SYMPTOMS

The SQL Enterprise Manager (SEM) may display incorrect permissions if objects are created under the same name but by different owners. The following procedure demonstrates the problem:

  1. Create user1, user2, and user3.

  2. Grant the appropriate permissions to these three users so that they can all select from authors.

  3. Have user1 log on and create the following view:

          CREATE VIEW view_authors_names
          AS
          SELECT au_fname, au_lname
          FROM authors
    

  4. Have user2 log on and create the following view:

          CREATE VIEW view_authors_names
          AS
          SELECT au_fname, au_lname
          FROM authors
    

  5. Grant user3 both select permissions for user1.view_authors_names and user2.view_authors_names.

  6. Go to SEM and select one of objects in view from the pubs database.

  7. Right-click the mouse and look at the permission by user; you should see the incorrect permissions result.

You may observe similar incorrect behavior with different objects, such as tables. For example, two tables created under the same name but different users also have the incorrect permission problem.

WORKAROUND

To work around this problem, use Transact-SQL instead. The following sample script illustrates how query permissions can be distinguished by a user's logon:

   USE databaseName
   GO

   SELECT object = (u.name + '.' + o.name),
          permission = spt.name
   FROM   sysprotects p,
          sysobjects o,
          sysusers u,
          master..spt_values spt
   WHERE  p.uid = user_id('user's login') AND
          p.id = o.id AND
          o.uid = u.uid AND
          spt.number = p.action AND
          spt.name <> NULL
   GO

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.


Keywords : kbbug6.00 kbbug6.50 kbusage SSrvEntMan
Version : 6.0 6.5
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbpending


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