Act now and download your Oracle 1Z0-146 test today! Do not waste time for the worthless Oracle 1Z0-146 tutorials. Download Abreast of the times Oracle Oracle 11g: Advanced PL/SQL exam with real questions and answers and begin to learn Oracle 1Z0-146 with a classic professional.
2017 NEW RECOMMEND
Free VCE & PDF File for Oracle 1Z0-146 Real Exam
Pass on Your First TRY 100% Money Back Guarantee Realistic Practice Exam Questions
Q31. 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
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.
Q32. Examine the section of code taken from a PL/SQL program:
PROCEDURE p1 (x PLS_INTEGER) IS
PRAGMA INLINE (p1, 'NO');
x:= p1(1) + p1(2) + 17; — Call 1
x:= p1(3) + p1(4) + 17; — Call 2
Call 1 and Call 2 are the comments for distinguishing the code. The PLSQL_OPTIMIZE_LEVEL parameter is set to 3. Which two statements are true in this scenario? (Choose two.)
A. The calls to the P1 procedure are not inlined in the section commented as Call 1. B. The calls to the P1 procedure might be inlined in the section commented as Call 2.
C. The calls to the P1 procedure are inlined in both the sections commented as Call 1 and Call 2.
D. The calls to the P1 procedure are never inlined in both the sections commented as Call 1 and Call 2.
Q33. The PLSQL_OPTIMIZE_LEVEL parameter is set to 2 for the session.
Examine the section of code given:
FUNCTION p2 (p boolean) return PLS_INTEGER IS …
FUNCTION p2 (x PLS_INTEGER) return PLS_INTEGER IS
PRAGMA INLINE(p2, 'YES');
x := p2(true) + p2(3);
Which statement is true about the INLINE pragma procedure calls?
A. Only the call to the P2 function with BOOLEAN as the argument is inlined.
B. INLINE pragma affects both the functions named P2 and is called inline.
C. Only the call to the P2 function with PLS_INTEGER as the argument is inlined.
D. None of the functions are inlined because inlining is not supported for overloaded functions.
Q34. 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.
Q35. 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.
Q36. 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.
Q37. 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.
Q38. Examine the structure of the EMPLOYEES table in the SCOTT schema. Name Null? Type
EMPLOYEE_ID NOT NULL NUMBER(6)
LAST_NAME NOT NULL VARCHAR2(25)
SALARY NOT NULL NUMBER(8,2)
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.
Q39. Which two are major approaches that can be used to reduce the SQL injection by limiting user input? (Choose two.)
A. Restrict users accessing specified web page.
B. Use NUMBER data type if only positive integers are needed.
C. Use dynamic SQL and construct it through concatenation of input values.
D. In PL/SQL API, expose only those routines that are intended for customer use.
Q40. A procedure is created in the SYS schema to allow users to change the password as follows:
CREATE OR REPLACE
PROCEDURE change_password(p_username VARCHAR2 DEFAULT NULL,
p_new_password VARCHAR2 DEFAULT NULL)
v_sql_stmt := 'ALTER USER '||p_username ||' IDENTIFIED BY '
EXECUTE IMMEDIATE v_sql_stmt;
The SYS user has granted EXECUTE privilege on the procedure to the OE user. But OE is able to change the password for SYS by using this procedure. How would you protect this?
A. by using the procedure as part of a PL/SQL package
B. by using a bind argument with dynamic SQL in the procedure
C. by using AUTHID DEFINER in the procedure to implement the definer's right
D. by using AUTHID CURRENT_USER in the procedure to implement the invoker's right