I have an user with some tables and I granted privileges to three of them to another user. Now I need to create a view and grant select to another user, like this:
User A
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE_A TO USER_B WITH GRANT OPTION;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE_B TO USER_B WITH GRANT OPTION;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE_C TO USER_B WITH GRANT OPTION;
User B
CREATE OR REPLACE VIEW V_XYZ AS SELECT * FROM TABLE_A, TABLE_B, TABLE_C;
GRANT ALL ON V_XYZ to USER_C;
This give the folowing error:
ORA-01720: "grant option does not exist for '%s.%s'"
*Cause: A grant was being performed on a view or a view was being replaced
and the grant option was not present for an underlying object.
*Action: Obtain the grant option on all underlying objects of the view or
revoke existing grants on the view.