Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Privileges for other's table
Hand, Michael T,
=09hi, what you tested is not the normal behavior of oracle,=
neither the document said like that nor in my database behavior=
like that.Maybe something is wrong with your database:)
=09
=09Look:
SQL> conn internal
Connected.
SQL> create user t identified by t;
User created.
SQL> grant connect to t;
Grant succeeded.
SQL> conn t/t
Connected.
SQL> select count(*) from sys.obj$;
select count(*) from sys.obj$
*
SQL> conn internal
Connected.
SQL> grant select on obj$ to t;
Grant succeeded.
SQL> conn t/t
Connected.
SQL> select count(*) from sys.obj$;
COUNT(*)
26011
SQL> create or replace view sysobj as select * from sys.obj$;
View created.
=09=09
SQL> select * from v$version;
BANNER
Regards
zhu chao
Eachnet DBA
86-21-32174588-667
chao_ping_at_vip.163.com
www.happyit.net
=3D=3D=3D=3D=3D=3D=3D 2002-09-09 16:23:00 ,you wrote=A3=BA=3D=3D=3D=3D=3D=3D=3D
>Ok, I haven't had to deal with privileges much lately but this=
one had be
>stumped for a while, V8.1.7 Tru64.
>
>This is from an account with minimal privileges:
>
>SQL> select count(*) from sys.obj$;
>select count(*) from sys.obj$
> *
>ERROR at line 1:
>ORA-00942: table or view does not exist
>
>SQL> connect sys
>Enter password:
>Connected.
>SQL> grant select on obj$ to utility;
>
>Grant succeeded.
>
>SQL> connect utility/xxxx
>Connected.
>
>SQL> select count(*) from sys.obj$;
>
> COUNT(*)
>----------
> 37742
>
>SQL> create view o_by_vlo as select name, obj# from sys.obj$;
>create view o_by_vlo as select name, obj# from sys.obj$
> *
>ERROR at line 1:
>ORA-00942: table or view does not exist
>
>SQL> connect sys
>Enter password:
>Connected.
>SQL> grant select on obj$ to utility with grant option;
>
>Grant succeeded.
>
>SQL> connect utility/xxxx
>Connected.
>SQL> create view o_by_vlo as select name, obj# from sys.obj$;
>
>View created.
>. . .
>So it would seem that with grant option is needed to create a=
view on
>another schema's tables. It took a little thinking on my part=
to realize
>that this makes sense as the view owner would be able to grant=
privileges on
>the underlying tables. Incidentally, I also found out that you=
can't use
>the grant option within roles. I wonder why?
>
>Michael Hand
>Polaroid Corp
>
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Hand, Michael T
> INET: HANDM_at_polaroid.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858)=
538-5051
>San Diego, California -- Public Internet access / Mailing=
Lists
>----------------------------------------------------------------=