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.