QuestionQ122

VerifiedControlling User Access

An active transaction currently exists in your session, and you have been granted SELECT access to V$TRANSACTION.

Executing the following in your session:

SELECT xid, status FROM v$transaction;  

returns:

Question Image

In which three situations will running this query again still return a row, but with a different XID that indicates a new transaction has begun?

Choose three
Explanation

TRUNCATE and CREATE TABLE AS SELECT are DDL statements, so each implicitly commits the previously active transaction. A following DML statement starts a new transaction, and SELECT FOR UPDATE starts a new transaction to acquire row locks. An explicit COMMIT or ROLLBACK also ends the current transaction, so subsequent DML has a new XID. A failed DML statement rolls back only that statement and does not replace an already-active transaction; consecutive DDL leaves no active transaction afterward, and a plain SELECT does not create the active transaction shown in V$TRANSACTION.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!