Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g89NjH217168
 for <oracle-l@naude.co.za>; Mon, 9 Sep 2002 19:45:17 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id QAA04521;
 Mon, 9 Sep 2002 16:45:44 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004CB959; Mon, 09 Sep 2002 16:23:20 -0800
Message-ID: <F001.004CB959.20020909162320@fatcity.com>
Date: Mon, 09 Sep 2002 16:23:20 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Hand, Michael T" <HANDM@polaroid.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Hand, Michael T" <HANDM@polaroid.com>
Subject: Privileges for other's table
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


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@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@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).

