[2021.2] Try free online Oracle 1Z0-148 practice test by Pass4itsure

Are you ready enough for the 1Z0-148 exam? Recommended, simple and wise method: Download Pass4itsure Oracle 1Z0-148 dumps https://www.pass4itsure.com/1z0-148.html (1Z0-148 Dumps Q&As: 158). Taking the 1Z0-148 practice test can help you understand your weaknesses and strengths in the subject of the syllabus.

Oracle 1Z0-148 pdf free

[q1-q13, free pdf] Oracle 1Z0-148 pdf dumps download from Drive https://drive.google.com/file/d/1uu0aZTHOOuNpyj66SQG5y5d-e0d6V9qH/view?usp=sharing

Welcome to Oracle 1Z0-148 practice test online

QUESTION 1
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.
Correct Answer: CD

QUESTION 2
The database instance was recently started up. Examine the following parameter settings for the database instance:
NAME TYPE VALUE
………
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
………
You reset the value for the result_cache_max_size parameter by issuing the following command:
SQL> ALTER SYSTEM SET result_cache_max_size = 1056k SCOPE = BOTH;
System altered.
Which statement is true in this scenario?
A. 1056 KB is allocated for the result cache and the result cache is enabled.
B. 1056 KB is allocated for the result cache, but the result cache is disabled.
C. The results for only the queries that have the RESULT_CACHE hint are cached.
D. The results for all the queries except those having the NO_RESULT_CACHE hint are cached.
Correct Answer: B


QUESTION 3
View the Exhibit and examine the code in the PL/SQL block.
The PL/SQL block generates an error on execution. What is the reason?

1z0-148 exam questions-q3

A. The DELETE(n) method cannot be used with varrays.
B. The DELETE(n) method cannot be used with nested tables.
C. The NEXT method cannot be used with an associative array with VARCHAR2 key values.
D. The NEXT method cannot be used with a nested table from which an element has been deleted.
Correct Answer: A

QUESTION 4
Which statement describes the purpose of the plshprof command?
A. It produces HTML output from raw profiler output.
B. It produces HTML output from profiler tables in the database.
C. It populates profiler tables in the database from raw profiler output.
D. It produces raw profiler output on the most recently run applications.
Correct Answer: A
QUESTION 5
Identify two factors that you consider for compiling a PL/SQL program unit for interpreted mode. (Choose two.)
A. a PL/SQL program which needs to be recompiled frequently
B. a PL/SQL program that spends most of the time executing SQL
C. a PL/SQL program, which performs computation-intensive procedural operations and is recompiled rarely
D. a PL/SQL program, which is called frequently with the same parameter values by multiple sessions and is recompiled
rarely
Correct Answer: AB


QUESTION 6
Examine the structure of the DEPARTMENTS table. Name Null? Type
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
LOCATION_ID NUMBER(4)
View the Exhibit and examine the code that you plan to use for creating a package to obtain the details of an employee
using a host variable on the client side.
In SQL*Plus, you plan to use the following commands:
SQL> VARIABLE x REFCURSOR
SQL> EXECUTE emp_data.get_emp(195,:x)
SQL> PRINT x
Which statement is true about the above scenario?

1z0-148 exam questions-q6

A. The package executes successfully and passes the required data to the host variable.
B. The package specification gives an error on compilation because cursor variable types cannot be defined in the
specification.
C. The package specification gives an error on compilation because the cursor variable parameter was specified before
you defined it.
D. The package executes successfully, but does not pass the required data to the host variable because the cursor is
closed before the PRINT statement runs.
Correct Answer: D

QUESTION 7
This result cache is enabled for the database instance. Examine this code for a PL/SQL function:

1z0-148 exam questions-q7

Which two actions would ensure that the same result will be consistently returned for any session when the same input
value is passed to the function?
A. Add a parameter, fmt, and change the RETURN statement to: RETURN TO_CHAR (date_hired, fmt);
B. Set the RESULT_CACHE_MODE parameter to FORCE.
C. Increase the value for the RESULT_CACHE_MAX_SIZE parameter.
D. Change the return type of GET_HIRE_DATE to DATE and have each session invoke the TO_CHAR function.
E. Set the RESULT_CACHE_MAX_RESULT parameter to 0.
Correct Answer: BD

