Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
procedures
variables
PL/SQL types
Exceptions
Correct
2. Which of the following are good reasons to group a set of procedures and functions
into a package? Mark for Review
(1) Points
Application developers do not need to know the details of the package body
code.
Related subprograms and variables can be grouped together for easier
management and maintenance.
If the detailed code is changed, applications which invoke the package do not
need to be recompiled.
All of the above. (*)
Correct
Body (*)
Specification
Correct
4. The two parts of a package are stored as separate objects in the database. True or
False? Mark for Review
(1) Points
True (*)
False
Correct
Body
Specification
Correct
True
False (*)
Correct
Which of the following are correct syntax for invoking the package subprograms?
(Choose two.)
BEGIN
dept_pack.ins_dept(20);
END;
(*)
BEGIN
dept_pack.get_dept(20);
END;
DECLARE
v_deptname VARCHAR2(20);
BEGIN
v_deptname := get_dept(50);
END;
Correct
8. Package EMP_PACK contains two procedures, DEL_EMP and SHOW_EMP. You want
to write an anonymous block which invokes these procedures but you have Mark for Review
forgotten which parameters they use. Which of the following will give you this (1) Points
information?
DESCRIBE del_emp
DESCRIBE show_emp
DESCRIBE emp_pack
(*)
DESCRIBE emp_pack.del_emp
DESCRIBE emp_pack.show_emp
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
Correct
False (*)
Correct
The package body of mypack also includes a function called func1. Which of the
following statements are true? (Choose three.)
(*)
The package will not compile because you cannot declare variables in the
specification, only procedures and functions. .
BEGIN
mypack.percent_tax := 10;
END;
(*)
The function can be invoked from outside the package.
BEGIN
mypack.proc1;
END;
(*)
Correct
4. We want to remove both the specification and the body of package CO_PACK from
the database. Which of the following commands will do this? Mark for Review
(1) Points
Correct
5. Which one of the following queries would you use to see the detailed code of a
package called EMP_PKG? Mark for Review
(1) Points
Correct
The names of all package specifications and package bodies in the user's
schema (*)
The parameters which must be used when invoking all packaged
subprograms in the user's schema
The detailed code of all packages in the user's schema
Correct
7. When one component of a package is called, all the package's components are
loaded into memory. True or False? Mark for Review
(1) Points
True (*)
False
Correct
True
False (*)
Correct
9. Your schema contains a package called EMP_PKG. You want to remove the
package body but not the specification. The correct syntax to do this is: DROP Mark for Review
BODY emp_pkg; True or False? (1) Points
True
False (*)
Correct
10. SCOTT's schema contains a package EMP_PKG which contains a public procedure
EMP_SAL which accepts a NUMBER parameter. Which of the following will invoke Mark for Review
the procedure successfully? (0) Points
emp_pkg.emp_sal(101);
scott.emp_pkg.emp_sal(101): (*)
emp_sal(101);
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. Which two of these functions could not be in the same package? 1. FUNCTION
get_emp (p1 DATE) RETURN VARCHAR2; 2. FUNCTION get_emp (p1 DATE, p2 Mark for Review
NUMBER) RETURN VARCHAR2; 3. FUNCTION get_emp (p1 DATE, p2 NUMBER) (1) Points
RETURN NUMBER; 4. FUNCTION get_emp (p1 NUMBER, p2 DATE) RETURN
VARCHAR2;
1 and 2
1 and 4
2 and 4
2 and 3 (*)
3 and 4
Correct
over_pack.do_work1('Smith',20);
over_pack.do_work2('Smith',20); (*)
over_pack.do_work1(p1=>'Smith',p2=>20); (*)
over_pack.do_work1(param1=>'Smith');
Correct
True (*)
False
Correct
True
False (*)
Correct
5. Which one of the following is NOT a restriction on a package function called from a
SQL statement? Mark for Review
(1) Points
Correct
6. The package name must be included when calling a package function from a
SELECT statement executed outside the package. True or False? Mark for Review
(1) Points
True (*)
False
Correct
7. Package FORWARD_PACK contains two procedures: PROC1 is public while PROC2
is private (not declared in the package specification). These procedures have no Mark for Review
parameters. Which of the following package bodies will NOT compile successfully? (1) Points
(Choose two.)
(*)
CREATE OR REPLACE PACKAGE BODY forward_pack IS
PROCEDURE proc2 IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Any message');
END;
PROCEDURE proc1 IS
BEGIN
proc2;
END;
END forward_pack;
(*)
CREATE OR REPLACE PACKAGE BODY forward_pack IS
PROCEDURE proc2;
PROCEDURE proc1 IS
BEGIN
proc2;
END;
PROCEDURE proc2 IS
BEGIN
proc1;
END;
END forward_pack;
Correct
Correct
Procedures only
Functions only
Correct
True (*)
False
Correct
11. How would you invoke the constant km_to_mile from the global_consts bodiless
package at VARIABLE A? Mark for Review
(1) Points
SELECT trail_name, distance_in_km * VARIABLE A
FROM trails
WHERE park_name = 'YOSEMITE';
km_to_mile.global_consts
km_to_mile (global_consts)
global_consts.km_to_mile (*)
global_consts (km_to_mile)
Correct
12. When using a package function in DML statements, which rules must you follow?
(Choose three) Mark for Review
(1) Points
Can read or modify the table being changed by that DML statement
13. The following example package specification is valid to create a data type ed_type
that can be used in other subprograms. True or False? Mark for Review
(1) Points
CREATE OR REPLACE PACKAGE emp_dept_pkg
IS
TYPE ed_type IS RECORD (f_name employees.first_name%TYPE,
l_name employees.last_name%TYPE,
d_name departments.department_name%TYPE);
PROCEDURE sel_emp_dept
(p_emp_id IN employees.employee_id%TYPE,
p_emp_dept_rec OUT ed_type);
END emp_dept_pkg;
True (*)
False
Correct
14. INDEX BY is missing from the empt_tab TYPE declaration. What is the most
efficient declaration? Mark for Review
(1) Points
CREATE OR REPLACE PACKAGE emp_pkg IS
TYPE emp_tab IS TABLE OF employees%ROWTYPE;
PROCEDURE get_employees(p_emp_table OUT emp_tab);
END emp_pkg;
INDEX BY INTEGER
INDEX BY BINARY
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. A package's state is initialized when the package is first loaded. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
2. Users A and B call the same procedure in a package to initialize a global variable
my_pkg.g_var. What will be the value of my_pkg.g_var for User A at Point A? Mark for Review
(1) Points
User A: my_pkg.g_var is 10
User B: my_pkg.g_var is 10
User A: my_pkg.g_var is 50
User B: my_pkg.g_var is 25
Point A
10
50 (*)
25
Correct
3. A cursor's state is defined only by whether it is open or closed and, if open, how
many rows it holds. True or False? Mark for Review
(1) Points
True
False (*)
Correct
curs_pkg.emp_curs%ISOPEN;
curs_pkg.close_curs;
curs_pkg.open_curs; (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. The DBMS_OUTPUT package is useful for which of the following activities? (Choose
two) Mark for Review
(1) Points
Display results to the developer during testing for debugging purposes (*)
Correct
True (*)
False
Correct
3. Which DBMS_OUTPUT package subprogram places text into the buffer at Line 1?
(Choose one) IF v_bool1 AND NOT v_bool2 AND v_number < 25 THEN --Line 1 Mark for Review
ELSE ... END IF; DBMS_OUTPUT.NEW_LINE; (1) Points
Correct
4. The UTL_FILE package can be used to read and write binary files such as JPEGs as
well as text files. True or False? Mark for Review
(1) Points
True
False (*)
Correct
5. Using the FOPEN function, you can do which actions with the UTL_FILE package?
(Choose 2) Mark for Review
(1) Points
It is used to read and write text files stored outside the database. (*)
It is used to find out how much free space is left on an operating system disk.
Correct
6. The UTL_FILE package contains several exceptions exclusively used in this package.
Which are they? (Choose 3) Mark for Review
(1) Points
INVALID_PATH (*)
NO_DATA_FOUND
WRITE_ERROR (*)
INVALID_OPERATION (*)
ZERO_DIVIDE
Correct
TOO_MANY_ROWS
VALUE_ERROR (*)
ZERO_DIVIDE
NO_DATA_FOUND (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
Oracle queries the Data Dictionary to make sure that the tables referenced in
the SQL statement exist. (*)
Correct
2. When SQL statements are included within a procedure, the statements are parsed
when the procedure is compiled. True or False? Mark for Review
(1) Points
True (*)
False
Correct
3. A programmer wants to code a procedure which will create a table with a single
column. The datatype of the column will be chosen by the user who invokes the Mark for Review
procedure. The programmer writes the following code: (1) Points
Because the invoking user may not have CREATE TABLE privilege
Because when the procedure is compiled, Oracle cannot check if the parameter
value passed into the procedure is a valid column datatype (*)
Because table NEWTAB may already exist
Correct
4. For which of the following is it necessary to use Dynamic SQL? (Choose three.)
Mark for Review
(1) Points
ALTER (*)
GRANT (*)
SAVEPOINT
UPDATE
DROP (*)
Correct
5. Examine the following procedure, which drops a table whose name is passed as an
IN parameter: Mark for Review
(1) Points
CREATE OR REPLACE PROCEDURE drop_tab
(p_table_name IN VARCHAR2) IS
v_sql_statement VARCHAR2(100);
BEGIN
...
END;
Which of the following will work correctly when coded in the procedure's executable
section? (Choose two.)
(*)
v_sql_statement := 'DROP TABLE ' || p_table_name;
EXECUTE IMMEDIATE v_sql_statement;
(*)
v_sql_statement := 'DROP TABLE ' || p_table_name;
EXECUTE IMMEDIATE 'v_sql_statement';
Correct
The first three functions in the user's schema will be recompiled. (*)
The procedure will not compile successfully because you cannot ALTER
functions using Dynamic SQL.
The procedure will not compile successfully because the syntax of the ALTER
FUNCTION statement is incorrect.
Correct
7. The DBMS_SQL package is easier to use than EXECUTE IMMEDIATE. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
8. Only one call to DBMS_SQL is needed in order to drop a table. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
Creates a SQL statement with varying column data, or different conditions (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
Correct
2. A function-based index may be made using your own functions, but only if the
function is created using the DETERMINISTIC clause. True or False? Mark for Review
(1) Points
True (*)
False
Correct
False (*)
Correct
Position A
Position B (*)
Position C
Correct
Correct
6. FORALL can only be used with the INSERT statement. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
7. In the following example, where do you place the phrase BULK COLLECT?
Mark for Review
... (1) Points
BEGIN
SELECT -- Position A
salary -- Position B
INTO v_saltab -- Position C
FROM employees WHERE department_id = 20 ORDER BY salary
-- Position D
;
...
Position A
Position B (*)
Position C
Position D
Correct
8. In the following example, where do you place the phrase BULK COLLECT?
Mark for Review
DECLARE (1) Points
TYPE NameList IS TABLE OF emp.ename%TYPE;
names NameList;
CURSOR c1 IS SELECT ename -- Position A
FROM emp WHERE job = 'CLERK';
BEGIN
OPEN c1;
FETCH c1 -- Position B
INTO -- Position C
names;
...
CLOSE c1;
END;
Position A
Position B (*)
Position C
Correct
Return more readily any exceptions that are raised by the statement
Correct
10. The following statement is a valid example of using the RETURNING clause. True
or False? Mark for Review
(1) Points
DECLARE
TYPE EmpRec IS RECORD (last_name employees.last_name%TYPE, salary
employees.salary%TYPE);
emp_info EmpRec;
emp_id NUMBER := 100;
BEGIN
UPDATE employees SET salary = salary * 1.1 WHERE employee_id = emp_id
RETURNING last_name, salary INTO emp_info;
dbms_output.put_line('Just gave a raise to ' || emp_info.last_name ||
', who now makes ' || emp_info.salary);
END;
True (*)
False
Answer the question(s) on this page, and click Next to go to the next test page. Click Summary to see which
questions you need to answer before submitting the test. Click Finish Test if you are ready to submit your test.
Section 1
(Answer all questions in this section)
Keeping a log of how many rows have been inserted into a table
2. You can use a database trigger to prevent invalid transactions from being
committed. True or False? Mark for Review
(1) Points
True
False
True
False
5. Which of the following events could NOT automatically fire a database trigger?
Mark for Review
(1) Points
You click your mouse on a button to choose the correct answer to this
question
A DML operation on a view
6. While editing a document in Microsoft Word, you go to the FILE menu and SAVE
your work. To do this, Microsoft Word has executed an application trigger. True or Mark for Review
False? (1) Points
True
False
7. A business rule states that an employee's salary must be between 4000 and
30000. We could enforce this rule using a check constraint, but it is better to use a Mark for Review
database trigger. True or False? (1) Points
True
False
8. Which of the following are good guidelines to follow when creating triggers?
(Choose two) Mark for Review
(1) Points
Avoid lengthy trigger logic by creating a procedure and invoking it from within
the trigger
Use triggers to replace functionality which is already built into the database
Always create more triggers than you need, because it is better to be safe
9. A user's schema contains procedure MYPROC, function MYFUNC, trigger MYTRIGG
and package MYPACK which contains a public procedure PACKPROC. These Mark for Review
subprograms have no parameters, and the function returns a NUMBER. Which of (1) Points
the following calls to these objects (from an anonymous block) are incorrect?
(Choose two)
mypack.packproc;
mytrigg;
myproc;
v_number := myfunc;
10. Which of the following are NOT allowed within a database trigger? (Choose two)
Mark for Review
(1) Points
COMMIT
INSERT
A Boolean variable
SAVEPOINT
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. Which of the following is the correct syntax for creating a DML trigger associated
with the EMPLOYEES table? The trigger must fire whenever an employee's JOB_ID is Mark for Review
updated, but not if a different column is updated. (1) Points
(*)
Correct
A DML trigger cannot itself contain a DML statement such as INSERT INTO
audit_table.
You cannot use COMMIT inside a trigger. (*)
Correct
3. Which of the following are possible keywords for the timing component of a trigger?
(Choose three.) Mark for Review
(1) Points
BEFORE (*)
INSTEAD
WHENEVER
INSTEAD OF (*)
AFTER (*)
Correct
4. We want to create a log record automatically every time any DML operation is
executed on either or both of the EMPLOYEES and DEPARTMENTS tables. What is Mark for Review
the smallest number of triggers that must be create to do this? (1) Points
One
Two (*)
Three
Six
Eight
Correct
Correct
6. An AFTER UPDATE trigger can specify more than one column. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
7. A BEFORE statement trigger inserts a row into a logging table every time a user
updates the salary column of the employees table. The user now tries to update the Mark for Review
salaries of three employees with a single UPDATE statement, but the update fails (1) Points
because it violates a check constraint. How many rows will be inserted into the
logging table?
None, the transactions are rolled back because the update failed. (*)
One
Three
Four
Correct
8. There are five employees in department 50. A statement trigger is created by:
Mark for Review
CREATE OR REPLACE TRIGGER emp_upd_trigg (1) Points
AFTER DELETE ON EMPLOYEES
BEGIN ...
Six times, once after each row and once at the end of the statement
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
You want the trigger to prevent updates to the SALARY column, but allow updates
to all other columns. What should you code at Line A?
IF UPDATE('SALARY') THEN
IF UPDATING(SALARY) THEN
IF UPDATE(SALARY) THEN
Correct
They allow the trigger code to see what data values are being inserted into a
row.
They are automatically declared boolean variables which allow the trigger
body to detect which DML operation is being executed. (*)
They are special cursor attributes, like %ROWCOUNT and %NOTFOUND
Correct
3. Examine the following code. To create a row trigger, what code should be included
at Line A? Mark for Review
(1) Points
CREATE OR REPLACE TRIGGER del_emp_trigg
BEFORE DELETE ON employees
---- Line A
BEGIN ...
Correct
4. A row trigger has been created which is fired by UPDATE ON employees. A user
now executes a single SQL statement which updates four rows of the EMPLOYEES Mark for Review
table. How many times will the row trigger fire? (1) Points
One time
Two times
Five times
Eight times
Correct
BEGIN
INSERT INTO logging_table (emp_id, job_id)
VALUES -- Point A
END;
At point A, which of the following will insert the correct data into the logging table?
(Choose two.)
(:NEW.employee_id, :OLD.job_id);
(NEW.employee_id, NEW.job_id);
Correct
6. The OLD and NEW qualifiers can be used with statement triggers as well as row
triggers. True or False? Mark for Review
(1) Points
True
False (*)
Correct
7. Which of the following statements about INSTEAD OF triggers are NOT true?
(Choose two.) Mark for Review
(1) Points
Correct
Departments 50 and 80 exist but department 81 does not. A user now executes
the following statement:
What happens?
Correct
Before the triggering statement; After the triggering statement; Instead of the
triggering statement
Before the triggering statement; Before each row; After each row; After the
triggering statement (*)
Before the triggering statement; After the triggering statement; After each
row
Before the triggering statement; Before each row; After the triggering
statement
Correct
AFTER STATEMENT IS
BEGIN
-- some action
END AFTER STATEMENT;
END compound_trigger;
Correct
Test: Creating DDL and Database Events Triggers: Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. Which of the following could NOT cause a DDL or Database Event trigger to fire?
Mark for Review
(1) Points
A table is dropped.
Correct
A DDL trigger
A DML trigger
A statement trigger
An INSTEAD OF trigger
Correct
3. User HARJIT wants to prevent any objects which he owns from being dropped.
Harjit decides to execute the following code: Mark for Review
(1) Points
CREATE OR REPLACE TRIGGER stop_drop
---- Line A
BEGIN
RAISE_APPLICATION_ERROR(-20201,'Attempted drop');
END;
What should Harjit code at Line A?
Correct
4. You can create a trigger which prevents DDL statements on an individual table,
while still allowing DDL on other tables in the same schema. True or False? Mark for Review
(1) Points
True
False (*)
Correct
5. The database administrator wants to write a log record every time any user's
session raises an ORA-00942 exception. The DBA decides to create the following Mark for Review
trigger: (1) Points
IF (SERVERERROR(942)) THEN
IF (IS_SERVERERROR(ORA-00942)) THEN
Correct
Correct
When CALL is used, the BEGIN and END; statements should be omitted. (*)
Correct
The trigger body is reading the same table (employees) that the triggering
event is updating. (*)
You must use RAISE_APPLICATION_ERROR in a BEFORE trigger.
Correct
9. Mutating table errors can be caused by DML triggers, but not by database event
triggers. True or False? Mark for Review
(1) Points
True (*)
False
Correct
10. You have been granted CREATE TRIGGER privilege. You can now create an AFTER
LOGOFF ON SCHEMA trigger. True or False? Mark for Review
(1) Points
True
False (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. Which dictionary view would you query to see the detailed body code of triggers in
your schema? Mark for Review
(1) Points
USER_SOURCE
USER_TRIGGER
USER_TRIGGERS (*)
USER_OBJECTS
None of the above; you cannot view the code of the trigger body after the
trigger has been created.
Correct
2. By default, any user can create a DML trigger on a table in his/her schema. True or
False? Mark for Review
(1) Points
True
False (*)
Correct
3. You have created several DML triggers which reference your DEPARTMENTS table.
Now you want to disable all of them using a single SQL statement. Which command Mark for Review
should you use? (1) Points
Correct
4. Which command would you use to see if your triggers are enabled or disabled?
Mark for Review
(1) Points
(*)
SELECT object_name, status
FROM USER_OBJECTS
WHERE object_type = 'TRIGGER';
DESCRIBE TRIGGER
Correct
5. User KULJIT creates two triggers named EMP1_TRIGG and EMP2_TRIGG, which are
both DML triggers referencing her EMPLOYEES table. Kuljit now wants to remove Mark for Review
both of these triggers from the database. What command(s) should Kuljit use to do (1) Points
this?
(*)
DROP TRIGGER emp1_trigg AND emp2_trigg;
Correct
The user now tries to drop the EMPLOYEES table. What happens?
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
Correct
The procedure will still be valid and execute correctly because it does not
reference the added column.
The procedure will automatically be dropped and must be recreated.
The procedure will be marked invalid and must be recompiled before it can be
reexecuted. (*)
Users' privileges to execute the procedure will automatically be revoked.
Correct
Correct
True (*)
False
Correct
5. Which data dictionary view shows information about references and dependencies?
Mark for Review
(1) Points
DEPTREE
USER_DEPENDENCIES (*)
USER_REFERENCES
USER_LOCAL_DEPENDENCIES
Correct
6. Which of the following statements will show whether procedure myproc is valid or
invalid? Mark for Review
(1) Points
(*)
SELECT status FROM USER_PROCEDURES
WHERE procedure_name = 'MYPROC';
Correct
7. Which of the following database objects are created when the utldtree.sql script is
run? (Choose three.) Mark for Review
(1) Points
Correct
BEGIN deptree_fill('TABLE','EMPLOYEES');
END;
BEGIN deptree_fill('PROCEDURE','ALICE','SHOW_EMPS');
END;
BEGIN deptree_fill('ALICE','TABLE','EMPLOYEES');
END;
BEGIN deptree_fill('TABLE','ALICE','EMPLOYEES');
END;
(*)
BEGIN deptree_fill('ALICE','PROCEDURE','SHOW_EMPS');
END;
Correct
10. The IDEPTREE view shows dependencies by indenting the lines of output instead
of by using a NESTED_LEVEL column. True or False? Mark for Review
(1) Points
True (*)
False
Correct
11. 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 Mark for Review
two.) (1) Points
(*)
The procedure can be recompiled manually by:
ALTER PROCEDURE get_depts RECOMPILE;
Correct
Which of the following changes to the employees table will allow the procedure to
be recompiled successfully ? (Choose two.)
The table is dropped but a public table exists with the same name and
structure. (*)
The table is dropped.
Correct
13. Which of the following will NOT help to minimize dependency failures? (Choose
two.) Mark for Review
(1) Points
Declaring scalar variables with NOT NULL if the corresponding table column
has a NOT NULL constraint (*)
Declaring scalar variables using the %TYPE attribute
Correct
14. 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 Mark for Review
package body code is now altered, and the package body (but not the package (1) Points
specification) is recreated.
emp_proc will be marked invalid and needs to be recompiled. True or False?
True
False (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
Correct
2. With remote dependencies, one master data dictionary that resides on one server
identifies the status of all schema objects. True or False? Mark for Review
(1) Points
True
False (*)
Correct
3. The Data Dictionary controls the remote dependency mode. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
4. Which statement for setting a database parameter is the default for remote
dependency checking? Mark for Review
(1) Points
Correct
True
False (*)
Correct
6. In Signature Mode, a procedure will not compile if the signatures of the remote
dependencies do not match. True or False? Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
True
False (*)
False
Correct
10. With remote dependencies, one master data dictionary that resides on one server
identifies the status of all schema objects. True or False? Mark for Review
(1) Points
True
False (*)
Correct
11. The Data Dictionary controls the remote dependency mode. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
12. Which statement for setting a database parameter is the default for remote
dependency checking? Mark for Review
(1) Points
Correct
13. In this scenario, the following status is given for each procedure:
Mark for Review
- Procedure A is local and has a time stamp of 10 AM (1) Points
- Procedure B is remote and has a local time stamp of 5 AM and has a remote time
stamp of 4 AM
True
False (*)
Correct
14. In Signature Mode, a procedure will not compile if the signatures of the remote
dependencies do not match. True or False? Mark for Review
(1) Points
True (*)
False
Correct
15. In this scenario, the following status is given for each procedure:
Mark for Review
- Procedure A is local, executed, and invalidated because the remote Procedure B (1) Points
time stamp does not match the local time stamp for Procedure B
- Procedure A is recompiled.
True (*)
False
16. In Signature Mode, a compiled procedure is still valid if its dependent procedure
has a parameter data type change from NUMBER to VARCHAR2. Mark for Review
(1) Points
True
False (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
2. PLSQL_CODE_TYPE determines the type of code for both PL/SQL code and for SQL
statements, which is what speeds up the execution speed. True or False? Mark for Review
(1) Points
True
False (*)
Correct
Correct
4. When setting PLSQL_OPTIMIZE_LEVEL = 2, the compiled code will remove code and
exceptions that can never be executed. True or False? Mark for Review
(1) Points
True (*)
False
Correct
5. Which data dictionary view allows you to see the setting for
PLSQL_OPTIMIZE_LEVEL? Mark for Review
(1) Points
USER_PLSQL_OBJECTS
USER_PLSQL_OPTIMIZE
USER_PLSQL_OBJECT_SETTINGS (*)
USER_OBJECT_SETTINGS
USER_PLSQL_CODE_TYPE
Correct
6. What are the valid values for PLSQL_OPTIMIZE_LEVEL in the data dictionary?
Mark for Review
(1) Points
0,1,2,3 (*)
0,1,2,3,4
1,2,3
1,2,3,4
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. An error in PL/SQL is when the compiler does not proceed successfully and an error
message is displayed. True or False? Mark for Review
(1) Points
True (*)
False
Correct
2. A warning in PL/SQL is the same as an error in PL/SQL, but can only be viewed
through the USER_ERRORS data dictionary view. True or False? Mark for Review
(1) Points
True
False (*)
Correct
3. Which PL/SQL warning message identifies code that can cause unexpected behavior
or wrong results when executed? Mark for Review
(1) Points
INFORMATIONAL
PERFORMANCE
ALL
SEVERE (*)
ERROR
Correct
4. The informational warning level for PL/SQL compiled code identifies the code that
may cause execution speed to be slow. True or False? Mark for Review
(1) Points
True
False (*)
Correct
and
ALTER SESSION
SET PLSQL_WARNINGS = 'ENABLE:INFORMATIONAL';
True (*)
False
Correct
6. Which pair of DBMS_WARNING commands would allow you to obtain the current
settings and change and restore those settings in a PL/SQL subprogram? (Choose Mark for Review
two) (1) Points
DBMS_WARNING.SET_WARNING_SETTING_STRING (*)
DBMS_WARNING.ADD_WARNING_SETTING_CAT
DBMS_WARNING.GET_WARNING_SETTING_STRING (*)
DBMS_WARNING.GET_WARNING_STRING
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
1. Conditional compilation allows you to include extra code to help with debugging,
which can be removed once errors are resolved. True or False? Mark for Review
(1) Points
True (*)
False
Correct
2. You can choose which code to include in a PL/SQL program based on conditional
compilation directives. True or False? Mark for Review
(1) Points
True (*)
False
Correct
$IF
$THEN
$ELSE
$END
$CCFLAG
$$IF
$$THEN
$$ELSE
$$ELSIF
$$END
$IF
$THEN
$ELSE $ELSIF
$ENDIF
$IF
$THEN
$ELSE
$ELSIF
$END
(*)
$$IF
$$THEN
$$ELSE
$$END
$$DEBUG
Correct
4. Inquiry directives are used to selectively include or exclude PL/SQL code based on
values of pre-defined variables that are set using the PLSQL_CCFLAGS parameter. Mark for Review
True or False? (1) Points
True
False (*)
Correct
True
False (*)
Correct
6. If the version and release of the Oracle database in use is 10.2, what statement will
allow syntax available in version 10.2 or later? Mark for Review
(1) Points
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
Correct
2. Obfuscation allows the owner to see the source code, but not the users to whom
EXECUTE privileges have been granted. True or False? Mark for Review
(1) Points
True
False (*)
Correct
True (*)
False
Correct
DBMS_DML.CREATE_WRAP
DBMS_DDL.CREATE_WRAP
DBMS_DDL.CREATE_WRAPPED (*)
DBMS_DDL.WRAPPED
DBMS_DDL.WRAP_CODE
Correct
5. To create obfuscated code using the wrapper utility, determine the order in which to
execute the following steps. Mark for Review
A Connect to the database and execute the wrapped text file as a script to compile (1) Points
the wrapped code into the Data Dictionary.
B Log into the database server computer.
C Create a text file containing your complete unwrapped source code.
D Execute WRAP to create a second text file containing the wrapped code.
A,B,C,D
B,C,D,A (*)
C,D,A,B
C,A,B,D
B,D,C,A
Correct
6. For PL/SQL code larger than 32,767 characters, you must use the wrap utility. True
or False? Mark for Review
(1) Points
True (*)
False
Correct