468,119 Members | 2,072 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

Finding dependencies in stored procedures

Hi All
DB2 8.1.3, Windows

Is there any method to find the routines dependant on any particular
routine.
Say, I have a stored procedure PROC1 which calls 2 stored procedures and
is called by 3 stored procedures.
Is there any method to find the names or atleast packages of these stored
procedures which are called by PROC1 and are calling PROC1?
Is something there in SYSCAT.ROUTINEDEP or SYSCAT.PACKAGEDEP which can be
manipulated for this?

Regards
Praveen
Jul 24 '06 #1
2 3955
Praveen_db2 wrote:
Hi All
DB2 8.1.3, Windows

Is there any method to find the routines dependant on any particular
routine.
Say, I have a stored procedure PROC1 which calls 2 stored procedures and
is called by 3 stored procedures.
Is there any method to find the names or atleast packages of these stored
procedures which are called by PROC1 and are calling PROC1?
Is something there in SYSCAT.ROUTINEDEP or SYSCAT.PACKAGEDEP which can be
manipulated for this?
What are you missing? These two views should do the job as is.

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 24 '06 #2
This may get you a little further with respect to the SP + Package
relationship:

SELECT
R.ROUTINESCHEMA,
R.ROUTINENAME,
P.PKGNAME
FROM
SYSCAT.ROUTINES R,
SYSCAT.ROUTINEDEP RD,
SYSCAT.PACKAGES P
WHERE
R.ROUTINESCHEMA = RD.ROUTINESCHEMA
AND
R.SPECIFICNAME = RD.ROUTINENAME
AND
RD.BNAME = P.PKGNAME
ORDER BY
1,
2;

Praveen_db2 wrote:
Hi All
DB2 8.1.3, Windows

Is there any method to find the routines dependant on any particular
routine.
Say, I have a stored procedure PROC1 which calls 2 stored procedures and
is called by 3 stored procedures.
Is there any method to find the names or atleast packages of these stored
procedures which are called by PROC1 and are calling PROC1?
Is something there in SYSCAT.ROUTINEDEP or SYSCAT.PACKAGEDEP which can be
manipulated for this?

Regards
Praveen
Jul 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Steve Jorgensen | last post: by
2 posts views Thread by Kent Lewandowski | last post: by
15 posts views Thread by Twan Kennis | last post: by
5 posts views Thread by Tim Marshall | last post: by
2 posts views Thread by Jon.Hakkinen | last post: by
14 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.