Jerry N
asked on
Useage of GV$
I have PLSQL CODE that I inhertied and am trying to understand. In the Package Spec, there is a cursor defined and a gv$ var:
CURSOR GV$IND IS
SELECT index_name FROM USER_INDEXES
where index_type = 'NORMAL';
gv$nt_type abp1.nt_type%type;
If my understanding is correct, the GV$IND collects the indexes and is global in scope
The gv$nt_type is global in scope and is of the same type as abp1.nt_type.
In looking through the package body, I can not find any reference to GV$IND.
I find one reference in a line that sets gv$_nt_type:= '11' but is not present in the rest of the package body.
I'm tempted to delete the cursor and the gv$nt_type from the code since it doesnt seem to be used anywhere. I've looked in all the objects for that schema and cant see any references to these at all.
Is there something going on behind the scenes potentially, or do I have to look anywhere else?
CURSOR GV$IND IS
SELECT index_name FROM USER_INDEXES
where index_type = 'NORMAL';
gv$nt_type abp1.nt_type%type;
If my understanding is correct, the GV$IND collects the indexes and is global in scope
The gv$nt_type is global in scope and is of the same type as abp1.nt_type.
In looking through the package body, I can not find any reference to GV$IND.
I find one reference in a line that sets gv$_nt_type:= '11' but is not present in the rest of the package body.
I'm tempted to delete the cursor and the gv$nt_type from the code since it doesnt seem to be used anywhere. I've looked in all the objects for that schema and cant see any references to these at all.
Is there something going on behind the scenes potentially, or do I have to look anywhere else?
ASKER
Potentially dumb question -
where do I find dba_dependencies?
I use TOAD and did a global search in all objects and cant find it anywhere.
Is there any magic to this or just a global naming convention that would have to be referenced exactly?
For example, I shouldnt have to look for nt_type VS. gv$nt_type, should I?
where do I find dba_dependencies?
I use TOAD and did a global search in all objects and cant find it anywhere.
Is there any magic to this or just a global naming convention that would have to be referenced exactly?
For example, I shouldnt have to look for nt_type VS. gv$nt_type, should I?
you might not have access to it, it's owned by SYS
try all_dependencies. - but, if you do that, you could miss some that you don't have access to
try all_dependencies. - but, if you do that, you could miss some that you don't have access to
>>> I shouldnt have to look for nt_type VS. gv$nt_type, should I?
dependencies will simply show you if there is ANY dependency between two objects, not necessarily on those declarations.
you might want to search dba_source/all_source
where lower(text) like '%nt_type%') or lower(text) like '%gv$nt_type%'
dependencies will simply show you if there is ANY dependency between two objects, not necessarily on those declarations.
you might want to search dba_source/all_source
where lower(text) like '%nt_type%') or lower(text) like '%gv$nt_type%'
actually, if you're using Toad, you can go to the schema browser and check the dependency tab on the right after selecting your package.
but that's just querying all/dba_dependencies, so it has the same restrictions
but that's just querying all/dba_dependencies, so it has the same restrictions
ASKER
Although the package uses other packages and tables, the specific gv$nt_type is not found anywhere.
So, I'm not loosing my mind, there's no magic to the gv$xxxxxx, right?
So, I'm not loosing my mind, there's no magic to the gv$xxxxxx, right?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the help (once again)!
if you don't find any you could comment it out (rather than delete)
or use conditional compilation to exclude it