Exit demo 1Z0-148 Oracle Database: Advanced PL/SQL PDF format · free preview

Oracle 1Z0-148 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/1z0-148.html

Question 1
Single choice

Examine the following error:

SQL> DECLARE

v_runid NUMBER;

BEGIN

v_runid := DBMS_HPROF.ANALYZE (LOCATION => 'PROFILE_DATA',

FILENAME => 'pd_cc_pkg.txt');

DBMS_OUTPUT.PUT_LINE('Run ID: ' || v_runid);

END;

DECLARE

*

ERROR at line 1:

ORA-00942: table or view does not exist

ORA-06512: at "SYS.DBMS_HPROF", line 299

ORA-06512: at line 4

What would you do to execute the above block successfully?

A.

Start the PL/SQL profiler before executing the block.

B.

Run the tracetab.sql script located at ORACLE_HOME\RDBMS\ADMIN.

C.

Run the dbmshptab.sql script located at ORACLE_HOME\RDBMS\ADMIN.

D.

Grant READ and WRITE privileges to the current user on the PROFILE_DATA directory object.

Question 2
Single choice

Identify the component of the PL/SQL hierarchical profiler that uploads the result of profiling into database tables.

A.

the trace file component

B.

the analyzer component

C.

the shared library component

D.

the data collection component

Question 3
Multiple choice

Identify the two types of PL/SQL programs for which you consider setting the compilation method to native mode. (Choose two.)

A.

PL/SQL programs that are still in the debugging phase of development

B.

PL/SQL programs that have computation-intensive procedural operations

C.

A PL/SQL program, which is called with the same parameters by multiple sessions

D.

PL/SQL programs that spend most of their execution time in executing SQL statements

Question 4
Multiple choice

Examine the settings for a user session given below:

RESULT_CACHE_MODE= FORCE
What would be the implications of this setting on query execution?
(Choose all that apply.)

A.

All query results are stored in the result cache if possible.

B.

Query results that are bigger than the available space in the result cache are not cached.

C.

Query results are stored only when you explicitly use the /*+ result_cache */ hint in your query.

D.

Query results are stored even when you explicitly use the /*+ no_result_cache */ hint in your query.

Question 5
Multiple choice

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.

Question 6
Single choice

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

Question 7
Single choice

You created the SALES_ORDERS_CTX context to use the OE.SALES_ORDERS_PKG package.

View Exhibit1 and examine the package that is used with the context.

View Exhibit2 to examine the policy defined and the logon trigger.

A user receives the following error when he or she executes a query:

ERROR at line 2:

ORA-28112: failed to execute policy function

What could be the reason for the error?

A.

The user has insufficient privileges on the DBMS_SESSION package.

B.

The subprograms inside the package have not been created with the invoker's right.

C.

The THE_PREDICATE function has an insufficient number of parameters in the package.

D.

The policy is created by using SALES_ORDERS_PKG.THE_PREDICATE without a parameter.

Question 8
Multiple choice

In which two situations is the body of a result-cached function executed? (Choose two.)

A.

if the memory allocated for the result cache is increased

B.

if a session on this database instance invokes the function with the same parameter values

C.

if the first time a session on this database instance invokes the function with a parameter value

D.

if a session executes a data manipulation language (DML) statement on a table or view that was specified in the RELIES_ON clause of a result-cached function

Question 9
Single choice

View Exhibit1 and examine the structure of the EMPLOYEES table.

View Exhibit2 and examine the code in the PL/SQL block.

The PL/SQL block fails to execute.

What could be the reason?

A.

Nested tables cannot be returned by a function.

B.

The NEWNAMES nested table has not been initialized.

C.

The assignment operator cannot be used to transfer all the element values from GROUP1 to GROUP2.

D.

The third element of OLDNAMES cannot be assigned to the third element of GROUP1 because they are of inconsistent data types.

E.

LAST_NAME values cannot be assigned to the V_LAST_NAMES nested table because local collection types are not allowed in SQL statements.

Question 10
Multiple choice

Examine the code in the following PL/SQL block:

DECLARE

TYPE NumList IS TABLE OF INTEGER;

List1 NumList := NumList(11,22,33,44);

BEGIN

List1.DELETE(2);

DBMS_OUTPUT.PUT_LINE

( 'The last element# in List1 is ' || List1.LAST ||

' and total of elements is '||List1.COUNT);

List1.EXTEND(4,3);

END;

/

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.

Showing 10 of 243 questions · Unlock the full set