Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Privileges for other's table

Privileges for other's table

From: Hand, Michael T <HANDM_at_polaroid.com>
Date: Mon, 09 Sep 2002 16:23:20 -0800
Message-ID: <F001.004CB959.20020909162320@fatcity.com>

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
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Sep 09 2002 - 19:23:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US