创建只能看到过程标题的 Oracle 用户
我需要做的是创建 oracle 用户,它将只看到过程和函数头,而没有主体。
知道我如何才能实现这一目标,应该设置什么样的权限?
What I need to do is to create oracle user which will see only procedures and functions headers, without bodies.
Any idea how I can achieve that, what kind of privileges should be set?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 DBA 帐户创建视图并在此视图上授予 SELECT 权限应该可以工作:
更新:这不适用于未打包的函数和过程。我认为您无法使用常规函数/过程将标头和正文分开。
如果您使用常规函数和过程,则可以授予对
dba_arguments
的选择,这将使您能够访问所有函数/过程参数。Creating a view with a DBA account and granting SELECT on this view should work:
update: this would not work with unpackaged functions and procedures. I don't think you can separate header and body with regular functions/procedures.
If you use regular functions and procedures, you could grant select on
dba_arguments
, this would give you access to all function/procedure parameters.我不确定这是否可能。作为解决方法,您可以在用户有权访问的模式中创建“外观”过程,然后将工作委托给用户无权访问的另一个模式中的过程。但这是对数据库设计的相当侵入性的修改。
I'm not sure if this is even possible. As a workaround, you could create "facade" procedures in a schema that your user has access to, and then delegate the work to procedures in another schema, that your user has no access to. But that's a quite intrusive modification in your database design.