Sie sind auf Seite 1von 1

Object Dependecies

==================
Independant Object

Dependant Object
(Referenced Object)
==================================================
TABLE
VIEW
SEQUENCE
SYNONYM
SP
UDF
PACKAGE
TRIGGER
INDEX
===========================================
TRACKING DEPENDENCY:
====================
select referenced_name, referenced_type, referenced_owner
from user_dependencies
where name='SAVE_DEPT'
AND referenced_OWNER != 'SYS';
=========================================================
Types:
a) Soft Dependency( DDL changes will not affect)
- NO CODE change IS REQUIRED, only RECOMPILATION IS REQUIRED
B) HARD Dependency ( DDL changes will affect)
- CODE CHANGE IS REQUIRED
================================================
--checking the status
SELECT OBJECT_TYPE,STATUS
FROM USER_OBJECTS
where object_name='SAVE_DEPT
/
===============================================
-- Quick way identifying the dependent objects
select distinct name
from all_source
where upper(text) like '%EMP%'
AND OWNER='SCOTT'
/

--recompile the objects (SOFT DEPENDENCY)


ALTER PROCEDURE GET_NMS COMPILE;
ALTER FUNCTION GET_NMS COMPILE;
ALTER VIEW GET_NMS COMPILE;
ALTER PACKAGE TEST_PACK COMPILE;
-> SPEC+BODY
ALTER PACKAGE TEST_PACK COMPILE BODY; -> BODY ONLY
================================================

Das könnte Ihnen auch gefallen