Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Oracle 1z0-144 Oracle Database 11g: Program with PL/SQL Exam Practice Test

Demo: 15 questions
Total 103 questions

Oracle Database 11g: Program with PL/SQL Questions and Answers

Question 1

View Exhibit1 and examine the structure of the employees table.

View Exhibit2 and examine the code.

What is the outcome when the code is executed?

Options:

A.

Both blocks compile and execute successfully when called.

B.

Both blocks compile successfully but the CALC_SAL procedure gives an error on execution.

C.

The CALC_SAL procedure gives an error on compilation because the amt variable should be declared in the RAISE_SALARY procedure.

D.

The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY procedure cannot call the stand-alone increase function.

Question 2

The STRING_TAB table has the following structure:

View the Exhibit and examine the code.

What is the outcome on execution?

Options:

A.

It displays

Output buffer not long enough.

This is my test string.-.

B.

It displays only

Output buffer not long enough, and exits the anonymous block.

C.

It displays only

This is my test string. - Because EXCEPTION should have been defined in the anonymous block to get the error message.

D.

It does not display any of the MEMS_PUTPUT messages and gives an error because a transaction control statement cannot be used in the exception section of a procedure.

Question 3

/temp/my_files is an existing folder in the server, facultylist.txt is an existing text file in this folder

Examine the following commands that are executed by the DBA:

SQL>CREATE DIRECTION my_dir AS ‘ /temp/my_files’:

SQL>GRANT READ ON DIRECTORY my_dir To pubiic:

View the Exhibit and examine the procedure created by user SCOTT to read the list of faculty names from the text file.

SCOTT executes the procedure as follows:

SQL>SET SERVEROUTPUT ON

SQL>EXEC read_file (‘MY_DIR’, FACULTYLIST.TXT’)

What is the outcome?

Options:

A.

It goes into an infinite loop.

B.

It executes successfully and displays only the list of faculty names.

C.

It does not execute and displays an error message because the end-of-file condition is not taken care of.

D.

It executes successfully and displays the list of faculty names followed by a "no data found” error message.

Question 4

Examine the following command:

SQL>ALTER SESSION

SET plsql_warnings *

'enable: severe',

'enable: performance',

'ERROR: 05003';

What is the implication of the above command?

Options:

A.

It issues a warning whenever ERROR: 05003 occur during compilation.

B.

It causes the compilation to fail whenever the warning ERROR.05003 occurs.

C.

It issues warnings whenever the code causes an unexpected action or wrong results performance problems.

D.

It causes the compilation to fail whenever the code gives wrong results or contains statements that are never executed.

Question 5

View the Exhibit and examine the package code created by SCOTT. The execute privilege on this package is granted to green.

Examine the following sequence of commands issued by SCOTT:

What is the outcome?

Options:

A.

SCOTT’S session displays 5, and then 0, greets session displays 0.

B.

SCOTT’S session displays 5, and then 0; green's session displays 5.

C.

SCOTT’S session displays 5, and then 5 again, green's session displays 0.

D.

SCOTT’S session displays 5, and then 5 again; green's session displays 5.

Question 6

View the Exhibit to examine the PL/SQL block.

Which statement is true about the execution of the PL/SQL block?

Options:

A.

It executes successfully and gives the desired output.

B.

It does not execute because the definition of type population is indexed by VARCHAR2.

C.

It executes, and the string keys of an associative array are not stored in creation order, but in sorted order.

D.

It does not execute because the value that is once assigned to the element of the associative array cannot be changed.

Question 7

Examine the following PL/SQL code:

The server output is on for the session. Which statement is true about the execution of the code?

Options:

A.

The code executes successfully and gives the desired output.

B.

The code generates an error because the EMP_RECORD variable is not declared.

C.

The code generates an error because the cursor is not opened before the FOR loop.

D.

The code generates an error because the loop does not have the exit when clause.

Question 8

View the Exhibit and examine the blocks of code that you plan to execute.

Which statement is true about the blocks of code?

Options:

A.

All the blocks execute successfully and the anonymous block displays

1

2

3

cant: 45

45

cnt: 45

B.

All the blocks execute successfully and the anonymous block displays

1

2

3

cut: 0

45

cart: 1

C.

The anonymous block gives an error because the function invocation in line 2 is not valid.

D.

The procedure creation gives an error because the function invocation in line 1 is not valid.

Question 9

Examine the following block of code:

Which two statements are correct about the code above? (Choose two.)

Options:

A.

The function goes through only the parse and executes phases.

B.

The function goes through the parse, bind, and execute phases.

C.

The function goes through the parse, bind, execute, and fetch phases.

D.

All the processing phases for the function are performed only at run time.

E.

Only the EXECUTE IMMEDIATE statement inside the function is parsed at run time.

Question 10

Which statements are true about PL/SQL procedures? (Choose all that apply.)

Options:

A.

Users with definer's rights who are granted access to a procedure that updates a table must be granted access to the table itself.

B.

Reuse of parsed PL/SQL code that becomes available in the shared SQL area of the server avoids the parsing overhead of SQL statements at run time.

C.

Depending on the number of calls, multiple copies of the procedure are loaded into memory for execution by multiple users to speed up performance.

D.

A PL/SQL procedure executing on the Oracle database can call an external procedure or function that is written in a different programming language, such as C or Java.

Question 11

You want to create a trigger that fires whenever rows are deleted from the customer table and that displays the number of rows remaining in the table.

Which two statements are correct about the trigger to be created for the above requirement? (Choose two.)

Options:

A.

It should be an after trigger.

B.

It should be a before trigger.

C.

It should be a row-level trigger.

D.

It should be a statement-level trigger.

E.

It can be a before or an after trigger.

Question 12

View the Exhibit and examine the structure of the customer table.

You create the following trigger to ensure that customers belonging to category "A" or "B" in the customer table can have a credit limit of more than 8000.

What is the outcome?

Options:

A.

The trigger is fired, a message is displayed, and the update is successful

B.

The trigger is fired and a message is displayed, but the update is rolled back.

C.

The trigger is not fired because the when clause should be used to specify the condition, however, the update is successful.

D.

The trigger is not fired because column names must be specified with the update event to identify which columns must be changed to cause the trigger to fire, however, the update is successful.

Question 13

Which three statements are true about wrapping? (Choose three.)

Options:

A.

The PL/SQL wrapper detects and reports only syntax errors.

B.

The PL/SQL wrapper detects and reports both syntax and semantic errors.

C.

When wrapping a package or object type, both the body and specification should be wrapped.

D.

When wrapping a package or object type, only the body should be wrapped, not the specification.

E.

To change a wrapped object, the original source code needs to be modified and then wrapped again

F.

To change a wrapped object, the wrapped code can be unwrapped, modified In a text file, and then wrapped again.

Question 14

Examine the following PL/SQL code:

The server output is on for the session. Which statement is true about the execution of the code?

Options:

A.

It displays null if no employee with employee_id 123 exists.

B.

It produces the ora-01403: no data found error if no employee with employee_id 123 exists.

C.

It displays an error because the select into clause cannot be used to populate the PL/SQL record type.

D.

The code executes successfully even if no employee with employee_id 123 exists and displays Record Not Found.

Question 15

Examine the following code:

The above code generates an error on execution.

What must you do to ensure that the code executes successfully?

Options:

A.

Use the TO_DATE function in line 2.

B.

Use the TO_DATE function in line 7.

C.

Use the TO_NUMBER function in line 6.

D.

Use both the TO_DATE function in line 2 and the TO_NUMBER function in line 6.

Demo: 15 questions
Total 103 questions