QUESTION 8
View the Exhibit and examine the settings for the PLSQL_CODE_TYPE parameter.
After sometime, the user recompiles the procedure DISPLAY_SAL_INFO by issuing the following command:
SQL> ALTER PROCEDURE display_sal_info COMPILE;
Which statement would be true in this scenario?

1z0-148 exam questions-q8

A. The procedure would be invalidated.
B. The procedure would remain as NATIVE code type.
C. The procedure would be changed to INTERPRETED code type.
D. The command would produce an error and the procedure must be compiled using the PLSQL_CODE_TYPE attribute
with value INTERPRETED.
Correct Answer: C

QUESTION 9
Examine these statements:

1z0-148 exam questions-q9

Which two corrections will allow this anonymous block to execute successfully?
A. Add wk# .NEXT; before the 7thline.
B. Add i PLS_INTEGER; before the 3rdline.
C. Add wk#. EXTEND (1); before the 5thline.
D. Change line #2 to wk# tp_test# := tp_test# (tp_rec# ());
E. Replace lines 5 and 6 with wk# (i) := tp_rec# (i, i);
Correct Answer: CE


QUESTION 10
Examine the structure of the EMPLOYEES table that exists in your schema. Name Null? Type
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
DEPARTMENT_ID NUMBER(4)
You successfully create a GET_MAX procedure to find the maximum salary in the department of a specified employee.
You then code a PL/SQL block to display the maximum salary in the departments of the first five employees in the
EMPLOYEES table.
View the Exhibit. Examine the procedure and the block of PL/SQL code.
What is the outcome of executing the block of PL/SQL code?

1z0-148 exam questions-q10

A. It executes successfully and gives the required output.
B. It gives an error because ROWNUM cannot be used in cursor definitions.
C. It gives an error because usage of the %ROWCOUNT attribute is not valid.
D. It executes successfully, but does not give the required output because the procedure call resets the %ROWCOUNT
value.
Correct Answer: A

QUESTION 11
Identify three guidelines for the DBMS_ASSERT package. (Choose three.)
A. Prefix all calls to DBMS_ASSERT with the SYS schema name.
B. Embed DBMS_ASSERT verification routines inside the injectable string.
C. Escape single quotes when you use the ENQUOTE_LITERAL procedure.
D. Define and raise exceptions explicitly to handle DBMS_ASSERT exceptions.
E. Prefix all calls to DBMS_ASSERT with a schema name that owns the subprogram that uses the DBMS_ASSERT
package.
Correct Answer: ACD


