Q1. View the Exhibit and examine the procedure to create a trigger name based on the table name supplied to the procedure.
Which three statements are appropriate for protecting the code in the procedure from SQL injection? (Choose three.)
A. Explicitly validate the identifier length limit.
B. Add AUTHID DEFINER to the definition of the procedure.
C. Use PRAGMA RESTRICT_REFERENCES in the procedure.
D. Filter out control characters in user-supplied identifier names.
E. Use the object ID of the table from the data dictionary to build the trigger name.
Answer: A,D,E
Q2. Which two statements are true about cursor variables? (Choose two.)
A. A cursor variable points to the current row in the result set of a multirow query stored in a work area.
B. A cursor variable is an explicitly named work area in which the results of different multirow queries can be stored.
C. A cursor variable can be used only if a query is performed and its results are processed in the same subprogram.
D. A cursor variable can be used to perform a query in one subprogram, and process the results in a different subprogram.
Answer: A,D
Q3. Examine the structure of the EMPLOYEES table in the SCOTT schema. Name Null? Type
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
SALARY NOT NULL NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
DEPARTMENT_ID NUMBER(4)
View the Exhibit and examine the code for the EMP_TOTSAL procedure created by user SCOTT.
Which statement is true regarding the EMP_TOTSAL procedure?
A. It is created successfully, but displays the correct output message only for existent employee IDs.
B. It is created successfully and displays the correct output message for both existent and nonexistent employee IDs.
C. It generates an error because the %NOTFOUND attribute cannot be used in combination with a SELECT INTO statement.
D. It generates an error because a user-defined exception has to be included whenever the %NOTFOUND attribute is used in combination with a SELECT INTO statement.
Answer: A
Q4. You enabled PL/SQL tracing in a user session using the following command:
SQL> EXECUTE DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS);
View Exhibit1 to examine the output. After some time, the query produces a different result as shown in Exhibit2.
What is the cause for the change?
A. The FOO procedure has been executed more than once.
B. The PLSQL_DEBUG parameter is set to FALSE for the user session.
C. The FOO procedure has been compiled with the DEBUG option, and executed.
D. Schema level statistics have been gathered by the database administrator (DBA).
Answer: C
Q5. View the Exhibit to examine the PL/SQL code for the GET_METADATA function. Which statement is true about the metadata gathered by the function?
A. The end result is the creation of DDL for the TIMECARDS table with all instances of the HR schema changed to SCOTT.
B. The end result is the creation of an XML document for all tables with all physical, storage, logging, and other segment attributes.
C. The end result is the creation of DDL for all tables with all instances of the HR schema changed to SCOTT along with all physical, storage, logging, and other segment attributes.
D. The end result is the creation of DDL for all tables and associated indexes with all instances of the HR schema changed to SCOTT along with all physical, storage, logging, and other segment attributes.
Answer: A
Q6. You created a PL/SQL subprogram that successfully invokes an external C procedure. After a while, the database administrator (DBA) drops the alias library schema object. The shared library exists in the system. Which statement is true in this scenario?
A. The corresponding shared library is also removed from the system.
B. PL/SQL subprograms can be used to invoke the external C procedure.
C. The existing extproc process is terminated and a new extproc is started.
D. The PL/SQL subprogram that depends on the external C program becomes invalid.
Answer: D
Q7. Which two statements are true about REF CURSOR types? (Choose two.)
A. REF CURSOR types cannot be defined inside a package.
B. SYS_REFCURSOR can be used to declare cursor variables in stored procedures and functions.
C. A REF CURSOR return type can be declared using %TYPE, or %ROWTYPE, or a userdefined record.
D. Only a weak REF CURSOR type can be used as a formal parameter of a stored procedure or function.
Answer: B,C
Q8. View the Exhibit to examine a Java source file.
You have the corresponding Java class file and you execute the command as follows:
SQL> CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
NAME 'FormatCreditCardNo.formatCard()'
Which statement is true about the command?
A. It loads the Java class method into Oracle Database and publishes it.
B. It publishes the Java class method, but the CCFORMAT PL/SQL procedure fails when it is executed.
C. It creates the CCFORMAT PL/SQL subprogram without publishing, which can be used to invoke the Java class method.
D. It publishes the Java class method and the CCFORMAT PL/SQL procedure invokes the Java class method when it is executed.
Answer: B
Q9. 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 associative arrays can use numbers and strings for subscripts.
C. Both associative arrays and nested tables can hold an arbitrary number of elements.
D. Both associative arrays and nested tables can use numbers and strings for subscripts.
Answer: B,C
Q10. Which two statements are true about the DBMS_LOB.CREATETEMPORARY procedure that is used to create a temporary LOB? (Choose two.)
A. It can be used for transforming data in permanent internal LOBs.
B. It is used only for the migration of BasicFile to the SecureFile format.
C. It is used only for the migration of the LONG column to the LOB column.
D. It creates a LOB variable that is not associated with any table and is stored in the user's temporary tablespace.
E. It creates a LOB variable that is associated with a specific table and is temporarily stored in the user's default tablespace.
Answer: A,D