[英]Granting access to view but not the underlying tables
Lets say I have three schemas, a
, b
and c
in an Oracle database. 可以说我在Oracle数据库中有三个架构,
a
, b
和c
。
I have a table, at
. 我有一张桌子,
at
。
I have a view, bv
, which is just view on at
(in the real case there is actually a.t1
, a.t2
etc). 我有一个视图
bv
,它只是在at
查看(在实际情况下,实际上是a.t1
, a.t2
等)。
I want to grant c
select access on bv
but not at
. 我想授予
c
选择上访问bv
但不是at
。
What are the grants I have to issue for at
and bv
? 我必须为
at
和bv
发放哪些补助?
You can achieve it by grant the SELECT PRIVILEGE
to user 'a'
WITH GRANT OPTION
您可以通过将
SELECT PRIVILEGE
授予用户'a'
WITH GRANT OPTION
Grant user b to select at: 授予用户b在以下位置进行选择:
GRANT SELECT ON a.t TO b WITH GRANT OPTION;
Grant user c to select on bv: 授予用户c在bv上选择:
GRANT SELECT ON b.v TO c;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.