Your success in Oracle 1Z0-146 is our sole target and we develop all our 1Z0-146 braindumps in a way that facilitates the attainment of this target. Not only is our 1Z0-146 study material the best you can find, it is also the most detailed and the most updated. 1Z0-146 Practice Exams for Oracle Database 11g 1Z0-146 are written to the highest standards of technical accuracy.
♥♥ 2021 NEW RECOMMEND ♥♥
Free VCE & PDF File for Oracle 1Z0-146 Real Exam (Full Version!)
★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions
Free Instant Download NEW 1Z0-146 Exam Dumps (PDF & VCE):
Available on:
http://www.surepassexam.com/1Z0-146-exam-dumps.html
Q41. When do you use static SQL as a technique for avoiding SQL injection?
A. when the WHERE clause values are unknown
B. when the code contains data definition language (DDL) statements
C. when all Oracle identifiers are known at the time of code compilation
D. when the SET clause values are unknown at the time of code compilation
Answer: C
Q42. You have an external C procedure stored in a dynamic-link library (DLL).
The C procedure takes an integer as argument and returns an integer. You want to invoke the C procedure through a PL/SQL program.
View the Exhibit.
Which statement is true about the C_OUTPUT PL/SQL program?
A. It invokes the external C procedure.
B. It only publishes the external C procedure.
C. It fails because the external C procedure is not published.
D. It fails because the input data type is BINARY_INTEGER and the external C procedure expects an integer.
Answer: C
Q43. Examine the following line of code that is part of a PL/S QL application: stmt:='SELECT session_id FROM sessions WHERE ' || p_where_stmt; Identify a solution for preventing SQL injection in the above code.
A. Replace P_WHERE_STMT with a bind variable.
B. Do not use APIs that allow arbitrary query parameters to be exposed.
C. Use the RESTRICT_REFERENCES clause in the PL/SQL subprogram that contains the code.
D. Use DBMS_SQL to detect that the expression provided for P_WHERE_STMT is free from SQL injection.
Answer: B
Q44. View the Exhibit and examine the structure of the EMPLOYEES table.
Examine the following PL/SQL block for storing the salary of all sales representatives from the
EMPLOYEES table in an associative array:
1 DECLARE
2 emp_cv SYS_REFCURSOR;
3 TYPE list IS TABLE OF emp_cv;
4 sals list;
5 BEGIN
6 OPEN emp_cv FOR SELECT salary FROM employees
7 WHERE job_id = 'SA_REP'
8 FETCH emp_cv BULK COLLECT INTO sals;
9 CLOSE emp_cv;
10 END;
What should you correct in the above code to ensure that it executes successfully?
A. Replace EMP_CV in line 3 with employees.salary%TYPE.
B. Replace line 2 with TYPE refcur IS REF CURSOR; emp_cv refcur;.
C. Replace BULK COLLECT in line 8 with the OPEN, FETCH, LOOP, and CLOSE statements.
D. Replace line 2 with TYPE refcur IS REF CURSOR RETURN employees.salary%TYPE; emp_cv refcur;.
Answer: A
Q45. Which two statements are true about the OPEN and FILEOPEN routines in the DBMS_LOB package? (Choose two.)
A. OPEN can be used to open only internal LOBs in the indicated mode.
B. FILEOPEN can be used to open only external LOBs in the indicated mode.
C. OPEN can be used to open internal and external LOBs in the indicated mode.
D. FILEOPEN can be used to open internal and external LOBs in the indicated mode.
Answer: B,C
Q46. View Exhibit1 and examine the structure of the EMPLOYEES and DEPARTMENTS tables existing in your schema.
View Exhibit2 and examine the PL/SQL block that you execute to display the department-wise incremented salary for all the departments in your company.
The code generates an error on execution.
What correction should be done to ensure the code executes successfully?
A. The cursor variable parameter should be passed in IN OUT mode.
B. The cursor variable should be defined as a strong REF CURSOR type.
C. The cursor variable name passed as actual and formal parameters should be identical.
D. The %NOTFOUND cursor attribute cannot be used with the cursor variables and should be replaced with a user defined exception.
Answer: A
Q47. 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
Q48. 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.
Answer: C,D
Q49. You issue this command to create a table called LOB_STORE:
CREATE TABLE lob_store
(lob_id NUMBER(3),
photo BLOB DEFAULT EMPTY_BLOB(),
cv CLOB DEFAULT NULL,
ext_file BFILE DEFAULT NULL)
/
What is the outcome?
A. The table is created successfully.
B. It generates an error because DEFAULT cannot be set to EMPTY_BLOB() during table creation.
C. It generates an error because DEFAULT cannot be set to null for a CLOB column during table creation.
D. It generates an error because DEFAULT cannot be set to null for a BFILE column during table creation.
Answer: A
Q50. 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)
IS
v_sql_stmt VARCHAR2(500);
BEGIN
v_sql_stmt := 'ALTER USER '||p_username ||' IDENTIFIED BY '
|| p_new_password;
EXECUTE IMMEDIATE v_sql_stmt;
END change_password;
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
Answer: D
