Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 14986 invoked from network); 8 Aug 2007 16:34:42 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by 69.64.49.119 with SMTP; 8 Aug 2007 16:34:41 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EE21972417A;
 Wed,  8 Aug 2007 17:32:23 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 32219-04; Wed, 8 Aug 2007 17:32:23 -0400 (EDT)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 55E74723D07;
 Wed,  8 Aug 2007 17:32:23 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 08 Aug 2007 16:50:16 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B604E72530A
 for <oracle-l@freelists.org>; Wed,  8 Aug 2007 16:50:16 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 21768-10 for <oracle-l@freelists.org>;
 Wed, 8 Aug 2007 16:50:16 -0400 (EDT)
Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.187])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5FA88724FFF
 for <oracle-l@freelists.org>; Wed,  8 Aug 2007 16:50:15 -0400 (EDT)
Received: by rv-out-0910.google.com with SMTP id c27so234949rvf
        for <oracle-l@freelists.org>; Wed, 08 Aug 2007 13:52:33 -0700 (PDT)
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;
        d=gmail.com; s=beta;
        h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type;
        b=bYuXWrjo1fA049i7XfbDzN8g9cI6lp02bJd8XL6fndoZlXNsULIKQW0EQ8t0NTdZgRqgUWmnesAy0/6F0PgOkN3Aks6Zup7ZPl+B7e89ieEywdSg+HM0wABhALJa3aoWjhN9w8VkpzPdI8y9YZ1Ie9vGLhniFfwElXsnK6ecOOs=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:message-id:date:from:to:subject:mime-version:content-type;
        b=QxyQkhYpx2UAuhWe4qI5vexehuBJ8a44i9lfAnyIwxCqO+coDA4kKueeIrj3KGLs/f1EOZL8GIzr/a1zh5fCOWpTsFd1kcyfYleZp6wYtw+4YOvQ5/ukj9dVe4vrcghfmPwwuXVFV6y1lYD7L0MRHu1UxYyn3fY+RfrECERzSbU=
Received: by 10.115.89.1 with SMTP id r1mr575517wal.1186606353418;
        Wed, 08 Aug 2007 13:52:33 -0700 (PDT)
Received: by 10.114.130.17 with HTTP; Wed, 8 Aug 2007 13:52:33 -0700 (PDT)
Message-ID: <de807caa0708081352v5f84b0b6w5a0a13bcca194656@mail.gmail.com>
Date: Wed, 8 Aug 2007 15:52:33 -0500
From: "Dennis Williams" <oracledba.williams@gmail.com>
To: "oracle-l@freelists.org" <oracle-l@freelists.org>
Subject: Unexpected result from ALL_TABLES
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_126621_32263676.1186606353404"
X-archive-position: 432
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: oracledba.williams@gmail.com
Precedence: normal
Reply-to: oracledba.williams@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
------=_Part_126621_32263676.1186606353404
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

List,

 This is Oracle 8i.

I need to write a script to ensure a user has access to all the tables,
views, etc. that are needed. So I assumed that I just needed to query
ALL_TABLES as the user. Did that and the needed tables were listed. Then I
tried doing a describe on one of the tables and received the old ORA-00942:
table or view does not exist. Turned out that the tables were granted to a
role, but that role hadn't been granted to the user. Granting the role
corrected the problem.

My question is why a user can see tables in ALL_TABLES that they can't
select? Is there a better way to do this? I thought about doing this from
DBA_TABLES, but was concerned about the different permutations of whether a
table was granted to a role, then granted to the users. I thought if the
user could see the table in ALL_TABLES, then the user would indeed have
access, but apparently it isn't that simple.

For some tables, I also want to ensure the user can update, insert, whatever
they should be able to do. Should I use ALL_TAB_PRIVS for that? Does anyone
know if there are any gotcha's there? Does every entry mean it applies to
this user, or do I need to include GRANTEE in the query?

Thanks for any suggestions.
Dennis Williams

------=_Part_126621_32263676.1186606353404
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>List,</div>
<div>&nbsp;</div>
<div>
<div>This is Oracle 8i.</div>
<div>&nbsp;</div></div>
<div>I need to write a script to ensure a&nbsp;user has access to all the tables, views, etc. that&nbsp;are needed. So I assumed that I just needed to query ALL_TABLES as the user. Did that and the needed tables were listed. Then I tried doing a describe on one of the tables and received the old ORA-00942: table or view does not exist. Turned out that the tables were granted to a role, but that role hadn&#39;t been granted to the user. Granting the role corrected the problem.
</div>
<div>&nbsp;</div>
<div>My question is why a user can see tables in ALL_TABLES that they can&#39;t select? Is there a better way to do this? I thought about doing this from DBA_TABLES, but was concerned about the different permutations of whether a table was granted to a role, then granted to the users. I thought if the user could see the table in ALL_TABLES, then the user would indeed have access, but apparently it isn&#39;t that simple.
</div>
<div>&nbsp;</div>
<div>For some tables, I also want to ensure the user can update, insert, whatever they should be able to do. Should I use ALL_TAB_PRIVS for that? Does anyone know if there are any gotcha&#39;s there? Does every entry mean it applies to this user, or do I need to include GRANTEE in the query?
</div>
<div>&nbsp;</div>
<div>Thanks for any suggestions.</div>
<div>Dennis Williams</div>

------=_Part_126621_32263676.1186606353404--
--
http://www.freelists.org/webpage/oracle-l


