1z0-148

1z0-148 practice questions, page 3 of 3, with answer review and explanations.

Question 11

Examine this function header: FUNCTION calc_new_sal (emp_id NUMBER) RETURN NUMBER; You want to ensure that whenever this PL/SQL function is invoked with the same parameter value across active sessions, the result is not recomputed. If a DML statement is modifying a table which this function depends upon, the function result must be recomputed at that point in time for all sessions calling this function. Which two actions should you perform?

  1. Ensure RESULT_CACHE_MAX_SIZE is greater than 0.
  2. Enable the result cache by using DBMS_RESULT_CACHE.BYPASS (FALSE).
  3. Add the deterministic clause to the function definition.
  4. Add the RELIES_ON clause to the function definition.
  5. Add the RESULT_CACHE clause to the function definition.

Question 12

Examine this block: Which two will be correct after line 5?

  1. va. LAST and va. LIMIT will return the same value.
  2. va. LAST and va. COUNT will return the same value.
  3. va. LIMIT and va. COUNT will return the same value.
  4. va. LIMIT and va. NEXT (199) will return the same value.
  5. va. LAST will return 200.
  6. va. NEXT (199) will return NULL.

Question 13

Examine this code: You want to display the contents of CREATE_LIST. Which two lines need to be corrected in the PL/SQL block?

  1. Line 2
  2. Line 3
  3. Line 5
  4. Line 6
  5. Line 7

Question 14

Examine the following SQL statement: ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=3; What is the result of executing this statements?

  1. The PL/SQL optimize level for some existing PL/SQL units will be changed as an immediate result.
  2. The PL/SQL optimize level for subsequently complied PL/SQL units will be set to 3 and inlining will be enabled.
  3. The PL/SQL optimize level for subsequently compiled PL/SQL units will be set to 3 and inlining will be disabled.
  4. This statement will fail because PLSQL_OPTIMIZE_LEVEL can only be set at the system level,

Question 15

Which two statements describe actions developers can take to make their application less vulnerable to security attacks?

  1. Include the AUTHID DEFINER clause in stored program units.
  2. Do not concatenate unchecked user input into dynamically constructed SQL statements.
  3. Switch from using DBMS_SQL to EXECUTE IMMEDIATE.
  4. Include the AUTHID CURRENT_USER clause in stored program units.
  5. Increase the amount of code that is accessible to users by default.