QUESTION 12
Examine this code:
CREATE PROCEDURE list_products_dynamic(p_product_name VARCHAR2 DEFAULT NULL) AS
TYPE cv_pordtyp IS REF CUSRSOR;
cv cv_prodtyp;
v_prodname prod_info.name%TYPE;
v_listprice prod_info.price%TYPE;BEGIN
OPEN cv FOR \\’SELECT name, price FROM prod_info WHERE name LIKE “%\\’ ||p_product_name || \\’%\\'”;
LOOP
FETCH cv INFO v_prodname, v_listprice;
EXIT WHEN cv%NOTFOUND;
DBMS_OUTPU.PUT_LINE (\\’Product Info:\\’||v_prodname||\\’,\\’||v_listprice);
END LOOP;
CLOSE cv; END
Which two are valid correlations to the code to avoid or mitigate SQL Injection?
A. CREATE PROCEDURE list_products_dynamic (p_product_name VARCHAR2 DEFAULT NULL) AS TYPE
cv_pordtyp IS REF CURSOR; cv cv_prodtyp; v_prodname prod_info.name%TYPE; v_listprice prod_info.price%TYPE;
v_bind VARCHAR2 (400); BEGIN v_bind := ‘%’ | | p_product_name | | ‘%’; OPEN cv FOR ‘SELECT name, price
FROM prod_info WHERE name LIKE :b’ USING v_bind; LOOP FETCH cv INTO v_prodname, v_listprice; EXIT WHEN
cv%NOTFOUND; DBMS_OUTPU.PUT_LINE (‘Product Info: ‘ | | v_prodname | | ‘,’ | | v_listprice); END LOOP; CLOSE
cv; END;
B. CREATE PROCEDURE list_products_dynamic (p_product_name VARCHAR2 DEFAULT NULL) AS v_bind
VARCHAR2 (400); BEGIN v_bind := ‘%’ | | p_prodname | | ‘%’; FOR rec IN (‘SELECT name, price FROM prod_info
WHERE name like ‘ | | v_bind) LOOP DBMS_OUTPUT.PUT_LINE (‘Product Info: ’ | | rec.name | | ‘,’ | | rec.price);
END LOOP; END;
C. CREATE PROCEDURE list_products_dynamic (p_product_name VARCHAR2 DEFAULT NULL) AS TYPE
cv_pordtyp IS REF CURSOR; cv cv_prodtyp; v_prodname prod_info.name%TYPE; v_listprice prod_info.price%TYPE;
v_bind VARCHAR2 (400); BEGIN v_bind := ’’’%’ | | p_product_name | | ‘%’’’; OPEN cv FOR ‘SELECT name, price
FROM prod_info WHERE name LIKE ’ | | v_bind; LOOP FETCH cv INTO v_prodname, v_listprice; EXIT WHEN
cv%NOTFOUND; DBMS_OUTPU.PUT_LINE (‘Product Info: ‘ | | v_prodname | | ‘,’ | | v_listprice); END LOOP; CLOSE
cv; END;
D. CREATE PROCEDURE list_products_dynamic (p_product_name VARCHAR2 DEFAULT NULL) AS TYPE
cv_pordtyp IS REF CURSOR; cv cv_prodtyp; v_prodname prod_info.name%TYPE; v_listprice prod_info.price%TYPE;
v_bind VARCHAR2 (400); BEGIN v_bind := ‘%’ | | p_product_name | | ‘%’; OPEN cv FOR ‘SELECT name, price
FROM prod_info WHERE name LIKE ’ | | v_bind; LOOP FETCH cv INTO v_prodname, v_listprice; EXIT WHEN
cv%NOTFOUND; DBMS_OUTPU.PUT_LINE (‘Product Info: ‘ | | v_prodname | | ‘,’ | | v_listprice); END LOOP; CLOSE
cv; END;
E. CREATE PROCEDURE list_products_dynamic (p_product_name VARCHAR2 DEFAULT NULL) AS TYPE
cv_pordtyp IS REF CURSOR; cv cv_prodtyp; v_prodname prod_info.name%TYPE;
v_listprice prod_info.price%TYPE;
v_bind VARCHAR2 (400);
BEGIN
v_bind := DBMS_ASSERT.ENQUOTE_LITERAL (‘%’ | | p_product_name | | ‘%’);
OPEN cv FOR ‘SELECT name, price FROM prod_info WHERE name LIKE ’ | | v_bind;
LOOP
FETCH cv INTO v_prodname, v_listprice;
EXIT WHEN cv%NOTFOUND;
DBMS_OUTPU.PUT_LINE (‘Product Info: ‘ | | v_prodname | | ‘,’ | | v_listprice);
END LOOP;
CLOSE cv;
END;
Correct Answer: BD

QUESTION 13
Which two statements are true about the query results stored in the query result cache? (Choose two.)
A. If any of the tables used to build a query is modified by an ongoing transaction in the current session, the query result
is not cached.
B. A query result based on a read-consistent snapshot of data that is older than the latest committed version of the data
is not cached.
C. Adding the RESULT_CACHE hint to inline views enables optimizations between the outer query and the inline view,
and the query result is cached.
D. A query result for a query that has a bind variable is stored in the cache and is reused if the query is equivalent even
when the bind variable has a different value.
Correct Answer: AB

to sum up:

Free Oracle 1Z0-148 online practice tests to help test your true strength! Oracle 1Z0-148 dumps pdf download online! The Visit Here: https://www.pass4itsure.com/1z0-148.html latest 1Z0-148 exam dumps can help you pass your first exam! Pass4itsure 1Z0-148 practice test can ensure that they have acquired the necessary skills and experience in the 1Z0-148 exam.