|
Is there an easy query I can run to do this, or some way of finding this out in SQL Developer?
(comments are locked)
|
(comments are locked)
|
|
SQL Developer already includes a custom report for this. Click the custom reports tab, drill down to Data Dictionary Reports -> All Objects -> Invalid Objects Report.
(comments are locked)
|
|
I know you mentioned SQL Developer - great tool - but if you are using Toad, the Schema Browser has a tab/category for 'Invalid Objects'. It pulls in everything listed in the above query plus a whole lot more...below is the query. Once the objects come back, you have a button to rebuild/recompile the list of objects as you see fit. Select owner, object_name, object_type, LAST_DDL_TIME, object_id from sys.DBA_OBJECTS o where status <> 'VALID' and object_type <> 'SYNONYM' UNION ALL Select owner, object_name, object_type, LAST_DDL_TIME, object_id from sys.DBA_OBJECTS where object_type = 'INDEX' and (owner, object_name) in (SELECT owner, index_name FROM sys.DBA_INDEXES WHERE status = 'UNUSABLE' UNION ALL SELECT index_owner, index_name FROM sys.DBA_IND_PARTITIONS ip WHERE status = 'UNUSABLE' UNION ALL SELECT index_owner, index_name FROM sys.DBA_IND_SUBPARTITIONS isp WHERE status = 'UNUSABLE' )
(comments are locked)
|

