I just suddenly started getting this error when trying to query the table AVC.
ORA-04045: errors during recompilation/revalidation of PUBLIC.AVC
ORA-04098: trigger 'TTMS.ALTERED_TTMSDB_TABS_TRIGGER' is invalid and failed re-validation
select * from avc doesnt work
but select * from exfc.avc does work.
Can anyone tell me what is going on?
Presumably there is not an object in your schema named AVC. When you reference AVC without a schema qualifier, it is therefore accessing the PUBLIC object with that name. To find out what kind of object that is, SELECT object_type FROM all_objects WHERE object_name='AVC' AND owner='PUBLIC'.
Whatever it is, querying it is for some reason causing a trigger to fire. Maybe this is some sort of auditing function. But currently the trigger is invalid. This could mean that someone modified the trigger itself but made an error; or it could mean that someone dropped or modified some other object that the trigger depends on, in such a way that the trigger code is no longer valid.
So, whoever's responsible for that trigger needs to find out what error is occurring in its compilation and resolve it.
When you explicitly query EXFC.AVC, you are bypassing the PUBLIC object and going directly to some underlying object, probably an actual table. It seems very odd that you would have access to this, since the whole point of routing access through a public synonym is usually to prevent direct access to the object. And if, in fact, the purpose of the trigger is to audit accesses to the table, then allowing you to bypass it entirely is a pretty big design flaw.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With