Question: I am getting an ORA-01720 error while trying to
grant SELECT privileges to a second user on a view owned by one
user:
ORA-01720: grant
option does not exist for 'SYS.V_$INSTANCE'
I even granted select on sys.v_$instance to the second
user. Still the problem persists. How do I correct this ORA-01720 error?
Answer: To diagnose any error, you start by using the
oerr utility to display the ORA-01720 error:
ORA-01720: grant option does not exist for 'string.string'
Cause: A grant was being performed on a view and the grant option
was not present for an underlying object.
Action: Obtain the grant option on all underlying objects of the
view.
First, you
need to grant SELECT on sys.v_$instance to the first user that owns the
view using the GRANT option. This will
allow the owner to grant SELECT on views based on v_$instance to other users,
which should eliminate the ORA-01720.
Here is another more academic example of this problem and the solution to the
ORA-01720:
- USER "A" has
created a TABLE "table_1"
- USER "B" has created a SYNONYM on "A"."table_1"
- USER "B" has created a VIEW "view_1" based on "table_1"
- USER "B" has created a PUBLIC SYNONYM on VIEW "view_1"
- USER "B" has the right to select "A"."table_1" (grant option NO)
- USER "C" has the right to select "A"."table_1" (grant option NO)
- USER "C" has the right to select "B"."view_1" (grant option NO)
Now we log in as USER "C" and try to execute the following command:
SELECT * FROM view_1
ORA-01031: insufficient privileges
Why does USER "C" have insufficient privileges? Do a little experimenting
and log in as USER "B" and executed the following command.
grant select on
view_1 to C;
ORA-01720: grant
option does not exist for A.table_1
So it seems that USER "B" is not able to grant something to another user if the
object he wants to grant access to uses some other object from another USER (in
this case USER "A")! The USER to whom we want to grant
access (USER "C") has the SELECT right on "table_1", so the underlying object
("table_1") of the VIEW "view_1" is very well accessible to USER "C".
Here's the solution:
- USER "A" grants USER "B" select rights WITH grant option on
"table_1"
- USER "B" grants USER "C" select on "view_1"
USER "C" then is able to select from "view_1" without problems.
This should help you resolve your ORA-01720 error.
|
|
|
|
Guarantee your Success!
Oracle is the
world's most complex, robust and flexible database, considered
impossible to master without a mentor.
That's why all BC
Oracle trainers are working professionals, experts in Oracle who
share their tips and secrets. |
|
| |
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2012
All rights reserved.
Oracle ©
is the registered trademark of Oracle Corporation.
|
|