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

certleader.com

Q1. In which two situations is the body of a result-cached function executed? (Choose two.) 

A. if the memory allocated for the result cache is increased 

B. if a session on this database instance invokes the function with the same parameter values 

C. if the first time a session on this database instance invokes the function with a parameter value 

D. if a session executes a data manipulation language (DML) statement on a table or view that was specified in the RELIES_ON clause of a result-cached function 

Answer: C,D 

Q2. Examine the structure of the TEXT_TAB table. Name Null? Type 

TEXT_ID NUMBER 

DOC1 CLOB 

DOC2 CLOB 

You issue the following INSERT commands: 

INSERT INTO text_tab VALUES (1, 'This is line 1',null); 

INSERT INTO text_tab VALUES (2, 'This is line 1','This is line 2'); 

Then you execute the following block of the PL/SQL code: 

DECLARE 

vc1 VARCHAR2(1000):= 'This is the preface' 

lb1 CLOB; 

lb2 CLOB; 

BEGIN 

SELECT doc1 INTO lb1 FROM text_tab WHERE text_id=1; 

SELECT doc1 || doc2 INTO lb1 FROM text_tab WHERE text_id=2; 

lb2 := vc1|| lb1; 

UPDATE text_tab SET doc2 = lb2 WHERE text_id = 1; 

END; 

What is the outcome? 

A. It executes successfully. 

B. It gives an error because VARCHAR2 should be explicitly converted to CLOB. 

C. It gives an error because CLOB variables should be initialized to EMPTY_CLOB(). 

D. It gives an error because the concatenation operator cannot be used with the CLOB data type. 

Answer:

Q3. You created the SALES_ORDERS_CTX context to use the 

OE.SALES_ORDERS_PKG package. 

View Exhibit1 and examine the package that is used with the context. 

View Exhibit2 to examine the policy defined and the logon trigger. 

A user receives the following error when he or she executes a query: 

ERROR at line 2: 

ORA-28112: failed to execute policy function 

What could be the reason for the error? 

A. The user has insufficient privileges on the DBMS_SESSION package. 

B. The subprograms inside the package have not been created with the invoker's right. 

C. The THE_PREDICATE function has an insufficient number of parameters in the package. 

D. The policy is created by using SALES_ORDERS_PKG.THE_PREDICATE without a parameter. 

Answer:

Q4. Which two statements correctly describe the features of SecureFiles? (Choose two.) 

A. Compression is performed only on the server side and enables random reads and writes to LOB data. 

B. Deduplication stores identical data, which occurs in a LOB column in each row, as a single copy within the LOB. 

C. Compression can be performed on the client side and it enables random and sequential reads and writes to LOB data. 

D. Deduplication stores identical data occurring two or more times in the same LOB column as a single copy for the table. 

Answer: A,D 

Q5. Identify two strategies against SQL injection. (Choose two.) 

A. Using parameterized queries with bind arguments. 

B. Use subprograms that are run with the definer's right. 

C. Use RESTRICT_REFERENCE clauses in functions that use dynamic SQLs. 

D. Validate user inputs to functions that use dynamic SQLs built with concatenated values. 

Answer: A,D 

Q6. You executed this command to gather information about the memory allocation for storing query results: 

SQL> execute dbms_result_cache.memory_report 

View the Exhibit and examine the output for the execution of the 

DBMS_RESULT_CACHE.MEMORY_REPORT procedure. 

Which two statements are true about the output in the Exhibit? (Choose two.) 

A. In total, four blocks are used by the result cache. 

B. Currently 52 KB is allocated to the result cache. 

C. Currently 32 KB is allocated to the result cache. 

D. The result cache can be increased by 65628 bytes. 

Answer: C,D 

Q7. Which two statements are true about the SQL Query Result Cache? (Choose two.) 

A. It can store the query results for temporary tables. 

B. It can be set at the system, session, or query level. 

C. It is used only across statements in the same session. 

D. Cached query results become invalid when the data accessed by the query is modified. 

Answer: B,D 

Q8. Identify the component of the PL/SQL hierarchical profiler that uploads the result of profiling into database tables. 

A. the trace file component 

B. the analyzer component 

C. the shared library component 

D. the data collection component 

Answer:

Q9. View the Exhibit and examine the output. 

Which statement is an inference from the output? 

A. The class file is pinned into the Java pool. 

B. The class file has been loaded into the shared library. 

C. Java class methods in the Java class file have been published. 

D. The loadjava command has been executed to load the Java source and class files. 

Answer:

Q10. Which three actions can be performed by using the DBMS_ASSERT package to prevent SQL injection? (Choose three.) 

A. Detect a wrong user. 

B. Check input string length. 

C. Verify qualified SQL names. D. Validate TNS connect strings. 

E. Verify an existing schema name. 

F. Enclose string literals within double quotation marks. 

Answer: C,E,F