Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Insufficiente privileges querying my own views...
Hi Luis,
Please check this exercies :-
Moral -
SQL> create role emp_select;
Role created.
SQL> grant select on emp to emp_select;
Grant succeeded.
SQL> connect text/text
Connected.
SQL> ed
Wrote file afiedt.buf
1 create view text_emp_select
2* as select *from scott.emp
SQL> /
as select *from scott.emp
*
SQL> connect scott/tiger
Connected.
SQL> drop role emp_select;
Role dropped.
SQL> grant select on emp to text;
Grant succeeded.
SQL> connect text/text
Connected.
SQL> create view emp_select as select *from scott.emp; View created.
But when we grant the ALTER ANY ROLE to TEXT user he/she can create a view:-
SQL> ed
Wrote file afiedt.buf
1* grant alter any role to text
SQL> /
Grant succeeded.
SQL> connect text/text
Connected.
SQL> create view emp_select as select *from scott.emp;
View created.
SQL>
Hope I cleared your doubt :-)
QUERIES in Oracle, Feel free to Join:
http://groups.yahoo.com/group/oracle_expert/
Regards,
Sunil Bhola
Oracle_Expert, Moderator
Jose Luis Delgado <joseluis_delgado_at_yahoo.com> wrote: DBAs...
Sorry if this is a silly question, my brain is not thinking clearly today...
1.- UserA gives SELECT privileges on his tables to UserB trough a role RoleA.
2.- UserB creates ViewA, querying the UserA tables.
3.- UserB creates viewB, which query ViewA, in his own schema.
He gets:
ORA-01031 Insufficient privileges
Of course, this is because of he cannot query the tables (through the role, right?) that the ViewA is pointing to...
the point here is:
What could be the best solution to give UserB enough
privileges to query the view, without having a mess
with privileges??
Thanks in advance!
JL
--
http://www.freelists.org/webpage/oracle-l
QUERIES in Oracle, Feel free to Join:
http://groups.yahoo.com/group/oracle_expert/
Regards,
Sunil Bhola
Oracle_Expert, Moderator
![]() |
![]() |