dbTalk Databases Forums  

accessing a view from another user

comp.databases.oracle comp.databases.oracle


Discuss accessing a view from another user in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
matthias
 
Posts: n/a

Default accessing a view from another user - 09-15-2004 , 02:39 AM






assume:

user a has the table tab_a
user b has select-right on the table tab_a an creates the view view_b

create view view_b as
select * from a.tab_a;

this works fine and b can see the content of the table tab_a.

now b grants user c the select-right on his view view_b.
but when c tries to look at the view

select * from b.view_b

he gets an ora-01031: insufficient privileges! why? this even happens
with select-rights on the table tab_a from user a! now he could create
an own view on the table of user a or look directly on this table, but
he still can't open the view of user b!

what must be done that user c can look at the view view_b from user b?

thanx

matthias

Reply With Quote
  #2  
Old   
Mark C. Stock
 
Posts: n/a

Default Re: accessing a view from another user - 09-15-2004 , 04:34 AM







"matthias" <wild.utzel (AT) gmx (DOT) de> wrote

Quote:
assume:

user a has the table tab_a
user b has select-right on the table tab_a an creates the view view_b

create view view_b as
select * from a.tab_a;

this works fine and b can see the content of the table tab_a.

now b grants user c the select-right on his view view_b.
but when c tries to look at the view

select * from b.view_b

he gets an ora-01031: insufficient privileges! why? this even happens
with select-rights on the table tab_a from user a! now he could create
an own view on the table of user a or look directly on this table, but
he still can't open the view of user b!

what must be done that user c can look at the view view_b from user b?

thanx

matthias
b has rights, but notthe privilege to pass them on (which is what granting
on the view attempts to do)

this requires the GRANTE xxxx ... WITH GRANT OPTION syntax

++ mcs




Reply With Quote
  #3  
Old   
matthias
 
Posts: n/a

Default Re: accessing a view from another user - 09-15-2004 , 09:45 AM



Quote:
| assume:
|
| user a has the table tab_a
| user b has select-right on the table tab_a an creates the view view_b
|
| create view view_b as
| select * from a.tab_a;
|
| this works fine and b can see the content of the table tab_a.
|
| now b grants user c the select-right on his view view_b.
| but when c tries to look at the view
|
| select * from b.view_b
|
| he gets an ora-01031: insufficient privileges! why? this even happens
| with select-rights on the table tab_a from user a! now he could create
| an own view on the table of user a or look directly on this table, but
| he still can't open the view of user b!
|
| what must be done that user c can look at the view view_b from user b?
|
| thanx
|
| matthias

b has rights, but notthe privilege to pass them on (which is what granting
on the view attempts to do)

this requires the GRANTE xxxx ... WITH GRANT OPTION syntax

++ mcs
that's it! thank you!


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.