Synonyms can be invalid

I've tried in the beta version published on 18/04/201

Compiling an invalid synonym opened from Invalid Objects view doesn't work - I get an error message SQL command not properly ended.

For example:

ALTER PUBLIC SYNONYM ORA_ASPNET_MEM_CHANGEPWDQANDA COMPILE DEBUG

Error at line 2

ORA-00933: SQL command not properly ended

Listing Synonyms in invalid objects is not selected by default

There is no option to compile a synonym when listing in synonym view

There is no indication on Synonym view if a given synonym is valid or not.

Thanks,
Mau.

Sorry, the DEBUG shouldn’t be there. I’ll fix that. In the meantime, if you turn off debug on Toad’s main toolbar, Toad won’t try to use the DEBUG option.

Just curious though - why are you interested in the validity of a synonym? They auto-compile next time you use them, and as far as I can tell, the state isn’t really accurate anyway. For example, if I run the following script:

create table SCOTT.X as select * from dual;

create synonym SCOTT_X for SCOTT.X;

drop table SCOTT.X;

now, I have an invalid synonym, which is understandable. But if I compile it, it will become valid, which doesn’t make any sense at all, because the target object does not exist.

Hi,

After each DB upgrade script deployment we run through the list of invalid objects as listed in ALL_OBJECTS.

I understand that Oracle might report a false positive status but we want to clear all errors before handing over the database to the customer

Thanks,

Mau.

we want to clear all errors before handing over the database to the customer

Sure, that's understandable, but I don't understand how compiling synonyms clears any errors.

If the target object exists, then the synonym will work.

If the target object does not exist, then the synonym will not work.

Compiling has no effect on either situation. Am I missing something?