Which statement correctly describes the output?

View Exhibit1 and examine the structure of the EMP table.

View Exhibit2 and examine the code created by the user SCOTT:

SCOTT grants the necessary privileges to green to access the EMP table and execute the package.
Examine the following sequence of activities:

SCOTT starts a session and issues the SQL>EXEC CURS_PKG.OPEN command.

SCOTT then issues the SQL>EXEC CURS_PKG.NEXT command.
green starts a session while SCOTT’s session is running and issues THE SQL>EXEC CURS_PKG.NEXT command.
SCOTT issues the SQI>>EXEC SCOTT.CURS_PKG.NEXT command. The EMP table contains sequential EMPNOS from 100 through 108.
Which statement correctly describes the output?

View Exhibit1 and examine the structure of the EMP table.

View Exhibit2 and examine the code created by the user SCOTT:

SCOTT grants the necessary privileges to green to access the EMP table and execute the package.
Examine the following sequence of activities:

SCOTT starts a session and issues the SQL>EXEC CURS_PKG.OPEN command.

SCOTT then issues the SQL>EXEC CURS_PKG.NEXT command.
green starts a session while SCOTT’s session is running and issues THE SQL>EXEC CURS_PKG.NEXT command.
SCOTT issues the SQI>>EXEC SCOTT.CURS_PKG.NEXT command. The EMP table contains sequential EMPNOS from 100 through 108.
Which statement correctly describes the output?

A.
SCOTT’s session shows the EMPNO 100, GREEN’S session shows an error, and SCOTT’s session shows an error.

B.
SCOTT’s session shows the EMPNO 100, GREEN’S session shows EMPNO 100, and SCOTT’s session shows the EMPNO 101.

C.
SCOTT’s session shows the EMPNO 100, GREEN’S session shows an error, and SCOTT’s session shows the second EMPNO 101.

D.
SCOTT’s session shows the EMPNO 100, GREEN’S session shows EMPNO 101, and SCOTT’s session shows the second EMPNO 102.



Leave a Reply 10

Your email address will not be published. Required fields are marked *


Megha

Megha

I think the answer should be B.Please suggest guys

guru

guru

The answer is C, green will get this error: ORA-01001: invalid cursor

gamma

gamma

why cursor is invalidated?

Alonso

Alonso

because Green didn’t call the open method.

Manuel

Manuel

La respuesta correcta es la C, debido a que el usuario green no abre el cursor.

Heena

Heena

answer is C..

Uladzimir

Uladzimir

The answer is C.

package values (in this case) stored on session level. Each session has it’s own instance of package and Green didn’t open cursor that led to error

Luz REBOLLO

Luz REBOLLO

ooo ya!

Ahmed

Ahmed

C is answer
persistent package data states for the life of a session