Reason for Object invalidation [message #169645] |
Thu, 27 April 2006 22:31 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Hi,
Is there any database view to find why a particular database object is invalid i.e,whether it's due to change of DDL or changes in referenced object?
Thanks,
Gajini
|
|
|
|
Re: Reason for Object invalidation [message #169779 is a reply to message #169649] |
Fri, 28 April 2006 12:24 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
If you know when it went invalid, you can get some clues by checking last_ddl_time. Foreign dependencies across db links won't show up in the query. I think that synonyms can sometimes hide the dependency trail - not sure. Remember that truncating a table is ddl, but that it won't invalidate your code...
select owner, object_name, object_type, created, last_ddl_time
from dba_objects -- or all_objects
where last_ddl_time > sysdate - 1 -- whatever time period
order by last_ddl_time desc
You can extend the query to check in user/all/dba_dependencies.
|
|
|