Privileges to select on a view – Issue

oracleoracle-12cpermissionsschema

I have two schemas: A and B.

A has one table with the name 'TEST'. B has created a view 'BASE' which does select on table 'TEST'.

Now I create another user C to which I grant, select on the view 'BASE'.

When the user C runs the following statement, he gets insufficient privileges error:

select * on B.BASE;

What privileges is required to select the contents of the view?

Best Answer

You need to grant select on the tables in schema A to the user B WITH GRANT OPTION.

From the documentation:

To grant SELECT on a view to another user, either you must own all of the objects underlying the view or you must have been granted the SELECT object privilege WITH GRANT OPTION on all of those underlying objects. This is true even if the grantee already has SELECT privileges on those underlying objects.