You are on page 1of 9

1.

Which command changes the dependency mode to SIGNATURE in the current se


ssion? (1) Points

ALTER SESSION MAKE REMOTE_DEPENDENCIES_MODE = SIGNATURE

ALTER SYSTEM MAKE REMOTE_DEPENDENCIES_MODE = SIGNATURE

ALTER SESSION SET REMOTE_DEPENDENCIES_MODE = SIGNATURE (*)

ALTER SYSTEM SET REMOTE_DEPENDENCIES_MODE = SIGNATURE

Incorrect Incorrect. Refer to Section 14 Lesson 2.

2. 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) Points

True (*)

False

Correct Correct

3. If two related objects are in different databases, the d


ependency between them is automatically recorded on the dependent object's data
dictionary. True or False? (1) Points

True

False (*)

Correct Correct

4. When a subprogram is compiled/recompiled, a time stamp i


s automatically recorded in the local data dictionary. Switching the dependency
mode to SIGNATURE means that only the signature value is recorded. True or False
? (1) Points
True

False (*)

Correct Correct

5. Procedure B has its local variable emp_number changed to


emp_name. The data type of emp_id is changed from number to integer. It is comp
iled successfully. In Signature Mode, Procedure A, which is dependent on remote
Procedure B, will compile and execute successfully. True or False? (1) Poin
ts

True (*)

False

Incorrect Incorrect. Refer to Section 14 Lesson 2.

6. A SELECT from the DEPTREE table displays table LOCATIONS


at nested level 0 and procedure LOCPROC at nested level 2. This shows that LOCP
ROC is directly dependent on LOCATIONS. True or False? (1) Points

True

False (*)

Correct Correct

7. Which of the following techniques will make it more like


ly that an invalidated PL/SQL subprogram will recompile successfully? (Choose tw
o.) (1) Points
(Choose all correct answers)

Declaring record structures using %ROWTYPE (*)

Using a cursor FOR loop instead of opening and closing the cursor explic
itly

SELECTing a list of column-names instead of using SELECT *


Including a column list with INSERT statements (*)

Incorrect Incorrect. Refer to Section 14 Lesson 1.

8. 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 t
o be recompiled successfully without editing its code? (Choose two.)
(1) Points
(Choose all correct answers)

RENAME locations TO new_locations;

ALTER TABLE locations ADD (climate VARCHAR2(30)); (*)

ALTER TABLE locations DROP COLUMN city;

ALTER TABLE locations DROP COLUMN postal_code; (*)

Incorrect Incorrect. Refer to Section 14 Lesson 1.

9. Which of the following will display dependency informati


on which has been generated by executing the DEPTREE_FILL procedure? (Choose two
.) (1) Points
(Choose all correct answers)

The USER_DEPENDENCIES view

The DEPTREE view (*)

The UTLDTREE script

The DISPLAY_DEPTREE view

The IDEPTREE view (*)

Incorrect Incorrect. Refer to Section 14 Lesson 1.


10. Function FETCH_EMP references the EMPLOYEES table. The t
able is modified by:
ALTER TABLE employees ADD (resume CLOB);
When will the ORACLE server try to recompile FETCH_EMP automatically?
(1) Points

When the command ALTER FUNCTION fetch_emp COMPILE; is executed

The next time a user session invokes FETCH_EMP (*)

When the RESUME column is dropped from the EMPLOYEES table

When FETCH_EMP is dropped and recreated

Correct Correct

11. 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 DEPARTME
NTS?
(1) Points

SELECT name, type


FROM user_dependencies
WHERE name IN ('DEPTFUNC','DEPARTMENTS');

SELECT name, type, referenced_name, referenced_type


FROM user_dependencies
WHERE referenced_name = 'DEPARTMENTS'
AND referenced_type = 'TABLE';
(*)

SELECT name, type, referenced_name, referenced_type


FROM user_dependencies
WHERE name = 'DEPARTMENTS'
AND type = 'TABLE';
SELECT object_name, object_type
FROM user_objects
WHERE object_name IN ('DEPARTMENTS','DEPTFUNC')
AND referenced = 'YES';

Incorrect Incorrect. Refer to Section 14 Lesson 1.

12. Package EMPPACK contains a public procedure GET_EMP, whi


