DB2 Error Code – -556 a privilege cannot be revoked because grant is to public

In this post, you’ll learn about the error message -556 a privilege cannot be revoked because grant is to public in the IBM DB2 database , the reason why it occurs along with the solution to fix it

IBM DB2 Error Message

-556 a privilege cannot be revoked because grant is to public

Reason for the Error

The REVOKE statement was not successful because of one of the following reasons: *�� The revokee, ‘authid2’, does not possess the ‘privilege’ *�� The revoker, ‘authid1’, did not explicitly grant the privilege to ‘authid2’� *�� ‘Authid2’ is the owner of the specified object.An authorization ID can REVOKE only the ‘privileges’ that it has explicitly granted to other authorization IDs, unless the authorization ID has SYSADM or SYSCTRL authority and specifies the BY clause.� No authorization ID, not even SYSADM, can revoke ‘privileges’ on an object from the object owner.

Solution

Check the appropriate authorization catalog tables to verify that the revokee ‘authid2’ possesses the privilege to be revoked.� Queries can be made with GRANTEE = ‘authid2’ and the privilege column not = blanks.� Correct and re issue the REVOKE statement.Note:�� If a user holding SYSADM or SYSCTRL authority receives this SQLCODE, the ‘BY’ clause may have been omitted from the REVOKE statement.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the error message -411 current sqlid cannot be used in a statement that references...
  • DB2
  • December 3, 2024
In this post, you’ll learn about the error message -158 the number of columns specified for the view is not...
  • DB2
  • December 3, 2024
In this post, you’ll learn about the error message -618 operation operation is not allowed on system databases in the...
  • DB2
  • December 3, 2024