PL/SQL:ORA-00942

具有DBA权限的普通用户,创建查询系统视图的存储过程,结果报错:

Compilation errors for PROCEDURE LM.CREATE_CONSTRAINT

Error: PL/SQL: ORA-00942: 表或视图不存在
Line: 17
Text: from dba_constraints dc, dba_cons_columns dcc

Error: PL/SQL: SQL Statement ignored
Line: 11
Text: select dc.owner,

DBA权限啊!!!

然后果断登录sys用户:

GRANT SELECT ANY DICTIONARY TO DXMY;

然后存储过程就compiled successfully了。

你可能感兴趣的:(PLSQLORA-00942)