作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我从模式 A 查询模式 C 中的表时,我得到 ORA-01031: 权限不足 当我从模式 B 查询同一个表时,我得到 ORA-00942: 表或 View 不存在 .在表上,这两个模式都没有任何权限。为什么在这种情况下我会收到不同的错误消息?
最佳答案
您可能会收到 ORA-01031: insufficient privileges
而不是 ORA-00942: table or view does not exist
当您在表上至少拥有一项特权,但没有必要的特权时。
创建模式
SQL> create user schemaA identified by schemaA;
User created.
SQL> create user schemaB identified by schemaB;
User created.
SQL> create user test_user identified by test_user;
User created.
SQL> grant connect to test_user;
Grant succeeded.
SQL> create table schemaA.table1(a number);
Table created.
SQL> create table schemaB.table2(a number);
Table created.
SQL> grant delete on schemaB.table2 to test_user;
Grant succeeded.
SQL> select * from schemaA.table1;
select * from schemaA.table1
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from schemaB.table2;
select * from schemaB.table2
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL>
关于oracle - 获取 ORA-01031 : insufficient privileges while querying a table instead of ORA-00942: table or view does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20988572/
我是一名优秀的程序员,十分优秀!