IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Revoke on DB2 to remove an user


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
inforajesh

New User


Joined: 09 Dec 2020
Posts: 20
Location: India

PostPosted: Mon Dec 28, 2020 12:24 pm
Reply with quote

I am trying to execute REVOKE on DB2 object to remove an user. Below is the snippet of my REVOKE query,

Code:
REVOKE DISPLAYDB, IMAGCOPY, LOAD, REORG, RECOVERDB, STARTDB, STATS,STOPDB                                                     
    ON DATABASE XXXXXXXX
FROM USERA                                                                   
       BY ZZ                                                                   
          NOT INCLUDING DEPENDENT PRIVILEGES ;   

When I execute this REVOKE , I am getting SQL error -552 (Below is the exact error message)

Code:
DSNT408I SQLCODE = -552, ERROR:  ZZ DOES NOT HAVE THE PRIVILEGE TO PERFORM
         OPERATION REVOKE ... BY   


However, When I try to execute the same REVOKE by excluding 'BY ZZ' the REVOKE is executing fine with RC 0.

P.S :ZZ is having 'G' GRANT auhtority on the respective DB2 object. Not sure why it is not allowing to perform Revoke.

Code:
    DB2A-R ----------------------  DATABASE PRIVILEGES  --------------    ROW 1 OF 20
    Command ===>                                                        Scroll ===>    CSR 
                                                                                      02
    CMD will show commands for this list.  Type command and press ENTER           
    Lists: AU SE UA US                                                             
    QUALIFIER: DATABASE=XXXXXXXX                                                   
    Cmd User           TBL TSP ADM CTL MNT DIS DRP CPY LOD REO REC REP STA STT STO
    ----v----1----v----2----v----3----v----4----v----5----v----6----v----7----v----
        ZZ              G   G   G   G   G   G   G   G   G   G   G   G   G   G   G 

Please share your thoughts.
Coded for you. Please do it yourself next time
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Dec 28, 2020 4:04 pm
Reply with quote

Fairly obvious...
Quote:
ZZ DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION REVOKE ... BY


If you require that privilege then get you privileges updated.

And please use the code tags when presenting what is, or could be, shown on the 3270 terminal.
Back to top
View user's profile Send private message
inforajesh

New User


Joined: 09 Dec 2020
Posts: 20
Location: India

PostPosted: Mon Dec 28, 2020 10:30 pm
Reply with quote

Nic Clouston wrote:
Fairly obvious...
Quote:
ZZ DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION REVOKE ... BY


If you require that privilege then get you privileges updated.

And please use the code tags when presenting what is, or could be, shown on the 3270 terminal.



Thank you Nic for your response. Can you tell me in which IBM table I can check the GRANT & REVOKE privileges' of an individual user ?
From the above example, I need to check whether why ZZ user is not having the REVOKE privilages
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Tue Dec 29, 2020 12:42 am
Reply with quote

If you are not a DBA then talk to DBA please otherwise start by looking at manuals.
REVOKE
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Dec 29, 2020 1:23 am
Reply with quote

Quote:
I need to check whether why ZZ user is not having the REVOKE privilages


looking at the DB2 catalog tables You will just get the confirmation that ZZ does not have the REVOKE privileges

the WHY will be a bit more difficult, somebody forgot to GRANT them or they were taken away
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Remove leading zeroes SYNCSORT 4
No new posts user exit in IBM Infosphere Optim DB2 8
Search our Forums:

Back to Top