ch contains a reference to the EMPLOYEES table. Procedure CALL_EMP invokes EMPPA
CK.GET_EMP. The following SQL statement is executed:
ALTER TABLE employees ADD (gender CHAR(1));
Which one of the following statements is true?
(1) Points

The specification and body of EMPPACK are invalidated, but CALL_EMP rema
ins valid.

The body of EMPPACK is invalidated, but the specification remains valid.


(*)

EMPPACK.GET_EMP is invalidated, but other procedures in EMPPACK remain v


alid.

Nothing is invalidated because the PL/SQL code does not reference the GE
NDER column.

Incorrect Incorrect. Refer to Section 14 Lesson 1.

13. When a table is dropped, all PL/SQL subprograms that ref


erence the table are automatically dropped. True or False? (1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 14 Lesson 1.

Section 15
14. In order to use the deterministic functions in Oracle ve
rsion 11, you can use the following sample code to test for the Oracle version b
efore compiling that section. True or False?
CREATE OR REPLACE FUNCTION myfunc
RETURN NUMBER
$IF DBMS_DB_VERSION.VERSION >= 11 $THEN
DETERMINISTIC
$END
IS BEGIN
-- body of function
END myfunc;
(1) Points

True (*)

False

Correct Correct

15. How would you determine the current Oracle database vers
ion? (1) Points

DBMS_DB_VERSION.RELEASE

DBMS_DB_VERSION.VERSION (*)

DBMS_DB_VERSION.VER_LE_10

DBMS_DB_VERSION.VER_LE_11

Incorrect Incorrect. Refer to Section 15 Lesson 3.

16. In the following example, what statement belongs in Line


A?
ALTER SESSION SET PLSQL_CCFLAGS = 'debug:true';
CREATE OR REPLACE PROCEDURE testproc IS BEGIN
...
$IF $$debug $THEN
DBMS_OUTPUT.PUT_LINE('This code was executed');
-- Line A
...
END testproc;
ALTER SESSION SET PLSQL_CCFLAGS = 'debug:false';
(1) Points
$ENDIF

$$END;

$END (*)

$ELSIF

$END;

Incorrect Incorrect. Refer to Section 15 Lesson 3.

17. Obfuscation does not allow anyone to see the source code
, including the owner. True or False? (1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 15 Lesson 4.

18. What are the two methods for obfuscating PL/SQL subprogr
ams? (Choose two) (1) Points
(Choose all correct answers)

DBMS_DDL.CREATE_WRAPPED (*)

DBMS_DDL.WRAP

DBMS_DML.CREATE_WRAPPED

PL/SQL wrapper utility program (*)

SQL wrapper utility program

Incorrect Incorrect. Refer to Section 15 Lesson 4.

19. When wrapping subprograms, the entire PL/SQL code must b


e included as an IN argument with data type CLOB to allow for any size program.
True or False? (1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 15 Lesson 4.

20. The two statements below are equivalent. True or False?


DBMS_WARNING.SET_WARNING_SETTING_STRING
('ENABLE:SEVERE','SESSION');
and
ALTER SESSION
SET PLSQL_WARNINGS = 'ENABLE:SEVERE';
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 15 Lesson 2.

21. The informational warning level of the PL/SQL compiler identifies poor c
oding practices, for example, code that can never be executed. True or False?
(1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 15 Lesson 2.

22. In the USER_ERRORS data dictionary view, if an error is


prefixed with "Warning," the command completes but has a side effect the user ne
eds to know about. For all other errors, the command terminates abnormally. True
or False? (1) Points

True (*)
False

Incorrect Incorrect. Refer to Section 15 Lesson 2.

23. Native compilation always runs faster; therefore SQL sta


tements in PL/SQL will always run faster, also. True or False? (1) Points

True

False (*)

Correct Correct

24. Identify examples of benefits of using PLSQL_OPTIMIZE_LE


VEL. (Choose three) (1) Points
(Choose all correct answers)

Modify source code to optimize frequently-used elements at the top.

Control what PL/SQL does with useless code. (*)

Backward compatible with previous versions of the Oracle database. (*)

Separating compiled code so that separate units may be repeated as neede


d.

Copy compiled code from one subprogram into another subprogram. (*)

Incorrect Incorrect. Refer to Section 15 Lesson 1.

25. Native machine code PL/SQL will always execute faster th


an bytecode PL/SQL because it need not be interpreted at run time. True or False
? (1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 15 Lesson 1.

You might also like