Q1. Which two types of query results cannot be stored in the query result cache? (Choose two.)
A. subquery results
B. results of a query having the SYSDATE function
C. results of a query having the GROUP BY clause
D. results of a query having the DATE data type in the WHERE clause
Answer: A,B
Q2. Examine the structure of the PRINT_MEDIA table: Name Null? Type
ADVT_ID NUMBER ADVT_SOURCE CLOB Examine the following PL/SQL block:
DECLARE
lobloc CLOB;
buffer VARCHAR2(100);
amount NUMBER;
offset NUMBER :=1;
BEGIN
buffer :='This is the second line of a new document'
amount := LENGTH(buffer);
SELECT advt_source INTO lobloc FROM print_media WHERE advt_id=2 FOR UPDATE;
DBMS_LOB.WRITE(lobloc,amount,offset,buffer);
COMMIT;
END;
/
What must be the value in the ADVT_SOURCE column for the above code to execute
successfully?
A. null
B. an empty locator
C. a non-NULL value
D. either null or any non-NULL values
Answer: C
Q3. To examine the dependencies between all PL/SQL objects and the tables and views they reference, you executed the following query as the user OE:
SQL> SELECT owner || '.' || NAME refs_table
, referenced_owner || '.' || referenced_name AS table_referenced
FROM all_dependencies
WHERE owner = USER
AND TYPE IN ('PACKAGE', 'PACKAGE BODY','PROCEDURE', 'FUNCTION')
AND referenced_type IN ('TABLE', 'VIEW')
AND referenced_owner NOT IN ('SYS', 'SYSTEM')
ORDER BY owner, NAME, referenced_owner, referenced_name;
Which statement is true about the output of the query?
A. It displays all PL/SQL code objects created by user OE that reference any table or view owned by other users except SYS and SYSTEM..
B. It displays no rows because this query needs to be executed as the user SYS for required results.
C. It displays all PL/SQL code objects that reference a table or view directly for all the users in the database.
D. It displays only those PL/SQL code objects created by the user OE that reference a table or view created by the user SYS.
Answer: A
Q4. Which two statements correctly describe the features of SecureFiles? (Choose two.)
A. Compression does not entail table or index compression and vice-versa.
B. Encryption stores the encryption keys for the LOB columns inside the database.
C. Encryption stores the encryption keys for the LOB columns outside the database.
D. Compression stores identical data occurring two or more times in the same LOB column as a single copy for the table.
Answer: A,C
Q5. Which two statements are true about associative arrays and varrays? (Choose two.)
A. Only varrays must use sequential numbers as subscripts.
B. Only varrays can be used as column types in database tables.
C. Both associative arrays and varrays must use sequential numbers as subscripts.
D. Both associative arrays and varrays can be used as column types in database tables.
Answer: A,B
Q6. Examine the structure of the PRODUCTS table. Name Null? Type
PRODUCT_ID NOT NULL NUMBER(6)
PRODUCT_NAME VARCHAR2(50)
CATEGORY_ID NUMBER(2)
SUPPLIER_ID NUMBER(6)
LIST_PRICE NUMBER(8,2)
View the Exhibit and examine the PL/SQL block.
On execution, the PL/SQL block generates the following error:
ORA-01001: invalid cursor
What could be the reason?
A. Both the cursor variable arguments should have been passed in IN mode.
B. The contents of one cursor variable cannot be assigned to another cursor variable using the := operator.
C. The CLOSE statement closes both the cursor variables, therefore the last FETCH statement cannot execute.
D. The name of the cursor variables defined and the name of the cursor variables passed as arguments must be the same.
Answer: C
Q7. Identify the method that is used by fine-grained access (FGA).
A. using policy functions to generate predicates dynamically
B. creating triggers on corresponding tables to generate dynamic predicates
C. modifying the existing application code to include a predicate for all SQL statements
D. creating views with necessary predicates, and then creating synonyms with the same name as the tables
Answer: A
Q8. 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;
You notice that results for the functions are not used effectively. What do you recommend for better utilization of the result cache? (Choose all that apply.)
A. Set the RESULT_CACHE_MODE parameter to FORCE.
B. Increase the value for the RESULT_CACHE_MAX_SIZE parameter.
C. Add a format mask parameter, such as RETURN TO_CHAR(date_hired, fmt) to GET_HIRE_DATE.
D. Change the return type of GET_HIRE_DATE to DATE and have each session invoke the TO_CHAR function.
Answer: C,D
Q9. You created a PL/SQL function with the RESULT_CACHE and RELIES_ON clauses. In which scenarios is the cached result bypassed? (Choose all that apply.)
A. when the size for the memory allocated for the result cache is increased
B. when the function is executed in a session frequently with the same parameter value
C. when the database administrator has disabled the use of the result cache during application patching
D. when a data manipulation language (DML) statement is executed in a session on a table or view that was specified in the RELIES_ON clause of a result-cached function
Answer: C,D
Q10. Which two statements are true about the initialization of internal LOBs? (Choose two.)
A. The EMPTY_CLOB() and EMPTY_BLOB() functions can be used to initialize only null internal LOBs.
B. The EMPTY_CLOB() and EMPTY_BLOB() functions can be used to initialize only non-NULL internal LOBs.
C. The EMPTY_CLOB() and EMPTY_BLOB() functions can be used to initialize both null and non-NULL internal LOBs.
D. The CLOB and BLOB columns can be initialized only by using the EMPTY_CLOB() and EMPTY_BLOB() functions, respectively.
E. The CLOB and BLOB columns can be initialized with a character or raw string, respectively, provided they are less than 4000 bytes in size.
Answer: C,E