| Author |
Message |
Frank Dietrich *nix forums beginner
Joined: 19 Feb 2005
Posts: 22
|
Posted: Sun Apr 23, 2006 1:17 pm Post subject:
function/procedure dependencies
|
|
|
Hi,
can someone suggest a tool for solving the following problem.
I whish to get a overview which function/procedure call which other. Not
only that object xyz depends on this function/procedure.
Like this form:
package_A.function_B
+-- function_C
+-- procedure_D
+-- package_E.function_F
and so on
For standalone functions and procedure I can use the information from the
*_DEPENDENCIES tables. But I need this information for functions and
precedures inside of packages. So the package dependencies alone provide
not enough information.
regards
Frank |
|
| Back to top |
|
 |
frank.van.bortel@gmail.co *nix forums Guru
Joined: 11 Sep 2005
Posts: 832
|
Posted: Sun Apr 23, 2006 5:16 pm Post subject:
Re: function/procedure dependencies
|
|
|
Frank Dietrich wrote:
| Quote: |
For standalone functions and procedure I can use the information from the
*_DEPENDENCIES tables. But I need this information for functions and
precedures inside of packages. So the package dependencies alone provide
not enough information.
|
Does 'connect by' ring a bell? It should...
--
Regards,
Frank van Bortel
Top-posting is one way to shut me up... |
|
| Back to top |
|
 |
Malcolm Dew-Jones *nix forums Guru
Joined: 04 Mar 2005
Posts: 418
|
Posted: Mon Apr 24, 2006 5:22 am Post subject:
Re: function/procedure dependencies
|
|
|
Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: Frank Dietrich wrote:
: >
: > For standalone functions and procedure I can use the information from the
: > *_DEPENDENCIES tables. But I need this information for functions and
: > precedures inside of packages. So the package dependencies alone provide
: > not enough information.
: >
: Does 'connect by' ring a bell? It should...
and your point is? |
|
| Back to top |
|
 |
frank.van.bortel@gmail.co *nix forums Guru
Joined: 11 Sep 2005
Posts: 832
|
Posted: Mon Apr 24, 2006 6:26 pm Post subject:
Re: function/procedure dependencies
|
|
|
Malcolm Dew-Jones wrote:
| Quote: | Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: Frank Dietrich wrote:
:
: > For standalone functions and procedure I can use the information from the
: > *_DEPENDENCIES tables. But I need this information for functions and
: > precedures inside of packages. So the package dependencies alone provide
: > not enough information.
:
: Does 'connect by' ring a bell? It should...
and your point is?
select object_id |
from public_dependency
CONNECT BY PRIOR object_id = referenced_object_id
START WITH referenced_object_id =
(select object_id
from dba_objects
where owner = '&which_owner'
and object_name = '&object_name'
and object_type = '&object_type')
Take it from there
--
Regards,
Frank van Bortel
Top-posting is one way to shut me up... |
|
| Back to top |
|
 |
Malcolm Dew-Jones *nix forums Guru
Joined: 04 Mar 2005
Posts: 418
|
Posted: Mon Apr 24, 2006 7:23 pm Post subject:
Re: function/procedure dependencies
|
|
|
Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: Malcolm Dew-Jones wrote:
: > Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: > : Frank Dietrich wrote:
: > : >
: > : > For standalone functions and procedure I can use the information from the
: > : > *_DEPENDENCIES tables. But I need this information for functions and
: > : > precedures inside of packages. So the package dependencies alone provide
: > : > not enough information.
: > : >
: >
: > : Does 'connect by' ring a bell? It should...
: >
: > and your point is?
: >
: select object_id
: from public_dependency
: CONNECT BY PRIOR object_id = referenced_object_id
: START WITH referenced_object_id =
: (select object_id
: from dba_objects
: where owner = '&which_owner'
: and object_name = '&object_name'
: and object_type = '&object_type')
: Take it from there
On my system that doesn't appear to show the dependencies of functions and
procedures within a package, only the dependencies of the whole package to
other objects that are not in the package. |
|
| Back to top |
|
 |
Frank Dietrich *nix forums beginner
Joined: 19 Feb 2005
Posts: 22
|
Posted: Sat Apr 29, 2006 4:11 pm Post subject:
Re: function/procedure dependencies
|
|
|
Hi Frank,
Frank van Bortel wrote:
| Quote: | Malcolm Dew-Jones wrote:
Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: Frank Dietrich wrote:
: > For standalone functions and procedure I can use the information from the
: > *_DEPENDENCIES tables. But I need this information for functions and
: > precedures inside of packages. So the package dependencies alone provide
: > not enough information.
: Does 'connect by' ring a bell? It should...
|
In this context? No.
| Quote: | and your point is?
select object_id
from public_dependency
CONNECT BY PRIOR object_id = referenced_object_id
START WITH referenced_object_id =
(select object_id
from dba_objects
where owner = '&which_owner'
and object_name = '&object_name'
and object_type = '&object_type')
|
May be I not clear enough explain what I would like to get:
I need not only the information which package depends on which other. I
need the information packageA.procedureB depends on packageD.functionE.
But it seems that this information is not stored in the database. I
think I try to get this information in a way like this:
- get dependencies from dba_objects
- and then parse the package source
But I think it's not worth to invest to much time in this.
Frank |
|
| Back to top |
|
 |
