我正在研究适用于Oracle的应用程序。对于某种逻辑,我需要使用指定模式从给定数据库用户获取表的列表。就我而言,我有一个已经授予给定模式访问权限的用户。所以,当我的代码使用给定的凭据创建连接并尝试从下面的查询中获取表时,它的返回表列表。需要授予哪个权限才能访问sys.dba_systems
SELECT * FROM dba_objects where owner ='schema' and object_type = 'TABLE'
上面的查询与用户有授予的所有权限 ,但是当我做了有限许可的尝试,它抛出错误味精工作。
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
对于二级用户,从我们的代码是创建连接已经通过下面的查询
create user johnsmith identified by Passw0rd;;
grant connect to johnsmith ;
grant select any table to johnsmith ;
grant UPDATE any table to johnsmith ;
grant DELETE any table to johnsmith ;
grant INSERT any table to johnsmith ;
我应该授予用户权限哪家有以下系统表的访问权限授予.. 。?
- DBA_OBJECTS
- USER_CONSTRAINTS
- USER_CONS_COLUMNS
- USER_TABLES
- all_tab_cols 并且还允许访问dbms_metadata.get_dependent_ddl()方法