开发者

ORACLE Permissions on tables

开发者 https://www.devze.com 2023-03-05 23:43 出处:网络
I have a table orders in OE schema. I don\'t have access to this table either from scott or hr schemas . But when I try to select from oe.orders from these 2 schemas I get different messages as below.

I have a table orders in OE schema. I don't have access to this table either from scott or hr schemas . But when I try to select from oe.orders from these 2 schemas I get different messages as below.Why is this so?

SQL> connect scott/test
Connected.
SQL> select count(*) from oe.orders;
select count(*) from oe.orders
                        *
ERROR at line 1:
ORA-01031: insufficient privileges


SQL> connect hr/test
Connected.
SQL> select count(*) from oe.orders;
select count(*) from oe.orders
             开发者_开发百科           *
ERROR at line 1:
ORA-00942: table or view does not exist


SCOTT may have INSERT, UPDATE, and/or DELETE privileges on the table oe.orders, but not SELECT, while HR clearly has no privileges granted at all on oe.orders. SCOTT could also have INSERT ANY TABLE, DELETE ANY TABLE, and/or UPDATE ANY TABLE as well.

Be sure to look in dba_sys_privs for granted system privileges that might confer the ability to know an object such as a table exists, without granting the right to select from it. For example, CREATE ANY INDEX or ANALYZE ANY privileges result in the insufficient privileges message for a table I don't have DML rights on. Compare the privileges granted to SCOTT with those granted to HR.

0

精彩评论

暂无评论...
验证码 换一张
取 消