MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Revoking rights / automatic drop of views

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Tue Feb 28, 2006 3:22 am    Post subject: Revoking rights / automatic drop of views Reply with quote

Hi all,

is it possible (DB2 Catalog table ?) to get the information dependig on which access permit's a view, index .... was created ????


Background:

User A passes permit for table TEST to user X
User X creates view for table TEST
User B passes permit for table TEST to user X
User A revokes permit for table TEST or user A will be deleted

Now, User X has permit for table TEST (granted by User B), but view for table TEST is automaticly dropped.

How to avoid the automatic drop for the view ?

Any comments ?


Regards,
bauer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue Feb 28, 2006 9:08 am    Post subject: Reply with quote

bauer,

You can try this. Whenever a view is created a row is inserted into SYSIBM.SYSTABLES and into SYSIBM.SYSTABAUTH tables to record the owner's privileges on the view.

See if you can update these 2 tables to put in the new user as creator. Once updated I don't think it will be a problem even if you dropped the old user.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Tue Feb 28, 2006 10:35 am    Post subject: Reply with quote

kolusu,

thank you for your answer.

This solution doesn't work. I don't like to change the creator of the table.

The problem is:

1) UserA creates table test.table1
2) grant select on test.table1 to UserX (executed by UserA)
3) create view userx.myview (executed by UserX)
4) grant select on test.table1 to UserX (executed by UserB)
5) revoke select on test.table1 (executed by UserA)

Result is:

1) UserX has select permit for test.table1
2) userx.myview has gone


How to avoid the automatioc drop of view userx.myview ??? UserX has still permit for test.table1 ?!

Where stores Db2 the information, that userx.myview was created depeding on the first issued grant ? This informations seems to be used to drop userx.myview during executiun of revoke select on test.table1 from userx executed by userA ?

any additional comments ?

Wasn't there any post who to drop admin keys without any lost of tables created by the admin key ??? I cann't find this post.

regrads,
bauer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group