Exam 1z0-071 All QuestionsBrowse all questions from this 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.)

    Correct Answer: B, D, E

    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
yaya32Options: BDE

BDE is correct

WingLOptions: BDE

BEST ANSWERS

DarnunOptions: BDE

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.

ArslanAltafOptions: BDE

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

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).

ThorcOptions: BDE

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

BeeshoOptions: BDE

I would say BDE

greenneemOptions: ABE

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?