1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 155


You currently have an active transaction in your session and have been granted SELECT access to

V$TRANSACTION.

Executing:

SELECT xid, status FROM v$transaction;

in your session returns:

In which three situations will re-executing this query still return a row but with a different XID, indicating a new transaction has started? (Choose three.)

Show Answer
Correct Answer: BCDEF

Re-executing the query after the following scenarios will return a row with a different XID, indicating a new transaction has started: (1) After successfully executing a TRUNCATE statement followed by a DML statement, because the TRUNCATE statement is a DDL command, it implicitly commits the current transaction, making the subsequent DML statement part of a new transaction; (2) After successfully executing a CREATE TABLE AS SELECT statement followed by a SELECT FOR UPDATE statement, because the CREATE TABLE AS SELECT is a DDL command that commits the current transaction, and the following SELECT FOR UPDATE starts a new transaction; (3) After successfully executing a COMMIT or ROLLBACK followed by a DML statement, because COMMIT or ROLLBACK will end the current transaction, and the subsequent DML statement initiates a new transaction.

Discussion

8 comments
Sign in to comment
DarnunOptions: BDE
Mar 29, 2023

BDE is correct, tested all on DB. F is incorrect as SELECT is a limited DML statement which means it can only access data in the database, it cannot manipulate data.

WingLOptions: BDE
Jul 11, 2023

BEST ANSWERS

yaya32Options: BDE
Jan 21, 2024

BDE is correct

greenneemOptions: ABE
Feb 19, 2023

I think new transaction can't start in the following case. C.after successfully executing a DML statement following a failed DML statement and I didn't find the difference between E and F.Can I get any reference link?

BeeshoOptions: BDE
Mar 7, 2023

I would say BDE

ThorcOptions: BDE
Mar 28, 2023

I would said BDE because STATUS means that the Transaction must be active so not yet completed

ArslanAltafOptions: BDE
Apr 23, 2024

A. after successfully executing a CREATE TABLE statement followed by a CREATE INDEX statement CREATE WILL END THE TRANSACTION BUT AGAIN CREATE INDEX WILL NOT START NEW TRANSACTION. FALSE B. after successfully executing a TRUNCATE statement followed by a DML statement. TRUNC WILL END TRANS... AND LET SUPPOSE DML IS NOT SELECT IN THIS CASE SO THIS IS A POSSIBLE TRUE. TRUE C. after successfully executing a DML statement following a failed DML statement. DML WILL NOT END TRANSATION AT ALL. FALSE D. after successfully executing a CREATE TABLE AS SELECT statement followed by a SELECT FOR UPDATE statement. CREATE IS DDL WHICH IS IMPLICIT COMIT AND SELECT FOR UPDATE IS A START OF NEW TRANSACTION. TRUE E. after successfully executing a COMMIT or ROLLBACK followed by a DML statement. SO COMIT END TRANSACTION AND DML CAN POTENTIALLY START NEW TRANSACTION (OTHER THAN SELECT). TRUE F. after successfully executing a COMMIT or ROLLBACK followed by a SELECT statement. TRANSACTION ENDS HOWEVER ONLE SELECT, LET SAY SELEC * FROM EMP WILL NOT START A NEW TRANSACTION. FALSE TRUE ---- BDE

ArslanAltafOptions: CDE
Apr 23, 2024

The Transaction END with Comitt or DDL The new Transaction starts with INSERT, UPDATE, DEL, MERGE (Not even select TESTED) OR A transaction can be start manually by begin transaction command (which is irrelevent in context of this question).