I have tested it with Oracle 10.2 and the synonym becomes indeed invalid but when an other user uses the synonym by doing
select count(*) from part_test;
Oracle automatically compiles the synonym and the synonym becomes valid.
It is the same with packages, procedures and functions. When you execute them and they are invalid, Oracle will try to compile them automatically.
Answer from tuinstoel on Stack OverflowAny idea how to resolve ‘synonym name’ refers to an invalid object?
Is it me or is being called an invalid as a disabled person super offensive
Is "note" a valid synonym for "notebook"?
How do we feel about autism terms becoming more ...
I have tested it with Oracle 10.2 and the synonym becomes indeed invalid but when an other user uses the synonym by doing
select count(*) from part_test;
Oracle automatically compiles the synonym and the synonym becomes valid.
It is the same with packages, procedures and functions. When you execute them and they are invalid, Oracle will try to compile them automatically.
It doesn't in 11.1.0.6 It could have been a bug that was fixed. It may have been something that was necessary (eg for revalidating a view based on a synonym...) but where an improved technique has been used.