Professional Documents
Culture Documents
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
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
(1) Points
The first 10 rows will be fetched, then the first 5 rows will be fetched again.
User FRED now connects to the database. FRED can immediately fetch the next three rows without
opening the cursor. True or False? Mark for Review
(1) Points
True
False (*)
(1) Points
True
False (*)
(1) Points
True (*)
False
Incorrect Incorrect. Refer to Section 11 Lesson 1.
DECLARE
BEGIN
-- Line 1
LOOP
v_more_rows_exist := curs_pkg.fetch_n_rows(3);
DBMS_OUTPUT.PUT_LINE('-------');
END LOOP;
curs_pkg.close_curs;
END;
(1) Points
curs_pkg.close_curs;
curs_pkg.emp_curs%ISOPEN;
curs_pkg.open_curs; (*)
EXIT WHEN curs_pkg.emp_curs%NOTFOUND;
Correct Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
(1) Points
True (*)
False
Incorrect Incorrect. Refer to Section 11 Lesson 2.
(1) Points
True (*)
False
8. The UTL_MAIL package allows sending email from the Oracle database to
remote recipients. Mark for Review
(1) Points
True (*)
False
Correct Correct
--Line 1
ELSE
...
END IF;
(1) Points
(1) Points
VALUE_ERROR (*)
ZERO_DIVIDE
TOO_MANY_ROWS
NO_DATA_FOUND (*)
Incorrect Incorrect. Refer to Section 11 Lesson 2.
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
11. Which of the following procedures is not valid for the UTL_MAIL package
Mark for Review
(1) Points
SEND_ATTACH_BOOLEAN (*)
SEND_ATTACH_VARCHAR2
SEND_ATTACH_RAW
SEND
Correct Correct
12. Why is it better to use DBMS_OUTPUT only in anonymous blocks, not inside
stored subprograms such as procedures? Mark for Review
(1) Points
Because DBMS_OUTPUT should be used only for testing and debugging PL/SQL code (*)
Because anonymous blocks display messages while the block is executing, while procedures
do not display anything until their execution has finished
13. 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 (*)
14. The UTL_FILE package contains several exceptions exclusively used in this
package. Which are they? (Choose 3) Mark for Review
(1) Points
INVALID_PATH (*)
WRITE_ERROR (*)
ZERO_DIVIDE
NO_DATA_FOUND
INVALID_OPERATION (*)
(1) Points
True (*)
False
Incorrect Incorrect. Refer to Section 11 Lesson 2.
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
DECLARE
BEGIN
-- Line 1
LOOP
v_more_rows_exist := curs_pkg.fetch_n_rows(3);
DBMS_OUTPUT.PUT_LINE('-------');
END LOOP;
curs_pkg.close_curs;
END;
(1) Points
curs_pkg.open_curs; (*)
curs_pkg.close_curs;
curs_pkg.emp_curs%ISOPEN;
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.
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
(1) Points
50 (*)
25
10
(1) Points
True (*)
False
Correct Correct
User FRED now connects to the database. FRED can immediately fetch the next three rows without
opening the cursor. True or False? Mark for Review
(1) Points
True
False (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
(1) Points
True (*)
False
--Line 1
ELSE
...
END IF;
(1) Points
8. The UTL_MAIL package allows sending email from the Oracle database to
remote recipients. Mark for Review
(1) Points
True (*)
False
Correct Correct
(1) Points
Because anonymous blocks display messages while the block is executing, while procedures
do not display anything until their execution has finished
Because DBMS_OUTPUT should be used only for testing and debugging PL/SQL code (*)
(1) Points
True (*)
False
Correct Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
(1) Points
True (*)
False
Correct Correct
12. 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 manipulate large object data type items in columns.
It is used to find out how much free space is left on an operating system disk.
Correct Correct
13. The DBMS_OUTPUT.PUT procedure places text in a buffer but does not
display the contents of the buffer. True or False? Mark for Review
(1) Points
True (*)
False
Correct Correct
(1) Points
(Choose all correct answers)
VALUE_ERROR (*)
ZERO_DIVIDE
NO_DATA_FOUND (*)
TOO_MANY_ROWS
BEGIN
DBMS_OUTPUT.PUT('I do like');
DBMS_OUTPUT.PUT_LINE('to be');
END;
I do like
to be
I do like to be
I do liketo be
(*)
I do like to be
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
1. The UTL_FILE package can be used to create binary files such as JPEGs as
well as text files. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
2. Which of the following procedures is not valid for the UTL_MAIL package
Mark for Review
(1) Points
SEND_ATTACH_VARCHAR2
SEND_ATTACH_RAW
SEND_ATTACH_BOOLEAN (*)
SEND
Correct Correct
3. 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 find out how much free space is left on an operating system disk.
It is used to manipulate large object data type items in columns.
It is used to read and write text files stored outside the database. (*)
Correct Correct
(1) Points
Because DBMS_OUTPUT should be used only for testing and debugging PL/SQL code (*)
Because anonymous blocks display messages while the block is executing, while procedures
do not display anything until their execution has finished
Because DBMS_OUTPUT can raise a NO_DATA_FOUND exception if used inside a packaged
procedure
Correct Correct
(1) Points
True (*)
False
Correct Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
6. Which of the following exceptions can be raised ONLY when using the
UTL_FILE package? (Choose two.) Mark for Review
(1) Points
NO_DATA_FOUND
INVALID_PATH (*)
READ_ERROR (*)
VALUE_ERROR
E_MYEXCEP
Correct Correct
(1) Points
WRITE_ERROR (*)
ZERO_DIVIDE
INVALID_PATH (*)
NO_DATA_FOUND
INVALID_OPERATION (*)
Correct Correct
8. Which of the following best describes the purpose of the UTL_FILE package?
Mark for Review
(1) Points
It is used to find out how much free space is left on an operating system disk.
It is used to read and write text files stored outside the database. (*)
It is used to load binary files such as employees' photos into the database.
Correct Correct
(1) Points
(Choose all correct answers)
ZERO_DIVIDE
VALUE_ERROR (*)
TOO_MANY_ROWS
NO_DATA_FOUND (*)
Correct Correct
10. The UTL_MAIL package allows sending email from the Oracle database to
remote recipients. Mark for Review
(1) Points
True (*)
False
Correct Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
11. 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
The first 10 rows will be fetched, then the first 5 rows will be fetched again.
Correct Correct
12. In the following example, which statement best fits in Line 1? (Choose 1)
DECLARE
BEGIN
-- Line 1
LOOP
v_more_rows_exist := curs_pkg.fetch_n_rows(3);
DBMS_OUTPUT.PUT_LINE('-------');
END LOOP;
curs_pkg.close_curs;
END;
(1) Points
curs_pkg.close_curs;
curs_pkg.open_curs; (*)
curs_pkg.emp_curs%ISOPEN;
Correct Correct
13. 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?
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
(1) Points
25
10
50 (*)
Correct Correct
g_myvar NUMBER;
User HAZEL now connects to the database. Both users immediately execute:
BEGIN
DBMS_OUTPUT.PUT_LINE(multipack.g_myvar);
END;
(1) Points
Dick: 0, Hazel: 0
15. 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 Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.
Section 11 Quiz
1. Which of the following exceptions can be raised ONLY when using the
UTL_FILE package? (Choose two.) Mark for Review
(1) Points
VALUE_ERROR
READ_ERROR (*)
NO_DATA_FOUND
INVALID_PATH (*)
E_MYEXCEP
(1) Points
True (*)
False
Correct Correct
(1) Points
Because DBMS_OUTPUT should be used only for testing and debugging PL/SQL code (*)
Because anonymous blocks display messages while the block is executing, while procedures
do not display anything until their execution has finished
Because DBMS_OUTPUT can raise a NO_DATA_FOUND exception if used inside a packaged
procedure
Correct Correct
4. 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 find out how much free space is left on an operating system disk.
It is used to read and write text files stored outside the database. (*)
(1) Points
Display results to the developer during testing for debugging purposes (*)