1. Which of the following exceptions can be raised ONLY when using the UTL_FILE package? (Choose two.)
(1) Point
Correct
2. The UTL_FILE package can be used to read and write binary files such as JPEGs as well as text files. True or False?
(1) Point
Incorrect. Refer to Section 11 Lesson 2.
3. The DBMS_OUTPUT gives programmers an easy-to-use interface to see, for instance, the current value of a loop counter, or whether or not a program reaches a particular branch of an IF statement. (True or False?)
(1) Point
Correct
4. 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 ELSE ... END IF; DBMS_OUTPUT.NEW_LINE;
(1) Point
Incorrect. Refer to Section 11 Lesson 2.
5. The UTL_FILE package contains several exceptions exclusively used in this package. Which are they? (Choose 3)
(1) Point
1. Using the FOPEN function, you can do which actions with the UTL_FILE package? (Choose 2)
Tandai untuk Ditinjau
(1) Point
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.
It is used to append to a file until processing is complete.(*)
Incorrect. Refer to Section 11 Lesson 2.
2. Which general exceptions may be handled by the UTL_FILE package? (Choose 2)
Tandai untuk Ditinjau
(1) Point
TOO_MANY_ROWS
VALUE_ERROR(*)
NO_DATA_FOUND(*)
ZERO_DIVIDE
Incorrect. Refer to Section 11 Lesson 2.
3. The UTL_FILE package can be used to read and write binary files such as JPEGs as well as text files. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 2.
4. What will be displayed when the following code is executed?
BEGIN DBMS_OUTPUT.PUT('I do like'); DBMS_OUTPUT.PUT_LINE('to be'); DBMS_OUTPUT.PUT('beside the seaside'); END;
Tandai untuk Ditinjau
(1) Point
I do like to be beside the seaside
I do like to be beside the seaside
I do like to be
I do like to be beside the seaside
I do liketo be (*)
Incorrect. Refer to Section 11 Lesson 2.
5. The DBMS_OUTPUT gives programmers an easy-to-use interface to see, for instance, the current value of a loop counter, or whether or not a program reaches a particular branch of an IF statement. (True or False?)
Tandai untuk Ditinjau
(1) Point
True (*)
False
6. The UTL_MAIL package allows sending email from the Oracle database to remote recipients.
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
7. 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 ELSE ... END IF; DBMS_OUTPUT.NEW_LINE;
Tandai untuk Ditinjau
(1) Point
DBMS_OUTPUT.PUT('IF branch was executed'); (*)
DBMS_OUTPUT.NEW_LINE('IF branch was executed');
DBMS_OUTPUT.PUT_LINE('IF branch was executed');
DBMS_OUTPUT.GET_LINE('IF branch was executed');
Correct
8. Why is it better to use DBMS_OUTPUT only in anonymous blocks, not inside stored subprograms such as procedures?
Tandai untuk Ditinjau
(1) Point
Because anonymous blocks display messages while the block is executing, while procedures do not display anything until their execution has finished
Because DBMS_OUTPUT cannot be used inside procedures
Because DBMS_OUTPUT should be used only for testing and debugging PL/SQL code (*)
Because DBMS_OUTPUT can raise a NO_DATA_FOUND exception if used inside a packaged procedure
Incorrect. Refer to Section 11 Lesson 2.
9. The UTL_FILE package can be used to create binary files such as JPEGs as well as text files. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 2.
10. DBMS_OUTPUT.PUT_LINE can be invoked from inside a private packaged function. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
11. A package's state is initialized when the package is first loaded. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
12. In the following example, which statement best fits in Line 1? (Choose 1)
DECLARE v_more_rows_exist BOOLEAN := TRUE; BEGIN -- Line 1 LOOP v_more_rows_exist := curs_pkg.fetch_n_rows(3); DBMS_OUTPUT.PUT_LINE('-------'); EXIT WHEN NOT v_more_rows_exist; END LOOP; curs_pkg.close_curs; END;
Tandai untuk Ditinjau
(1) Point
EXIT WHEN curs_pkg.emp_curs%NOTFOUND;
curs_pkg.close_curs;
curs_pkg.open_curs; (*)
curs_pkg.emp_curs%ISOPEN;
Incorrect. Refer to Section 11 Lesson 1.
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
Tandai untuk Ditinjau
(1) Point
25
10
50 (*)
Incorrect. Refer to Section 11 Lesson 1.
14. 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?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Correct
15. 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
Tandai untuk Ditinjau
(1) Point
The first 15 rows will be fetched.
The first 5 rows will be fetched three times.
The first 10 rows will be fetched, then the first 5 rows will be fetched again.
An error will occur at line 2.
An error will occur at line 4. (*)
1. The UTL_FILE package can be used to create binary files such as JPEGs as well as text files. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 2.
2. What will be displayed when the following code is executed?
BEGIN DBMS_OUTPUT.PUT('I do like'); DBMS_OUTPUT.PUT_LINE('to be'); DBMS_OUTPUT.PUT('beside the seaside'); END;
Tandai untuk Ditinjau
(1) Point
I do like to be
I do like to be beside the seaside
I do like to be beside the seaside
I do like to be beside the seaside
I do liketo be (*)
Incorrect. Refer to Section 11 Lesson 2.
3. The UTL_FILE package contains several exceptions exclusively used in this package. Which are they? (Choose 3)
Tandai untuk Ditinjau
(1) Point
INVALID_PATH(*)
INVALID_OPERATION(*)
WRITE_ERROR(*)
NO_DATA_FOUND
ZERO_DIVIDE
Incorrect. Refer to Section 11 Lesson 2.
4. The DBMS_OUTPUT package is useful for which of the following activities? (Choose two)
Tandai untuk Ditinjau
(1) Point
Display results to the developer during testing for debugging purposes(*)
Write operating system text files to the user's screen
Trace the code execution path for a function or procedure(*)
Interact with a user during execution of a function or procedure
Incorrect. Refer to Section 11 Lesson 2.
5. The SEND procedure is for sending messages without attachments. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
6. 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 ELSE ... END IF; DBMS_OUTPUT.NEW_LINE;
Tandai untuk Ditinjau
(1) Point
DBMS_OUTPUT.GET_LINE('IF branch was executed');
DBMS_OUTPUT.PUT('IF branch was executed'); (*)
DBMS_OUTPUT.NEW_LINE('IF branch was executed');
DBMS_OUTPUT.PUT_LINE('IF branch was executed');
Incorrect. Refer to Section 11 Lesson 2.
7. Using the FOPEN function, you can do which actions with the UTL_FILE package? (Choose 2)
Tandai untuk Ditinjau
(1) Point
It is used to append to a file until processing is complete.(*)
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.
Incorrect. Refer to Section 11 Lesson 2.
8. Which general exceptions may be handled by the UTL_FILE package? (Choose 2)
Tandai untuk Ditinjau
(1) Point
ZERO_DIVIDE
VALUE_ERROR(*)
NO_DATA_FOUND(*)
TOO_MANY_ROWS
Incorrect. Refer to Section 11 Lesson 2.
9. Which of the following exceptions can be raised ONLY when using the UTL_FILE package? (Choose two.)
Tandai untuk Ditinjau
(1) Point
NO_DATA_FOUND
READ_ERROR(*)
INVALID_PATH(*)
VALUE_ERROR
E_MYEXCEP
Incorrect. Refer to Section 11 Lesson 2.
10. Which of the following procedures is not valid for the UTL_MAIL package
Tandai untuk Ditinjau
(1) Point
SEND_ATTACH_RAW
SEND
SEND_ATTACH_VARCHAR2
SEND_ATTACH_BOOLEAN (*)
All are valid.
11. 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?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 1.
12. 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
Tandai untuk Ditinjau
(1) Point
The first 5 rows will be fetched three times.
An error will occur at line 2.
An error will occur at line 4. (*)
The first 15 rows will be fetched.
The first 10 rows will be fetched, then the first 5 rows will be fetched again.
Incorrect. Refer to Section 11 Lesson 1.
13. A cursor is declared in a package specification. User SIOBHAN opens the cursor and fetches the first three rows from the cursor's active set, but does not close the cursor. User FRED now connects to the database. FRED can immediately fetch the next three rows without opening the cursor. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 1.
14. In the following example, which statement best fits in Line 1? (Choose 1)
DECLARE v_more_rows_exist BOOLEAN := TRUE; BEGIN -- Line 1 LOOP v_more_rows_exist := curs_pkg.fetch_n_rows(3); DBMS_OUTPUT.PUT_LINE('-------'); EXIT WHEN NOT v_more_rows_exist; END LOOP; curs_pkg.close_curs; END;
Tandai untuk Ditinjau
(1) Point
curs_pkg.emp_curs%ISOPEN;
EXIT WHEN curs_pkg.emp_curs%NOTFOUND;
curs_pkg.close_curs;
curs_pkg.open_curs; (*)
Incorrect. Refer to Section 11 Lesson 1.
15. When a user session changes the value of a package variable, the new value can immediately be seen by other sessions. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
1. DBMS_OUTPUT.PUT_LINE can be invoked from inside a private packaged function. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
2. Which of the following exceptions can be raised ONLY when using the UTL_FILE package? (Choose two.)
Tandai untuk Ditinjau
(1) Point
READ_ERROR(*)
NO_DATA_FOUND
VALUE_ERROR
E_MYEXCEP
INVALID_PATH(*)
Incorrect. Refer to Section 11 Lesson 2.
3. The UTL_FILE package contains several exceptions exclusively used in this package. Which are they? (Choose 3)
Tandai untuk Ditinjau
(1) Point
ZERO_DIVIDE
WRITE_ERROR(*)
INVALID_OPERATION(*)
NO_DATA_FOUND
INVALID_PATH(*)
Incorrect. Refer to Section 11 Lesson 2.
4. 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 ELSE ... END IF; DBMS_OUTPUT.NEW_LINE;
Tandai untuk Ditinjau
(1) Point
DBMS_OUTPUT.PUT('IF branch was executed'); (*)
DBMS_OUTPUT.GET_LINE('IF branch was executed');
DBMS_OUTPUT.NEW_LINE('IF branch was executed');
DBMS_OUTPUT.PUT_LINE('IF branch was executed');
Correct
5. The UTL_FILE package can be used to read and write binary files such as JPEGs as well as text files. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
6. Which of the following procedures is not valid for the UTL_MAIL package
Tandai untuk Ditinjau
(1) Point
SEND_ATTACH_BOOLEAN (*)
SEND
All are valid.
SEND_ATTACH_RAW
SEND_ATTACH_VARCHAR2
Correct
7. The UTL_MAIL package allows sending email from the Oracle database to remote recipients.
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
8. The SEND procedure is for sending messages without attachments. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
9. Which of the following best describes the purpose of the UTL_FILE package?
Tandai untuk Ditinjau
(1) Point
It is used to read and write text files stored outside the database. (*)
It is used to query CHAR and VARCHAR2 columns in tables.
It is used to load binary files such as employees' photos into the database.
It is used to find out how much free space is left on an operating system disk.
Correct
10. What will be displayed when the following code is executed?
BEGIN DBMS_OUTPUT.PUT('I do like'); DBMS_OUTPUT.PUT_LINE('to be'); DBMS_OUTPUT.PUT('beside the seaside'); END;
Tandai untuk Ditinjau
(1) Point
I do like to be beside the seaside
I do like to be
I do like to be beside the seaside
I do liketo be (*)
I do like to be beside the seaside
11. A package's state is initialized when the package is first loaded. True or False?
Tandai untuk Ditinjau
(1) Point
True (*)
False
Correct
12. When a user session changes the value of a package variable, the new value can immediately be seen by other sessions. True or False?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 1.
13. 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
Tandai untuk Ditinjau
(1) Point
The first 10 rows will be fetched, then the first 5 rows will be fetched again.
An error will occur at line 4. (*)
The first 15 rows will be fetched.
An error will occur at line 2.
The first 5 rows will be fetched three times.
Incorrect. Refer to Section 11 Lesson 1.
14. 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?
Tandai untuk Ditinjau
(1) Point
True
False (*)
Incorrect. Refer to Section 11 Lesson 1.
15. In the following example, which statement best fits in Line 1? (Choose 1)
DECLARE v_more_rows_exist BOOLEAN := TRUE; BEGIN -- Line 1 LOOP v_more_rows_exist := curs_pkg.fetch_n_rows(3); DBMS_OUTPUT.PUT_LINE('-------'); EXIT WHEN NOT v_more_rows_exist; END LOOP; curs_pkg.close_curs; END;
1. You can define variables and assign values to them using PLSQL_CCFLAGS. Then test the values of the variables using inquiry directives. True or False? Tandai untuk Ditinjau (1) Point True (*) False Correct 2. How would you determine the current Oracle database version? Tandai untuk Ditinjau (1) Point DBMS_DB_VERSION.VERSION (*) DBMS_DB_VERSION.RELEASE DBMS_DB_VERSION.VER_LE_11 DBMS_DB_VERSION.VER_LE_10 Correct 3. Identify the selection directives used in conditional compilation. Tandai untuk Ditinjau (1) Point $$IF $$THEN $$ELSE $$ELSIF $$END $IF $THEN $ELSE $ELSIF $END (*) $IF $THEN $ELSE $END $CCFLAG $IF $THEN $ELSE $ELSIF $ENDIF $$IF $$THEN $$ELSE $$END $$DEBUG Incorrect. Refer to Section 15 Lesson 3. 4. Conditional compilation allows you to include extra code to help with debugging, which can be removed once errors are resolved. True or False? Tandai untuk Ditinjau (1) Point True (*) False Correct 5. O...
1. Which command would you use to see if your triggers are enabled or disabled? Tandai untuk Ditinjau (1) Point SELECT trigger_name, status FROM USER_TRIGGERS; (*) SELECT trigger_name, trigger_type FROM USER_TRIGGERS; SELECT object_name, status FROM USER_OBJECTS WHERE object_type = 'TRIGGER'; DESCRIBE TRIGGER Incorrect. Refer to Section 13 Lesson 5. 2. After the following SQL statement is executed, all the triggers on the DEPARTMENTS table will no longer fire, but will remain in the database. True or False? ALTER TABLE departments DISABLE ALL TRIGGERS; Tandai untuk Ditinjau (1) Point True (*) False Correct 3. A user creates the following trigger: CREATE OR REPLACE TRIGGER emp_trigg AFTER DELETE ON employees BEGIN ... END; The user now tries to drop the EMPLOYEES table. What happens? Tandai untuk Ditinjau (1) Point Both the table and the trigger are dropped. (*) The table is dropped and the trigger is disabled. The ...
1. Which of the following statements will show whether procedure myproc is valid or invalid? Tandai untuk Ditinjau (1) Point SELECT * FROM deptree; SELECT status FROM USER_PROCEDURES WHERE procedure_name = 'MYPROC'; SELECT status FROM USER_OBJECTS WHERE object_type = 'PROCEDURE' AND object_name = 'MYPROC'; (*) SELECT valid FROM USER_OBJECTS WHERE object_type = 'PROCEDURE' AND object_name = 'MYPROC'; Incorrect. Refer to Section 14 Lesson 1. 2. A single procedure can be both a referenced object and a dependent object. True or False? Tandai untuk Ditinjau (1) Point True (*) False Correct 3. A single PL/SQL subprogram such as a procedure can be both a referenced object and a dependent object. True or False? Tandai untuk Ditinjau (1) Point True (*) False Correct 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? (C...
Komentar
Posting Komentar