1Z0-071 practice question 4 of 35

Which two are true about transactions in the Oracle Database?

Full set: 326 questions
Answer options
A: DDL statements automatically commit only data dictionary updates caused by executing the DDL.
B: A DDL statement issued by a session with an uncommitted transation automaticall commits that transaction. Correct answer
C: An uncommitted transaction is automatically committed when the user exits SQL*PLUS Correct answer
D: DML statements always start new transactions.
E: A session can see uncommitted updates made by the same user in a different session
Correct Answer:
B. A DDL statement issued by a session with an uncommitted transation automaticall commits that transaction.; C. An uncommitted transaction is automatically committed when the user exits SQL*PLUS
Explanation

In Oracle Database, a transaction is a sequence of SQL statements processed as a single atomic unit. A Data Definition Language (DDL) statement, such as CREATE TABLE or ALTER TABLE, implicitly commits the current transaction before it executes and commits again after it successfully executes. Therefore, a DDL statement will commit any preceding uncommitted transaction in the same session. Furthermore, the SQLPlus client tool, by default, issues a COMMIT command when a user exits the session normally using the EXIT or QUIT command. This ensures that any uncommitted work is saved.

Why Incorrect

A. A DDL statement commits the entire preceding transaction in the session, not just the data dictionary updates related to the DDL itself.
D. The first DML statement after a COMMIT or ROLLBACK begins a transaction. Subsequent DML statements are part of the same transaction, they do not start new ones.
E. Oracle's read consistency model ensures that a session cannot see uncommitted changes made in any other session, even if initiated by the same user.

References

1. Oracle Database Concepts, 23c. "Autonomous Transactions". It states, "DDL statements are preceded and followed by an implicit COMMIT."

2. Oracle Database SQLPlus User's Guide and Reference, 23c. "EXIT Command". The documentation specifies, "By default, EXIT performs a COMMIT."

3. Oracle Database Concepts, 23c. "Overview of Transactions". It explains, "A transaction begins when the first executable SQL statement is encountered... A transaction ends when it is committed or rolled back, either explicitly with a COMMIT or ROLLBACK statement or implicitly when a DDL statement is issued."

Scroll to Top