Maxim Demenko *nix forums Guru
Joined: 24 Apr 2005
Posts: 428
|
Posted: Sat Apr 29, 2006 5:41 pm Post subject:
Re: function/procedure dependencies
|
|
|
Frank Dietrich schrieb:
| Quote: | Hi Frank,
Frank van Bortel wrote:
Malcolm Dew-Jones wrote:
Frank van Bortel (frank.van.bortel@gmail.com) wrote:
: Frank Dietrich wrote:
: > For standalone functions and procedure I can use the information from the
: > *_DEPENDENCIES tables. But I need this information for functions and
: > precedures inside of packages. So the package dependencies alone provide
: > not enough information.
: Does 'connect by' ring a bell? It should...
In this context? No.
and your point is?
select object_id
from public_dependency
CONNECT BY PRIOR object_id = referenced_object_id
START WITH referenced_object_id =
(select object_id
from dba_objects
where owner = '&which_owner'
and object_name = '&object_name'
and object_type = '&object_type')
May be I not clear enough explain what I would like to get:
I need not only the information which package depends on which other. I
need the information packageA.procedureB depends on packageD.functionE.
But it seems that this information is not stored in the database. I
think I try to get this information in a way like this:
- get dependencies from dba_objects
- and then parse the package source
But I think it's not worth to invest to much time in this.
Frank
|
It is still not quite clear, what you try to achieve. Packaged
procedures/functions as opposite to packages are not database objects,
so dependencies are not stored. You can have call to package B within
package A which don't belong to any function/procedure - for example in
the initialisation block, or you can reference global types too from the
package body itself.
If you goal is to estimate which lines in your packages should be
modified after you change the referenced package - you still need to
parse the source code. Every decent editor with can do it for you. (or
you code it in plsql, should be not that complex).
Best regards
Maxim |
|
| Back to top |
|
 |
Frank Dietrich *nix forums beginner
Joined: 19 Feb 2005
Posts: 22
|
Posted: Sun Apr 30, 2006 8:36 pm Post subject:
Re: function/procedure dependencies
|
|
|
Hi Maxim,
Maxim Demenko wrote:
| Quote: | Frank Dietrich schrieb:
May be I not clear enough explain what I would like to get:
I need not only the information which package depends on which other. I
need the information packageA.procedureB depends on packageD.functionE.
It is still not quite clear, what you try to achieve.
|
Ok. It was my fault. I think it was totally the wrong term and lousy
described what I want to get.
I want to get a list / table or something else in which I can see which
function/procedure call which other function/procedure.
To get this information I think the only way is to parse the source. Or do
anyone know a tool which already exists?
regards
Frank |
|
| Back to top |
|
 |
Malcolm Dew-Jones *nix forums Guru
Joined: 04 Mar 2005
Posts: 418
|
Posted: Wed May 03, 2006 9:22 pm Post subject:
Re: function/procedure dependencies
|
|
|
Frank Dietrich (ablesoft@gmx.de) wrote:
: Hi Maxim,
: Maxim Demenko wrote:
: > Frank Dietrich schrieb:
: >> May be I not clear enough explain what I would like to get:
: >>
: >> I need not only the information which package depends on which other. I
: >> need the information packageA.procedureB depends on packageD.functionE.
: > It is still not quite clear, what you try to achieve.
: Ok. It was my fault. I think it was totally the wrong term and lousy
: described what I want to get.
: I want to get a list / table or something else in which I can see which
: function/procedure call which other function/procedure.
: To get this information I think the only way is to parse the source. Or do
: anyone know a tool which already exists?
You want a tool like "cscope". Too bad that's for C. |
|
| Back to top |
|
 |
Frank Dietrich *nix forums beginner
Joined: 19 Feb 2005
Posts: 22
|
Posted: Thu May 04, 2006 9:56 pm Post subject:
Re: function/procedure dependencies
|
|
|
Hi Malcom,
Malcolm Dew-Jones wrote:
| Quote: | Frank Dietrich (ablesoft@gmx.de) wrote:
: I want to get a list / table or something else in which I can see which
: function/procedure call which other function/procedure.
: To get this information I think the only way is to parse the source. Or do
: anyone know a tool which already exists?
You want a tool like "cscope". Too bad that's for C.
|
You're right that's exactely what I'm looking for.
But I'm now, after searching in the internet, sure that there is no
such tool for packages in a Oracle database.
Frank
PS: Now I'm looking for a PL/SQL to C and vice versa converter.  |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|