Object id argument passed to DBMS_UTILITY.INVALIDATE is not legal

执行DBMS_UTILITY.COMPILE_SCHEMA存储过程时,报如下错误:

ERROR at line 1:
ORA-20000:
ORA-06512: at "SYS.DBMS_UTILITY", line 347
ORA-24237: object id argument passed to DBMS_UTILITY.INVALIDATE is not legal
ORA-06512: at line 1


需要检查sys的用户权限
select username, privilege from user_sys_privs order by privilege;


如果SYS没有下面的权限,那么就直接授权。
grant CREATE ANY DIMENSION to sys;
grant CREATE ANY EVALUATION CONTEXT to sys;
grant CREATE ANY INDEX to sys;
grant CREATE ANY INDEXTYPE to sys;
grant CREATE ANY LIBRARY to sys;
grant CREATE ANY MATERIALIZED VIEW to sys;
grant CREATE ANY OPERATOR to sys;
grant CREATE ANY PROCEDURE to sys;
grant CREATE ANY RULE to sys;
grant CREATE ANY RULE SET to sys;
grant CREATE ANY SYNONYM to sys;
grant CREATE ANY TRIGGER to sys;
grant CREATE ANY TYPE to sys;
grant CREATE ANY VIEW to sys;

你可能感兴趣的:(ora)