Login   Search
Skip Navigation Links
Home
Application Security Tips
Oracle , PL/SQL
IT Product Reviews
Project Management
Forum
Contact Us
Links & References
Avoid SQL Injection attack
Threats and Countermeasures: S.T.R.I.D.E
Input Validation
Session Management
Authentication Mechanism
Cross Site Scripting Vulnerabilities
Configuration Management
Scroll up
Scroll down
Oracle 9i - Programming basics PL/SQL
PL/SQL - Conditional Statements – IF
PL/SQL -Nested Block
LOOPS in PL/SQL
PL/SQL Records
Cursors in PL/SQL
PL/SQL Tables
PL/SQL Exceptions
PL/SQL Procedures
PL/SQL Functions
Oracle supplied packages
Packages
PL/SQL Ref Cursors
Types in Oracle PL/SQL
Varrays
Nested Table
Bfile and LOBs
Bulk Binding
Know Depandencies
PL/SQL Wrapper
Triggers
Scroll up
Scroll down
DBMS_SQL package
DBMS_DDL Package
DBMS_JOB Package
UTL_FILE Package
DBMS_METADATA Package
DBMS_PIPE Package
DBMS_SESSION Package
Scroll up
Scroll down

 

Blog

  • Imperativeness of agile methodology in software development
  • Get list of installed softwares on machines in your network
  • VMWare - Error - the vmware authorization service is not running
  • Add chart / graphs in ASP.net application / website
  • Microsoft Ramp Up

Blog

  • Review: uCertify.com: PrepKit for: 70-529 (C#)
  • Bird eye Review: uCertify.com: PrepKit for: 70-529 (C#)
Skip Navigation Links>Oracle , PL/SQL>Know Depandencies

Dependencies

Displaying direct and Indirect dependencies
Step 1 – Run the script utldtree.sql that creates the objects that enable you to display the direct and indirect dependencies.
(This script is in ORACLE_HOME/rdbms/admin folder)

Scenario – Table is emp
EMP table has two direct dependent objects of type view and trigger.

create or replace view V_Emp
as
select * from emp
where job = 'MANAGER'
/


create or replace trigger E_Trig
after insert on emp
for each row
begin
     dbms_output.put_line('Record inserted in emp table');
end;
/

There is a procedure P_V_Emp which is based on  view V_Emp.
So there is indirect dependency of table emp with P_V_Emp procedure.
 
create or replace procedure P_V_Emp(no emp1.empno%type, name emp1.ename%type, j emp1.job%type, s emp1.sal%type DEFAULT 'MANAGER')
is
begin
Insert into V_Emp(empno,ename,job,sal)
values(no,name,j,s);
end;
/

Now there is a procedure P2 which calls P_V_Emp
create or replace procedure p2
is
begin
      P_V_Emp(123,'abc', 8000);
end;
/


To get the list of dependencies execute the procedure deptree_fill

EXECUTE deptree_fill('TABLE','SCOTT','EMP');
DEPTREE VIEW
select nested_level, type, name
from deptree
/


To display an indented representation of all the dependent objects query ideptree view.

Discussion about this article

AuthorBody
Rahul
8/29/2009 9:40 PM
Please provide feedback about this article here.
To participate in this discussion Sign up for free membership of 24x7code.
To Signup click on Login , Use create user link & the follow the instructions.
Thank you



Designed & Developed by Rahul Bagal