Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Is the owner of a table the schema?
So then, what is GRANT ANY PRIVELEDGE for?
Brian
On Fri, 8 Sep 2000 14:19:46 GMT, Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote:
>> If user_1 has "grant any privilege" he could grant object privileges for any
>> user's objects. Otherwise, in most cases, the owner grants privileges of
>> his objects to other users. Other users may, in turn, grant these
>> privileges to others, if they have been granted the privilege "with grant
>> option"
>
>Eric,
>
> This is not correct. There are only two cases where an object privilege
>can be granted. An object privilege can be granted by the owner of the
>object or to anyone who has been granted the object privilege with the
>ADMIN option. For proof, see the example below with two users (test1 &
>test2):
>
>NTW57 SQL> connect test1/test1
>Connected.
>NTW57 SQL> create table test_table (id number, name varchar2(20));
>
>Table created.
>
>NTW57 SQL> connect system/manager
>Connected.
>NTW57 SQL> grant grant any privilege to test2;
>
>Grant succeeded.
>
>NTW57 SQL> connect test2/test2
>Connected.
>NTW57 SQL> grant select on test1.test_table to public;
>grant select on test1.test_table to public
> *
>ERROR at line 1:
>ORA-00942: table or view does not exist
>
>
>NTW57 SQL> connect test1/test1
>Connected.
>NTW57 SQL> grant select on test_table to test2;
>
>Grant succeeded.
>
>NTW57 SQL> connect test2/test2
>Connected.
>NTW57 SQL> grant select on test1.test_table to public;
>grant select on test1.test_table to public
> *
>ERROR at line 1:
>ORA-01031: insufficient privileges
>
>
>NTW57 SQL>
>
>
>HTH,
>Brian
>
>
>--
>========================================
>Brian Peasland
>Raytheons Systems at
> USGS EROS Data Center
>These opinions are my own and do not
>necessarily reflect the opinions of my
>company!
>========================================
Received on Fri Sep 08 2000 - 12:12:40 CDT