Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2006

Tip: Looking for answers? Try searching our database.

DB2 AIX:  Stored Procedure Dependency Script

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ARK - 24 May 2006 15:57 GMT
Some stored procedures call other stored procedures.  When moving
stored procedures as part of a release this requires that you create
the children procedures before the calling procedures.

Is there a tool, script, or some other way to determine the dependency
list?
ARK - 24 May 2006 21:55 GMT
I hate to answer my own question as I thought it was more difficult
than this:

select R.ROUTINESCHEMA, R.ROUTINENAME AS SPECIFICNAME, X.ROUTINENAME,
rtrim(
   p.bschema) || '.' || P.bname as DEPON
 from syscat.PACKAGEDEP P, syscat.ROUTINEDEP R, syscat.routines X
 where P.bschema = 'yourschema'
   and p.btype = 'F'
   and P.PKGNAME = R.BNAME
   and P.PKGSCHEMA = R.ROUTINESCHEMA
   and R.BTYPE = 'K'
   and R.ROUTINENAME = X.specificname
   and R.ROUTINESCHEMA = X.ROUTINESCHEMA
   and X.valid = 'Y'
   and X.routinetype = 'P'
   and p.bschema||P.bname in (
     Select Z.ROUTINESCHEMA ||Z.specificname
       from syscat.routines Z
       where Z.routinetype = 'P'
       group by Z.ROUTINESCHEMA, Z.specificname )
 order by R.ROUTINESCHEMA, R.ROUTINENAME;
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.