Skip to content
Advertisement

ORA-04063: view has errors

I have 3 users (schemas) in my database.

User A holds table X

I created a view Y for user B and a view Z for user C. The views are identical:

 CREATE OR REPLACE FORCE EDITIONABLE VIEW "user_name"."view_name" ("field_1", "field_2") AS 
  SELECT field1_1
,      field2_2
FROM   User_A.X;

The first view works fine; for the second one I have the following error when trying to see data (from SQL developer):

ORA-04063: view “User_C.Z” has errors.

I tried to create it by SQL PLUS: it was created with compilation error, but the “show errors” command returns “no errors”.

Any suggestion?

Advertisement

Answer

Oracle documentation regarding error code ORA-04063 includes the following

For views, the problem could be a reference in the view’s defining query to a non-existent table

Non-existent table sometimes also means one that you don’t have access to.

In whose schema did you create the view?

What privileges did you grant on the view?

What privileges did you grant on the underlying table (i.e. table X) ?

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement