PL/SQL Section 14 Quiz

1. Which of the following statements will show whether procedure myproc is valid or invalid?

(1) Point

2. A single procedure can be both a referenced object and a dependent object. True or False?

(1) Point

3. A single PL/SQL subprogram such as a procedure can be both a referenced object and a dependent object. True or False?

(1) Point

4. View dept_view is based on a select from table departments. Procedure show_dept contains code which selects from dept_view. Which of the following statements are true? (Choose three.)

(1) Point

5. Package EMPPACK contains a public procedure GET_EMP, which contains a reference to the EMPLOYEES table. Procedure CALL_EMP invokes EMPPACK.GET_EMP. The following SQL statement is executed:

ALTER TABLE employees ADD (gender CHAR(1));

Which one of the following statements is true?


(1) Point
6. Which of the following database objects are created when the utldtree.sql script is run? (Choose three.)

(1) Point

7. Which of the following techniques will make it more likely that an invalidated PL/SQL subprogram will recompile successfully? (Choose two.)

(1) Point

8. Package emp_pack contains two public procedures: get_emps and upd_emps. A separate procedure emp_proc invokes emp.pack.get_emps. The upd_emps package body code is now altered, and the package body (but not the package specification) is recreated.

emp_proc will be marked invalid and needs to be recompiled. True or False?


(1) Point

9. Which data dictionary view shows information about references and dependencies?

(1) Point

10. Examine the following code:

CREATE FUNCTION deptfunc
RETURN NUMBER IS
    v_count NUMBER(6);
BEGIN
    SELECT COUNT(*) INTO v_count FROM departments;
    RETURN v_count;
END;

Which of the following will display the dependency between DEPTFUNC and DEPARTMENTS?


(1) Point
Incorrect. Refer to Section 14 Lesson 1.
11. In this scenario, the following status is given for each procedure:

- Procedure A is local and has a time stamp of 10 AM
- Procedure B is remote and has a local time stamp of 5 AM and has a remote time stamp of 4 AM

In Timestamp Mode, Procedure A will execute successfully at 11 AM. True or False?


(1) Point

12. In this scenario, the following status is given for each procedure:

- Procedure A is local and has a time stamp of 10 AM
- Procedure B is remote and has a local and remote time stamp of 10:30 AM

In Timestamp Mode, Procedure A, which is dependent on Procedure B, will execute successfully at 11 AM. True or False?


(1) Point

13. With remote dependencies, which of the following is True?

(1) Point

14. In this scenario, the following status is given for each procedure:

- Procedure A is local, executed, and invalidated because the remote Procedure B time stamp does not match the local time stamp for Procedure B
- Procedure A is recompiled.

In Timestamp Mode, now Procedure A will execute successfully. True or False?


(1) Point

15. A change in a remote referenced subprogram is automatically recorded as invalid if its base object changes and that new status is relayed to the dependent object's status and automatically marked as invalid. True or False?

(1) Point
Incorrect. Refer to Section 14 Lesson 2. 
1. A procedure includes the following code:

CURSOR loc_curs IS SELECT location_id, city, country_id FROM locations;

Which of the following changes to the LOCATIONS table will allow the procedure to be recompiled successfully without editing its code? (Choose two.)


(1) Point

2. Which of the following is NOT created when the utldtree.sql script is run?

(1) Point

3. A SELECT from the DEPTREE table displays table LOCATIONS at nested level 0 and procedure LOCPROC at nested level 2. This shows that LOCPROC is directly dependent on LOCATIONS. True or False?

(1) Point

4. Which of the following will display dependency information which has been generated by executing the DEPTREE_FILL procedure? (Choose two.)

(1) Point

5. Which of the following will display only the number of invalid package bodies in your schema?

(1) Point
1. Examine the following code:

CREATE VIEW ed_view AS
    SELECT * FROM employees NATURAL JOIN departments;
CREATE PROCEDURE ed_proc IS
   CURSOR ed_curs IS SELECT * FROM ed_view;

Which of the following statements about dependencies are true? (Choose two.)


(1) Point

2. Procedure get_depts has been marked invalid because one of the objects it references has been altered. Which of the following statements are true? (Choose two.)

(1) Point

3. A procedure includes the following code:

SELECT first_name, salary INTO v_first_name, v_salary
FROM employees WHERE employee_id = 100;

Which of the following changes to the employees table will allow the procedure to be recompiled successfully ? (Choose two.)


(1) Point

4. Examine the following code:

CREATE FUNCTION deptfunc
RETURN NUMBER IS
    v_count NUMBER(6);
BEGIN
    SELECT COUNT(*) INTO v_count FROM departments;
    RETURN v_count;
END;

Which of the following will display the dependency between DEPTFUNC and DEPARTMENTS?


(1) Point

5. A SELECT from the DEPTREE table displays table LOCATIONS at nested level 0 and procedure LOCPROC at nested level 2. This shows that LOCPROC is directly dependent on LOCATIONS. True or False?

(1) Point
6. When a table is dropped, all PL/SQL subprograms that reference the table are automatically dropped. True or False?

(1) Point

7. Which of the following will display dependency information which has been generated by executing the DEPTREE_FILL procedure? (Choose two.)

(1) Point

8. PL/SQL procedure A invokes procedure B, which in turn invokes procedure C, which references table T. If table T is dropped, which of the following statements is true?

(1) Point

9. A single PL/SQL subprogram such as a procedure can be both a referenced object and a dependent object. True or False?

(1) Point

10. The IDEPTREE view shows dependencies by indenting the lines of output instead of by using a NESTED_LEVEL column. True or False?

(1) Point

Komentar

Postingan populer dari blog ini

PL/SQL Section 13 Quiz

PL/SQL Section 5 Quiz