oracle将A用户下的所有table,packe的权限赋予给B用户
1 表权限:登录scott/tiger,然后查询select 'grant select on '||tname||' to robbie;' from tabtab表存储当前登录用户的所有表,tname是表名,查询结果: grant select on DEPT to robbie; grant select on EMP to robbie; grant select o
1 表权限:
登录scott/tiger,然后查询select 'grant select on '||tname||' to robbie;' from tab
tab表存储当前登录用户的所有表,tname是表名,查询结果:
grant select on DEPT to robbie;
grant select on EMP to robbie;
grant select on BONUS to robbie;
grant select on SALGRADE to robbie;
grant select on STOCK_RECEIVED to robbie;
然后执行这个查询结果集,就可以了,需要主意的是,scott用户必须有grant权限。
注意:grant select any table to robbie; //该语句意思是将所有表的访问权限赋予给robbie.
2 包权限
A、如果只想授予一个用户对一个包的执行权限,但不能查看包体:
grant execute on package_name to user_name;
B、如果想授予一个用户所有包的执行权限,并且能查看包体,但不能修改编译:
grant create any procedure,select any table,execute any procedure to user_name;
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)