A good Oracle 1Z0-146 Documentation is one of the brightest occupation proceeds you can make on your own if youre fitness professional section of a 1Z0-146 brand to acquire a Oracle. It ensures that you just owned by that group and automatically confers characteristics of skilled, dependable, and equipped onto you actually. Becoming on the net 1Z0-146 qualifications education around can improve practical experience in addition to know-how.
2021 Oct 1Z0-146 study guide
Q1. Identify two methods for immunizing PL/SQL code against SQL injection attacks. (Choose two.)
A. Use bind arguments.
B. Validate all input concatenated to dynamic SQL.
C. Use dynamic SQLs constructed using concatenation of input values.
D. Use subprograms as part of packages instead of stand-alone subprograms.
Q2. Examine the structure of the PRODUCTS table. Name Null? Type
PRODUCT_ID NOT NULL NUMBER(6)
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.
Q3. View the Exhibit and examine the PL/SQL code.
Which statement is true about the execution of the PL/SQL code?
A. It executes successfully and displays 101 and 200000 values.
B. The ASSIGN_VAL function generates an error during compilation because nested tables cannot be returned by functions.
C. The SELECT statement generates an error because the nested table has not been initialized in the ASSIGN_VAL function.
D. The ASSIGN_VAL function generates an error during compilation because the EXTEND method cannot be used with nested tables.
Q4. Examine the structure of the PRINT_MEDIA table: Name Null? Type
ADVT_ID NUMBER ADVT_SOURCE CLOB Examine the following PL/SQL block:
offset NUMBER :=1;
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;
What must be the value in the ADVT_SOURCE column for the above code to execute
B. an empty locator
C. a non-NULL value
D. either null or any non-NULL values
Q5. 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
Up to date 1Z0-146 exam answers:
Q6. Examine the structure of the TEST_DETAILS table: Name Null? Type
TEST_ID NUMBER DESCRIPTION CLOB DESCRIPTION data was entered earlier and saved for TEST_ID 12.
You execute this PL/SQL block to add data to the end of the existing data in the DESCRIPTION column for TEST_ID 12:
SELECT description INTO clob_loc FROM test_details WHERE test_id = 12 ;
buf := '0123456789'
It generates an error on execution.
What correction should you do to achieve the required result?
A. WRITEAPPEND must be replaced with APPEND.
B. The BUF variable data type must be changed to CLOB. C. FOR UPDATE must be added to the SELECT statement.
D. The GETLENGTH routine must be replaced with the LENGTH built-in function in WRITEAPPEND.
Q7. Examine the code in the following PL/SQL block:
TYPE NumList IS TABLE OF INTEGER;
List1 NumList := NumList(11,22,33,44);
( 'The last element# in List1 is ' || List1.LAST ||
' and total of elements is '||List1.COUNT);
Which two statements are true about the above code? (Choose two.)
A. LAST and COUNT give different values.
B. LAST and COUNT give the same values.
C. The four new elements that are added contain the value 33.
D. The four new elements that are added contain the value 44.
Q8. Which two statements are true about the tuning of PL/SQL code? (Choose two.)
A. Redundant SQL statements in PL/SQL code should be avoided.
B. Implicit data type conversion in PL/SQL code can improve performance.
C. Usage of the NOT NULL constraint in PL/SQL code can degrade performance.
D. If you have one PL/SQL program unit instead of multiple smaller executable sections, performance can be improved.
Q9. 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)
SELECT hire_date INTO date_hired
WHERE EMPLOYEE_ID = emp_id;
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.
Q10. Which three actions can be performed by using the DBMS_ASSERT package to prevent SQL injection? (Choose three.)
A. Detect a wrong user.
B. Check input string length.
C. Verify qualified SQL names. D. Validate TNS connect strings.
E. Verify an existing schema name.
F. Enclose string literals within double quotation marks.