首页 > 解决方案 > Oracle SQL : Grant View only access to a user A for accessing procedure and function definition of other user B

问题描述

My requirement is to create a user in oracle 11g database and give the following permissions to this user.

  1. Select any table (this is fixed and i can do this with Select any table privilege)
  2. View definition of all database procedures, functions, packages (unable to do this).
  3. I do not want to give execute permission on any procedure or edit permission or delete/drop permission.

Unable to find any relevant help as everywhere it mentions to grant execute or create any procedure which is risky.

标签: sqloracleproceduredefinitiongrant

解决方案


SELECT ANY DICTIONARY权限(在早期版本中为SELECT_CATALOG_ROLE角色)赋予用户从任何数据字典表中进行选择的权限。

SELECT ANY DICTIONARY权限将赋予用户编写查询DBA_SOURCE以查看任何对象(或使用DBMS_METADATA包)的源、DBA_VIEWS查看视图定义等的权限。

干杯!!


推荐阅读