Discussion:
Object Dependency
(too old to reply)
c***@cslucas.com.sg
2007-10-11 13:19:40 UTC
Permalink
I am trying to find an easy way to drop all the UDF and Store Procedures in my DB. Because of dependency, this is somewhat recursive. I can't drop an object until another object that depends on it is drop.

What is the best approach. Are there some procedures that does this drop.

JJ
Doug Doole
2007-10-15 17:00:54 UTC
Permalink
If you're just dealing with the dependencies between procedures and functions, then look at the CREATE_TIME column in SYSCAT.PROCEDURES. If you get the routine names from newest to oldest, this will handle the dependencies for you.
-----------------------------------
Doug Doole
DB2 Universal Database Development
IBM Toronto Labs
c***@cslucas.com.sg
2007-10-16 07:40:45 UTC
Permalink
Thanks.
What if its a dependency between UDFs and between Procedures. Does the same approach works?

JJ
Doug Doole
2007-10-17 20:58:23 UTC
Permalink
Sorry, look at the view SYSCAT.ROUTINES, not SYSCAT.PROCEDURES. That view includes all procedures, functions, and methods.
-----------------------------------
Doug Doole
DB2 Universal Database Development
IBM Toronto Labs

Loading...