Preview

Plsql Chap8 Sols

Powerful Essays
Open Document
Open Document
1705 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Plsql Chap8 Sols
Chapter 8

Review Questions
1. b
2. c
3. a,c
4. b
5. a,b
6. d
7. b
8. b
9. a
10. c
11. b
12. b
13. b
14. d
15. a,c

16. Dependencies on packaged program units are driven by the package specification. Any changes to the header of the packaged program units being referenced will change the status of the dependent object to INVALID. Changes to the body only will not alter the status of dependent objects.

17. BASK_CALC_SP ORDER_TOTAL_SP

18. To be aware of affected objects and the recompilation needs. A developer should test any dependent program units and recompile objects made INVALID manually to avoid this processing at runtime. In addition, remote dependencies will cause a runtime error if objects not recompiled.

19. If a local dependent object is INVALID when executed, the system will automatically recompile the object and continue processing if successful. A remote dependent object will not be flagged as INVALID when remote referenced objects are modified. Therefore, when executed for the first time after the remote object has been modified, the system will flag the dependent object as INVALID and raise an error. The INVALID status will cause the object to be recompiled upon the second execution.

20. Using the dependency tree utility provided by Oracle. -Create needed objects with the utldtree.sql script -Execute the deptree_fill procedure for the object of interest -Query the deptree or ideptree view

Advanced Review Questions
1. b
2. d
3. b
4. a
5. b

Assignment 8-1
DESC user_objects;
SELECT object_name, status, timestamp FROM user_objects WHERE object_type = 'PROCEDURE ';
DESC user_dependencies;
COLUMN name FORMAT A15
SELECT name, type FROM user_dependencies WHERE referenced_name = 'BB_BASKET ';

Assignment 8-2
CREATE OR REPLACE FUNCTION status_desc_sf (p_stage NUMBER) RETURN VARCHAR2 IS lv_stage_txt VARCHAR2(30);
BEGIN
IF p_stage = 1 THEN lv_stage_txt := 'Order Submitted '; ELSIF p_stage = 2 THEN

You May Also Find These Documents Helpful