Connecting Tech Pros Worldwide Forums | Help | Site Map

Finding dependencies in stored procedures

Praveen_db2
Guest
 
Posts: n/a
#1: Jul 24 '06
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



Serge Rielau
Guest
 
Posts: n/a
#2: Jul 24 '06

re: Finding dependencies in stored procedures


Praveen_db2 wrote:
Quote:
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/
jefftyzzer
Guest
 
Posts: n/a
#3: Jul 24 '06

re: Finding dependencies in stored procedures


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:
Quote:
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
Closed Thread