Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What am I missing???
On 21 Feb 2001 08:30:25 GMT, audun_j_at_yahoo.no (Audun Jensen) wrote:
>Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in
><tss69tcg3e0anq5u4ccvlmo5kq0ilntp5f_at_4ax.com>:
>
>>
>>
>>I gather you were connected as audunj when creating the table?
>>A few remarks
>>From this transcript it looks like you never granted the testrole to
>>your user testuser. So that's one possible reason why it doesn't work
>>as expected.
>>Also: views are compiled. Roles are being disregarded during
>>compilation as roles are volatile. So except for granting select to
>>public (which still seems to be a special case) do not expect views to
>>work when connected as a different user.
>>So that's a second possible reason why it doesn't work.
>>
>>Hth
>>
>>
>>
>>Sybrand Bakker, Oracle DBA
>
>Yes, I was connected as audunj when I created the table. I also have
>granted the role to the testuser (just hadn't copied it to the prev. post):
>GRANT testrole TO testuser;
>
>I guess this means that it is your second remark that "comes in". What do
>you mean by roles being volatile?
>
>I am still pretty sure that I have seen this worked before. In your remark
>you say that I shouldn't _expect_ view to work; does this mean it could
>work in some cases?
>
>regards,
>AJ
Roles are 'volatile'
They consist of certain privileges when the view is compiled, and
there is no guarantee they didn't change when the view is used.
I may have expressed myself unclear with my second remark. It seems that, PUBLIC is a special case: it acts like a role, and it is an user, albeit a special one. So what I meant is: 'if you grant select to public it will work, if you grant access to a role it will not work.'
Regards
Sybrand Bakker, Oracle DBA Received on Wed Feb 21 2001 - 03:04:44 CST