I'm deleting a table (table a), and I want to know which of the functions, procedures and views are using my table (table a).
How to find out which procedures and functions are using a table?
230 views Asked by Robbin Rod At
3
There are 3 answers
0
On
You can check in DBA_DEPENDENCIES
table using below query:
select * from DBA_DEPENDENCIES where REFERENCED_NAME ='tableA' --YOUR TABLE NAME;
QUICK CHECK:
create table TEST (id number(5), name varchar2(50) );
--Table created
insert into TEST values(1,'mahi');
--1 row created.
commit;
--Commit complete.
create or replace procedure PROC_TEST As
v_name varchar2(50);
BEGIN
select name into v_name from TEST where id=1;
dbms_output.put_line('o/p : ' || ' ' || v_name);
END;
/
--Procedure created.
Exec PROC_TEST();
--o/p : mahi
--PL/SQL procedure successfully completed.
QUERY:
select * from DBA_DEPENDENCIES where REFERENCED_NAME = 'TEST';
try this