1Z0-146 Exam - Oracle 11g: Advanced PL/SQL

certleader.com

Q1. Which two statements are true about nested tables and varrays? (Choose two.) 

A. Only varrays must have consecutive numbers as subscripts. 

B. Only nested tables can be used as column types in database tables. 

C. Both nested tables and varrays must have consecutive numbers as subscripts. 

D. Both nested tables and varrays can be used as column types in database tables. 

Answer: A,D 

Q2. View the Exhibit and examine the code in the PL/SQL block. 

The PL/SQL block generates an error on execution. What is the reason? 

A. The DELETE(n) method cannot be used with varrays. 

B. The DELETE(n) method cannot be used with nested tables. 

C. The NEXT method cannot be used with an associative array with VARCHAR2 key values. 

D. The NEXT method cannot be used with a nested table from which an element has been deleted. 

Answer:

Q3. Examine the structure of the LOB_STORE table. 

Name Null? Type 

LOB_ID NUMBER VIDEO_CLIP BLOB You create a 'DATA_FILES' directory object that contains the 'IMAGE1.GIF'operating system (OS) file. View the Exhibit and examine the LOAD_LOB procedure code that you execute for reading data from the OS file into the BLOB column. 

It is created with compilation errors. What is the reason? 

A. V_BLOB should be initialized to EMPTY_BLOB(). 

B. The WRITE routine of DBMS_LOB should be used instead of LOADFROMFILE. 

C. The return type of DBMS_LOB.FILEEXISTS is not compatible with the IF statement. 

D. OPEN, CLOSE, and READONLY routines of DBMS_LOB should be used instead of FILEOPEN, FILECLOSE, and FILE_READONLY. 

Answer:

Q4. Which two statements are true about cursor variables? (Choose two.) 

A. Cursor variables can be parameterized like cursors. 

B. The query associated with a cursor variable cannot reference host variables and PL/SQL variables. 

C. The FETCH statement executes the query associated with a cursor variable and identifies the result set. 

D. Cursor attributes (%FOUND, %NOTFOUND, %ISOPEN, and %ROWCOUNT) can be applied to a cursor variable. 

E. The OPEN FOR statement executes the query associated with a cursor variable and identifies the result set. 

Answer: D,E 

Q5. Match the following external C procedure components with their descriptions: 

1. External procedure a. a process that starts the extproc process 

2. Shared library b. a session-specific process that executes the external procedure 

3. Alias library c. schema object that represents the operating system (OS) shared library 

4. The extproc process d. operating system file that stores the external procedure 

5. Listener process e. a unit of code written in C 

A. 1-e; 2-d; 3-c; 4-b; 5-a 

B. 1-c; 2-d; 3-e; 4-b; 5-a 

C. 1-e; 2-c; 3-d; 4-b; 5-a 

D. 1-a; 2-d; 3-e; 4-c; 5-b 

Answer:

Q6. Examine the code in the following PL/SQL block: 

DECLARE 

TYPE NumList IS TABLE OF INTEGER; 

List1 NumList := NumList(11,22,33,44); 

BEGIN 

List1.DELETE(2); 

DBMS_OUTPUT.PUT_LINE 

( 'The last element# in List1 is ' || List1.LAST || 

' and total of elements is '||List1.COUNT); 

List1.EXTEND(4,3); 

END; 

Which two statements are true about the above code? (Choose two.) 

A. LAST and COUNT give different values. 

B. LAST and COUNT give the same values. 

C. The four new elements that are added contain the value 33. 

D. The four new elements that are added contain the value 44. 

Answer: A,C 

Q7. You executed the following command to alter the session parameter: 

SQL> ALTER SESSION SET PLSCOPE_SETTINGS = 'IDENTIFIERS:ALL' 

Which two statements are true in this scenario? (Choose two.) 

A. If the SYSAUX tablespace is unavailable, and you compile a program unit, PL/Scope does not collect data for the compiled object. 

B. All the identifiers declared in compiled program units before altering the parameter settings appear in the *_IDENTIFIER static data dictionary views. 

C. All the identifiers declared in compiled program units before altering the parameter settings do not appear in the *_IDENTIFIER static data dictionary views. 

D. If the SYSAUX tablespace is unavailable, and you compile a program unit, PL/Scope collects data for the compiled object and stores it in the SYSTEM tablespace. 

Answer: A,C 

Q8. Which two statements are true about SecureFile LOB options? (Choose two.) 

A. The DECRYPT option can be used to remove the encryption only if the LOB column is empty. 

B. The KEEP_DUPLICATES option removes the deduplication effect only on new data in a LOB column. 

C. The KEEP_DUPLICATES option removes the deduplication effect on existing and new data in a LOB column. 

D. The DECRYPT option can be used to remove the encryption from LOB columns that are empty or contain data. 

Answer: C,D 

Q9. Identify the two types of PL/SQL programs for which you consider setting the compilation method to native mode. (Choose two.) 

A. PL/SQL programs that are still in the debugging phase of development 

B. PL/SQL programs that have computation-intensive procedural operations 

C. A PL/SQL program, which is called with the same parameters by multiple sessions 

D. PL/SQL programs that spend most of their execution time in executing SQL statements 

Answer: B,C 

Q10. View the Exhibit and examine the PL/SQL code. 

Identify the sections of the code that need to be modified for better performance gains. (Choose all that apply.) 

A. Use cursors to fetch values. 

B. Remove redundant SQL statements in the procedures. 

C. Avoid the NOT NULL constraint when declaring the variable. 

D. Define and compile procedures independently, and not as part of a package. 

Answer: B,C