如何授予特定架构的用户特权? [英] how to grant user privilege on specific schema?

查看:56
本文介绍了如何授予特定架构的用户特权?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这种情况是我有两个架构:A和B.我有一个受限用户,我需要授予特权在B架构中执行SELECT查询,仅此而已.如何授予该用户?

The situation is I have two schemas: A and B. I have a restricted user that I need to give a privilege do SELECT queries in B schema and just it. How can I grant this user?

推荐答案

您不能.

您能做的最好的事情就是为用户授予模式b中每个表的选择"特权.

The best you can do is grant user a 'select' privilege each table in schema b.

此查询将生成您需要的命令:

this query will generate the commands you'll need:

select 'grant select on A.'||table_name||' to B;' 
from dba_Tables 
where owner = 'A';

与此有关的问题是,您要向A添加新表.然后,您必须单独授予该表的特权.它不会自动执行..

The problem with this, is in the case you will want to add new table to A. then you'll have to grant the privilege on it separately. it will not do it automatically..

这篇关于如何授予特定架构的用户特权?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