程序是否需要对表的单独访问权限? [英] Do procedures need separate access Rights on Tables?

查看:77
本文介绍了程序是否需要对表的单独访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以访问表,但是当我在Anonymous块中运行相同的查询时,它失败并显示

I have access on tables but when I run the same query in Anonymous block it fails with

ORA-00942:表或视图不存在

ORA-00942: table or view does not exist

推荐答案

Oracle安全模型意味着我们无法使用通过角色授予我们帐户的特权来构建数据库对象(视图,存储过程等).必须将特权显式授予我们的命名帐户.

The Oracle security model means that we cannot build database objects (views, stored procedures, etc) using privileges granted to our account through a role. The privileges have to be explicitly granted to our named account.

这也适用于匿名块.

因此,如果要构建针对其他架构中的数据库对象运行的PL/SQL,则必须要求架构所有者(或DBA)授予您所需的特权.

So, if you want to build PL/SQL which runs against database objects in other schemas you will have to ask the schema owner - or the DBA - to grant you the privileges you need.

这篇关于程序是否需要对表的单独访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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