()

How to Validate Invalid Objects in Oracle

Whenever we perform such activities like database upgrade, refresh, clone, migration etc. We require to capture invalid objects before /after activities. Below are SQLs to find invalid objects.

SQL to find invalid object types which are owned by the owner.  Click here to get sample output.

SET LINES 333 PAGES 111
COL OBJECT_NAME FOR A40
COL OBJECT_TYPE FOR A30
COL OWNER FOR A25
SELECT OWNER, OBJECT_TYPE,COUNT(*) OBJECT_COUNT FROM DBA_OBJECTS WHERE STATUS <> 'VALID' 
GROUP BY OWNER,OBJECT_TYPE order by OWNER,OBJECT_TYPE;
prompt$$$$$$$**Welcome to DBsGuru!**Learn Share Grow**$$$$$$$


SQL to find all invalid objects in the database.  Click here to get sample output.

SET LINES 333 PAGES 111
COL OBJECT_NAME FOR A40
COL OBJECT_TYPE FOR A30
SELECT OWNER, OBJECT_NAME,OBJECT_TYPE FROM DBA_OBJECTS 
WHERE STATUS <> 'VALID' ORDER BY OWNER, OBJECT_NAME;
prompt$$$$$$$**Welcome to DBsGuru!**Learn Share Grow**$$$$$$$


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

Hope so you like this article
!
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?

DBsGuru

Hello and welcome to DBsGuru,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!Share Learn Grow!