| Compile Invalid Objects [message #560682] |
Mon, 16 July 2012 07:10  |
 |
rishwinger
Messages: 101 Registered: November 2011
|
Senior Member |
|
|
Hi All,
I am Modifying a table structure, so dependent objects(triggers,packages etc) are getting invalid.
So i thought of compiling those invalid objects which are related with the modified table.
I used below query to get the invalid objects,
select obj.object_name,obj.object_type from user_objects obj,all_dependencies dep
where referenced_name='DEPT' and obj.object_name=dep.name and dep.owner='SCOTT' and obj.status='INVALID'
Q1)What is wrong with this query, sometimes it works sometime it doesn't.?
Q2)All_dependencies : does this view show all dependent object on a table even the Invalid one's?
Q3) Is there any alternative to find the dependent invalid objects or even dependent object on a table ?
Thanks in advance
[Updated on: Mon, 16 July 2012 07:13] Report message to a moderator
|
|
|
|
| Re: Compile Invalid Objects [message #560684 is a reply to message #560682] |
Mon, 16 July 2012 07:21   |
cookiemonster
Messages: 9152 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The obvious problem is that the query just looks for objects that directly reference the table.
If you have a procedure A that calls procedure B and procedure B references the table, any change to the table will invalidate A and B.
Your query though will only list B.
You need to either use a connect by query, or just look for everything that's invalid.
|
|
|
|
|
|
|
|
|
|