Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Tuesday, May 19, 2009

Warning: View created with compilation errors.

During compilation of view I got the following error:

Warning: View created with compilation errors.

Show err gives No Errors.
SQL> SQL> show err
No errors.

With the following select statement it is possible to find the error:

select text from dba_errors where name = '[OBJECT_NAME]' and owner = '[OBJECT_OWNER]';

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

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.