2

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.
RBarryYoung
  • 55,398
  • 14
  • 96
  • 137
Silva_PT_SCP
  • 557
  • 2
  • 8
  • 20

2 Answers2

0

You ask ALL privileges to be given to USER_C, but only 4 have been granted to you to the underlying tables. Try either to grant ALL PRIVILEGES from A to B, or to restrict the grant from B to C on SELECT, UPDATE, INSERT, DELETE.

Thinkeye
  • 888
  • 12
  • 22
-1

Try giving:

GRANT select ON V_XYZ to USER_C;
Nitin
  • 290
  • 2
  • 12