If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2/zOS: REVOKE privs from PLAN...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-07, 05:53
VolkerK VolkerK is offline
Registered User
 
Join Date: Dec 2003
Location: Duesseldorf - Germany - Europe - Earth - Galaxy
Posts: 18
Question DB2/zOS: REVOKE privs from PLAN...

Hello,

I've got a problem revoking privileges from a plan. Normally our programmers issue

"SET CURRENT SQLID = 'myplanowner';"
"GRANT EXECUTE ON PLAN myplan TO PUBLIC;"

That works, they have created a privilege on 'myplan' for PUBLIC with 'myplanowner', a RACF-group, as grantee.

When they want to this privilege it doesn't work,

"REVOKE EXECUTE ON PLAN myplan FROM PUBLIC;" doesn't work, neither with SET CURRENT SQLID" nor without. Result = SQLCODE -556, ERROR: PUBLIC CANNOT HAVE THE EXECUTE PRIVILEGE ON PK7VTEST REVOKED BY KIRPVO BECAUSE THE REVOKEE DOES NOT POSSESS THE PRIVILEGE OR THE REVOKER DID NOT MAKE THE GRANT

Certainly I can revoke with the "BY 'myplanowner'" keyword since I am SYSADM, but I don't unterstand why a "normal" user ('myplanowner') can't revoke a privilege he has granted on an object that belongs to him.

Did I missunderstand the SQL Reference?

Regards,
Volker.
Reply With Quote
  #2 (permalink)  
Old 03-08-07, 08:04
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Did you have a look at SYSIBM.SYSPLANAUTH to verify that the user who wants to issue the REVOKE statement is actually the GRANTOR?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 03-08-07, 08:15
VolkerK VolkerK is offline
Registered User
 
Join Date: Dec 2003
Location: Duesseldorf - Germany - Europe - Earth - Galaxy
Posts: 18
Yes, I used CA's RC/Query to see that grantor was 'myplanowner'. When I as SYSADM try to revoke the privilege I have to use the "BY 'myplanowner'" keyword.

Regerds,
Volker.
Reply With Quote
  #4 (permalink)  
Old 03-08-07, 08:29
vini_srcna vini_srcna is offline
Registered User
 
Join Date: May 2006
Posts: 82
Are you sure the GRANT statements executed earlier were successfull...? Do you find the entry in catalog..? The secondary id used to GRANT should be used while revoking. If am right the user issued the REVOKE statement is KIRPVO.
__________________
Vinay,
Reply With Quote
  #5 (permalink)  
Old 03-08-07, 09:15
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
just to ensure:
the revoke was only done once ?

if there is a:
SET CURRENT SQLID = 'KIRPVO' ;
REVOKE EXECUTE ON PLAN myplan FROM PUBLIC ;
( ... other statements ... )
REVOKE EXECUTE ON PLAN myplan FROM PUBLIC ;

the second statement will receive an SQLCODE -556
and if a ROLLBACK is done because of that the first REVOKE is also undone.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On