How to Compile Invalid Public Synonyms

October 28, 2020
()

Steps to compile invalid public synonyms

In my environment after doing an application upgrade some of the public synonyms get invalid.

Below is the query to check invalid public synonyms or if you want to check the invalid objects in the database. Click here for sample output.

select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where status='INVALID' and object_type='SYNONYM';
prompt$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$


Invalid object in database

select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where status='INVALID';
prompt$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$

Below is SQL command to compile invalid public synonym.
alter public synonym AVAILABILITY compile;
prompt$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$

We always encourage the technical person to visit section SCRIPTS to get more daily usage SQL commands.

Hope so you like this script!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.

Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

<strong>Hello and welcome to DBsGuru,</strong>DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!<strong>Share Learn Grow!</strong>

Leave a Reply

Your email address will not be published. Required fields are marked *