Semester 2 Final Exam - Oracle Academy
Semester 2 Final Exam - Oracle Academy
txt
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 13
(Answer all questions in this section)
1. The following code will successfully create emp_trigg:
True or False?
CREATE OR REPLACE TRIGGER emp_trigg
BEFORE DELETE OF salary ON employees
BEGIN
RAISE_APPLICATION_ERROR(-20202,'Deleting salary is not allowed');
END;
Mark for Review
(1) Points
True
False (*)
Correct Correct
True (*)
False
Correct Correct
第 1 页
0000-3929-16e6-2e4b-ea8.txt
The last line of code should be END mytrigg;
A DML trigger cannot itself contain a DML statement such as INSERT INTO
audit_table.
Correct Correct
Correct Correct
Six times, once after each row and once at the end of the statement
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 13
(Answer all questions in this section)
6. You can code COMMIT and ROLLBACK statements in a trigger
body. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
第 3 页
0000-3929-16e6-2e4b-ea8.txt
True
False (*)
Correct Correct
mytrigg; (*)
v_number := myfunc;
myproc;
mypack.packproc;
Correct Correct
True (*)
False
Correct Correct
第 4 页
0000-3929-16e6-2e4b-ea8.txt
10. Which of the following best describes a database
trigger? Mark for Review
(1) Points
A subprogram that checks whether a user has typed the correct password
to log on to the database
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 13
(Answer all questions in this section)
第 5 页
0000-3929-16e6-2e4b-ea8.txt
Correct Correct
A DML trigger
An INSTEAD OF trigger
A DDL trigger
A statement trigger
Correct Correct
When using CALL, only one DML statement can be tested, so UPDATE OR
DELETE is wrong.
When CALL is used, the BEGIN and END; statements should be omitted. (*)
Correct Correct
第 6 页
0000-3929-16e6-2e4b-ea8.txt
True
False (*)
Correct Correct
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 13
(Answer all questions in this section)
第 7 页
0000-3929-16e6-2e4b-ea8.txt
16. A trigger automatically inserts a row into a logging
table every time a user's session receives this error message:
ORA-00942: table or view does not exist
What kind of trigger is this? Mark for Review
(1) Points
A row trigger
A statement trigger
A DDL trigger
An AFTER trigger
Correct Correct
Once
Four times
Five times
第 8 页
0000-3929-16e6-2e4b-ea8.txt
Eight times
Correct Correct
IF DELETING THEN
IF INSERTING THEN
Correct Correct
Before the triggering statement; Before each row; After each row; After
the triggering statement (*)
Before the triggering statement; Before each row; After the triggering
statement
第 9 页
0000-3929-16e6-2e4b-ea8.txt
Correct Correct
(:OLD.employee_id, :OLD.job_id);
(:NEW.employee_id, :OLD.job_id);
(NEW.employee_id, NEW.job_id);
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 13
(Answer all questions in this section)
第 10 页
0000-3929-16e6-2e4b-ea8.txt
They can be created on a simple view.
Correct Correct
AFTER STATEMENT IS
BEGIN
-- some action
END AFTER STATEMENT;
END compound_trigger;
Mark for Review
(1) Points
第 11 页
0000-3929-16e6-2e4b-ea8.txt
Correct Correct
Correct Correct
True
False (*)
Correct Correct
USER_SOURCE (*)
You can view trigger information in all of these Data Dictionary views.
USER_TRIGGERS
USER_ERRORS
第 12 页
0000-3929-16e6-2e4b-ea8.txt
USER_OBJECTS
True
False (*)
Correct Correct
True (*)
False
Correct Correct
25
10
50 (*)
Correct Correct
Dick: 0, Hazel: 0
Correct Correct
True
False (*)
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 14
(Answer all questions in this section)
31. Package CURSPACK declares a global cursor in the package
specification. The package contains three public procedures: OPENPROC opens the
cursor; FETCHPROC fetches 5 rows from the cursor's active set; CLOSEPROC closes
the cursor.
What will happen when a user session executes the following commands in the
order shown?
curspack.openproc; -- line 1
curspack.fetchproc; -- line 2
curspack.fetchproc; -- line 3
curspack.openproc; -- line 4
curspack.fetchproc; -- line 5
curspack.closeproc; -- line 6
Mark for Review
(1) Points
The first 10 rows will be fetched, then the first 5 rows will be fetched
again.
Correct Correct
第 15 页
0000-3929-16e6-2e4b-ea8.txt
curs_pkg.close_curs;
curs_pkg.emp_curs%ISOPEN;
curs_pkg.open_curs; (*)
Correct Correct
True
False (*)
Correct Correct
第 16 页
0000-3929-16e6-2e4b-ea8.txt
It is used to load binary files such as employees' photos into the
database.
It is used to read and write text files stored outside the database. (*)
Correct Correct
I do like to be
I do like
to be
beside the seaside
I do like to be
beside the seaside
I do liketo be(*)
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 14
第 17 页
0000-3929-16e6-2e4b-ea8.txt
(Answer all questions in this section)
36. Using the FOPEN function, you can do which actions with
the UTL_FILE package? (Choose 2) Mark for Review
(1) Points
(Choose all correct answers)
It is used to read and write text files stored outside the database. (*)
Correct Correct
True
False (*)
Correct Correct
True (*)
False
Correct Correct
第 18 页
0000-3929-16e6-2e4b-ea8.txt
Section 15
(Answer all questions in this section)
39. What are the two methods for obfuscating PL/SQL
subprograms? (Choose two) Mark for Review
(1) Points
(Choose all correct answers)
DBMS_DDL.CREATE_WRAPPED (*)
DBMS_DML.CREATE_WRAPPED
DBMS_DDL.WRAP
Correct Correct
True (*)
False
Correct Correct
True
False (*)
Correct Correct
True (*)
False
True
False (*)
Correct Correct
True
False (*)
第 20 页
0000-3929-16e6-2e4b-ea8.txt
Correct Correct
Correct Correct
Test: Semester 2 Final Exam
Review your answers, feedback, and question scores below. An asterisk (*)
indicates a correct answer.
Section 15
(Answer all questions in this section)
46. How would you determine the current Oracle database
version? Mark for Review
(1) Points
DBMS_DB_VERSION.VER_LE_10
DBMS_DB_VERSION.VERSION (*)
DBMS_DB_VERSION.RELEASE
DBMS_DB_VERSION.VER_LE_11
Correct Correct
$$END;
$END;
$ELSIF
$ENDIF
$END (*)
Correct Correct
DBMS_WARNING.SET_WARNING_SETTING_STRING (*)
DBMS_WARNING.GET_WARNING_SETTING_STRING (*)
DBMS_WARNING.ADD_WARNING_SETTING_CAT
DBMS_WARNING.GET_WARNING_STRING
第 22 页
0000-3929-16e6-2e4b-ea8.txt
Correct Correct
True (*)
False
Correct Correct
Error
Warning (*)
Correct Correct
第 23 页