Pass4itsure > Oracle > Oracle Certifications > 1Z0-148 > 1Z0-148 Online Practice Questions and Answers

1Z0-148 Online Practice Questions and Answers

Questions 4

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

Buy Now
Questions 5

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

Buy Now
Questions 6

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.

Buy Now
Questions 7

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?

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.

Buy Now
Questions 8

Which two statements are true about the context of an application? (Choose two.)

A. It is attached to a session.

B. It is owned by the user SYS.

C. A user can change the context of his or her application.

D. The PL/SQL package associated with the context must exist before the context is created.

E. The predefined attributes in the USERENV application context can be changed as per the requirements.

Buy Now
Questions 9

Examine the structure of the EMPLOYEES table in the SCOTT schema. Name Null? Type

EMPLOYEE_ID NOT NULL NUMBER(6)

FIRST_NAME VARCHAR2(20)

LAST_NAME NOT NULL VARCHAR2(25)

SALARY NOT NULL NUMBER(8,2)

COMMISSION_PCT NUMBER(2,2)

DEPARTMENT_ID NUMBER(4)

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.

Buy Now
Questions 10

Examine this external function declaration:

CREATE FUNCTION compare_and_sum(p1 PLS_INTEGER, p2 IN PLS_INTEGER, p3 IN OUT

NUMBER)

RETURN PLS_INTEGER

AS LANGUAGE C LIBRARY mylib

NAME "compareAndSum" WITH CONTEXT;

Which C function does it publish?

A. OCINumber * compareAndSum (OCIExtProcContext *ctx, OCINumber *p1, OCINumber *p2, OCINumber *p3);

B. OCINumber compareAndSum (OCIExtProcContext *ctx, OCINumber p1, OCINumber p2, OCINumber *p3);

C. int compareAndSum (OCIExtProcContext *ctx, int p1, int p2, OCINumber *p3);

D. int compareAndSum (OCIExtProcContext *ctx, int p1, int p2, OCINumber p3);

E. int compareAndSum (OCIExtProcContext *ctx, int p1, int p2, int p3);

F. int compareAndSum (OCIExtProcContext *ctx, int p1, int p2, int* p3);

G. OCINumber compareAndSum (OCIExtProcContext *ctx, OCINumber p1, OCINumber p2, OCINumber p3);

Buy Now
Questions 11

Examine this declaration section:

Which two executable sections will display the message `Summary is null'?

A. BEGIN 1_rec := NULL; 1_emp := emp_typ (1_rec); IF 1_emp (1).expr_summary IS EMPTY THEN DBMS_OUTPUT.PUT_LINE (‘Summary is null’); END IF; END;

B. BEGIN 1_rec.emp_id :=1; 1_rec.expr_summary := NULL; 1_emp :=emp_typ (1_rec); IF 1_emp(1).expr_summary IS NULL THEN DBMS_OUTPUT.PUT_LINE (‘Summary is null’); END IF; END;

C. BEGIN 1_rec.emp_id :=1; 1_rec.expr_summary := EMPTY_CLOB (); 1_emp := emp_typ (1_rec); IF 1_emp(1).expr_summary IS NULL THEN DBMS_OUTPUT.PUT_LINE (‘Summary is null’); END IF; END;

D. BEGIN 1_emp := emp_typ (); IF NOT 1_emp. EXISTS (1) THEN DBMS_OUTPUT.PUT_LINE (‘Summary is null’); END IF; END;

E. BEGIN 1_emp. EXTEND; IF NOT 1_emp. EXISTS (1) THEN DBMS_OUTPUT.PUT_LINE (‘Summary is null’); END IF; END;

Buy Now
Questions 12

Examine this statement: Which result is expected after executing this anonymous block?

A. PLS-00316: PL/SQL TABLEs must use a single index

B. 60

C. PLS-00382: expression is of wrong type

D. 30

E. ORA-06533: Subscript beyond count

Buy Now
Questions 13

The EMPLOYEES table exists in your schema and has columns LAST_NAME of data type VARCHAR2

and DEPARTMENT_ID of data type NUMBER.

There are six employees in DEPARTMENT_ID, 20.

Examine this code:

What will be the outcome on execution?

A. The execution of this code will fail with an invalid cursor error and not display either output message.

B. The number of employees will be displayed as six for both output messages.

C. The number of employees will be displayed as six for the first output message and zero for the second output message.

D. The number of employees will be displayed as six for the first output message and an invalid cursor error will be thrown instead of displaying the second output message.

Buy Now
Exam Code: 1Z0-148
Exam Name: Oracle Database: Advanced PL/SQL
Last Update: Jan 14, 2025
Questions: 243
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99