BUG: sp_helprotect Output Incorrect for Some Columns

Last reviewed: April 28, 1997
Article ID: Q88088

The information in this article applies to:
  • Microsoft SQL Server version 4.2 for OS/2
BUG# OS/2: 1406 (4.2)

SYMPTOMS

When "sp_helprotect <table>" is issued on a table in Microsoft SQL Server version 4.2 for OS/2, the output contains duplicate rows for every column in the table.

CAUSE

When granting and/or revoking permissions on individual columns of a table, sp_helprotect might generate duplicate rows for every column in the table which makes it hard to see which permissions you do or do not have.

The following example illustrates this:

   CREATE TABLE test (
   col1 int, col2 int, col3 int, col4 int, col5 int,
   col6 int, col7 int, col8 int, col9 int, col10 int)
   go

   GRANT SELECT ON test TO public
   go
   GRANT UPDATE ON test TO public
   go
   REVOKE UPDATE ON test (col5) FROM public
   go

   sp_helprotect test
   go

Issuing the above script in SQL Server 4.2 gives the following output from sp_helprotect:

       Type    Action      User       Column
       ----    ------      ----       ------

       Grant   Select      public     All
       Grant   Update      public     col1
       Grant   Update      public     col1
       Grant   Update      public     col10
       Grant   Update      public     col10
       Grant   Update      public     col2
       Grant   Update      public     col2
       Grant   Update      public     col3
       Grant   Update      public     col3
       Grant   Update      public     col4
       Grant   Update      public     col4
       Grant   Update      public     col5
       Grant   Update      public     col6
       Grant   Update      public     col6
       Grant   Update      public     col7
       Grant   Update      public     col7
       Grant   Update      public     col8
       Grant   Update      public     col8
       Grant   Update      public     col9
       Grant   Update      public     col9
       Revoke  Update      public     col5

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words:
Keywords : kbbug4.20 kbprg SSrvTrans
Version : 4.2
Platform : OS/2


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