Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have had invalid public synonyms in my database. Some of them references to ordinary schema objects and others to sys schema objects.

I compiled all these public synonyms by the following command:

alter public synonym mysynonym_name compile;

My supervisor suddenly told me that I should not have compiled SYS schema synonyms. I tried to invalidate them by the following way:

exec dbms_utility.invalidate(444849);

Where 444849 is the synonym object ID. But got the following error:

ORA-24237: object id argument passed to DBMS_UTILITY.INVALIDATE is not legal
ORA-06512: at "SYS.DBMS_UTILITY", line 1053
ORA-06512: at line 2

Why?

Can compilation of these synonyms cause some problem?

Thank you a lot, I am waiting for your recommendations and answers. Please share your knowledge with us.

share|improve this question
    
Note: I have granted the following privileges to SYS schema: CREATE ANY DIMENSION, CREATE ANY EVALUATION CONTEXT CREATE ANY INDEX CREATE ANY INDEXTYPE CREATE ANY LIBRARY CREATE ANY MATERIALIZED VIEW CREATE ANY OPERATOR CREATE ANY PROCEDURE CREATE ANY RULE CREATE ANY RULE SET CREATE ANY SYNONYM CREATE ANY TRIGGER CREATE ANY TYPE CREATE ANY VIEW but did not help... –  kupa Nov 6 '11 at 0:22
    
Note2: I found that DBMS_UTILITY.INVALIDATE also invalidates any objects that (directly or indirectly) depend on the object being invalidated :((((((( I don't want it :S –  kupa Nov 6 '11 at 0:26
add comment

1 Answer

You don't have the create privileges on the object being invalidated. But generally it is a very bad idea to invalidate objects in the sys schema. This will also invalidate all objects that reference them, so you might end up with lots of invalidated objects.

share|improve this answer
    
I am sys user, and synonym is mine. Is there any possibility that I don't have create permission on it. As I said I have granted CREATE ANY SYNONYM to SYS schema... –  kupa Nov 10 '11 at 17:04
    
its not the right on the synonym its the right on the underlying object –  steve Nov 11 '11 at 6:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.