Tuesday, May 19, 2009

Object id argument passed to DBMS_UTILITY.INVALIDATE is not legal

When executing the DBMS_UTILITY.COMPILE_SCHEMA procedure, the following errors are given:

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

To check whether SYS has the required privileges, run the following query connected as SYS:

SQL> select username, privilege from user_sys_privs order by privilege;

If SYS does not have the following privileges, then grant them to SYS directly:

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;

Did this post help you in any way can you please leave a comment? This will motivate me writing more posts.

11 comments:

  1. That was very useful.. thank you very much

    ReplyDelete
  2. Thanks. It gave us idea to work on another issue we were facing.

    ReplyDelete
  3. Thanks a lot, couldn't work out why this wasn't working. When I read this I tried it as my DBA user (not logged in as SYSDBA) and worked first time.

    ReplyDelete
  4. that was very helpful, thanks a lot!

    ReplyDelete
  5. Thank you, thank you, thank you. I never thought I'd be able to get dbms_utility.invalidate (which is called by dbms_utility.compile_schema) to run. This did the trick!

    ReplyDelete
  6. VERY helpful...Thanks!

    ReplyDelete
  7. it works for me. thanks a million :)

    ReplyDelete
  8. Exceeds My Aims, You're pertinent. Much Respect to you.

    ReplyDelete
  9. Hey, thanks, this post offered a simple solution to an unusually cryptic problem. saved me a lot of thrashing around...
    garth engdahl

    ReplyDelete

comment