Sunday, June 2, 2019

Oracle error ORA-04023

ORA-04023: Object could not be validated or authorized
This error suddendly showed up this week at work, while a collegue of mine was working on one of our dev databases. It was raised during a view compilation.

Since the view was joining tables and/or views from a couple of different schemas I checked the related grants and they were all ok.

Not finding any clues I searched metalink, and quickly discovered the doc. id 1610514.1 whose title is, meaningfully:

"Ora-04023 Reported while Accessing Valid Objects"
It states that the cause is:
This is issue is due to a timestamp inconsistency in the data dictionary. This timestamp inconsistency will lead to the problem when we populate the relevant cached objects and later try to select from the affected views
Nothing is told about the root cause of this problem, but at least it was a known one..

To solve the doc prescribes to run (as SYS) the script

utldtchk.sql
from the admin folder. This script extract objects affected by this "timestamp inconsistency".

Recompiling all of them eventually solved the problem.

No comments: