Which two statements are true about the usage of the DBMS_DESCRIBE.DESCRIBE_PROCEDURE procedure? (Choose two.)
A. You can describe remote objects.
B. You can describe anonymous PL/SQL blocks.
C. You can describe a stored procedure, stored function, packaged procedure, or packaged function.
D. You can obtain information about the position, name, and data type of the arguments of a procedure.
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.
Which two statements are true about associative arrays and nested tables? (Choose two.)
A. Only associative arrays can hold an arbitrary number of elements.
B. Only nested tables can be used as column types in database tables.
C. Both associative arrays and nested tables can hold an arbitrary number of elements.
D. Both associative arrays and nested tables can be used as column types in database tables.
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
The result cache is enabled for the database instance.
Examine the following code for a PL/SQL function:
CREATE OR REPLACE FUNCTION get_hire_date (emp_id NUMBER) RETURN
VARCHAR
RESULT_CACHE RELIES_ON (HR.EMPLOYEES)
IS
date_hired DATE;
BEGIN
SELECT hire_date INTO date_hired
FROM HR.EMPLOYEES
WHERE EMPLOYEE_ID = emp_id;
RETURN TO_CHAR(date_hired);
END;
Which statement is true in this scenario?
A. If sessions have different NLS_DATE_FORMAT settings, cached results have different formats.
B. The function results are not cached because the query used in the function returns the DATE data type.
C. If sessions have different NLS_DATE_FORMAT settings, cached results have same formats because the function's return type is VARCHAR.
D. If a function is executed with same argument value but different NLS_DATE_FORMAT for the session, the cached result is overwritten with the new function result.
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.
You created a PL/SQL function with the RESULT_CACHE clause, which calculates a percentage of total
marks for each student by querying the MARKS table.
Under which two circumstances will the cache for this function not be used and the function body be
executed instead?
A. When a user fixes incorrect marks for a student, with an update to the MARKS table, and then executes the function in the same session
B. When the amount of memory allocated for the result cache is increased
C. When the function is executed in a session frequently with the same parameter value
D. When the database administrator disables the result cache during ongoing application patching
E. When the maximum amount of server result cache memory that can be used for a single result is set to
0.
Examine this code:
CREATE TYPE list_typ IS TABLE OF NUMBER;
/
DECLARE
l_list list_typ := list_typ ();
Which two executable sections will display the message TRUE?
A. BEGIN IF l_list.LIMIT IS NOT NULL THEN DBMS_OUTPUT.PUT_LINE (‘TRUE’); END IF; END;
B. BEGIN l_list.EXTEND; IF l_list.PRIOR (1_list.FIRST) IS NULL THEN DBMS_OUTPUT.PUT_LINE (‘TRUE’); END IF; END;
C. BEGIN l_list.EXTEND; IF l_list IS EMPTY THEN DBMS_OUTPUT.PUT_LINE (‘TRUE’); END IF; END;
D. BEGIN IF l_list.FIRST IS NULL THEN DBMS_OUTPUT.PUT_LINE (‘TRUE’); END IF; END;
E. BEGIN IF l_list.FIRST =1 THEN DBMS_OUTPUT.PUT_LINE (‘TRUE’); END IF; END;
Identify the three options which make a PL/SQL function highly suitable for using the RESULT_CACHE clause in its definition. (Choose three.)
A. The tables which are read in the function are very frequently updated.
B. The code in the function performs more write operations on the database when compared to the read operations.
C. The function has complex business logic depending on more than five tables to compute its return values.
D. The function involves highly computational logic with minimal or no database access.
E. The value returned by the function is deterministic for a given set of input parameters.
F. The logic in the function accesses tables or uses package variables which are modified very rarely.
Examine this function that is using the RESULT_CACHE clause: After executing the function twice, passing 100 and 150 as input parameters, the LOCATIONS table is updated for LOCATION_ID = 100.

Which statement is correct if the function is called again, passing 150 as the input parameter?
A. The function is executed again because the database checks for changes to the LOCATIONS table each time the function is called.
B. The results are retrieved from the results cache because the LOCATIONS table was not updated for LOCATION_ID = 150.
C. The results are retrieved from the results cache because not enough rows of the LOCATIONS table were modified to cause invalidation.
D. The function is executed again because the result cache was invalidated when the LOCATIONS table was updated.