1Z0-032 · Question #112
In your database, there is a large transaction modifying very crucial data. A hardware problem caused instance failure and the instance went down before all the writes to the data files were…
The correct answer is C. After the database is opened, all the uncommitted changes will be rolled back. See the full explanation below for the reasoning.
Question
In your database, there is a large transaction modifying very crucial data. A hardware problem caused instance failure and the instance went down before all the writes to the data files were completed. Which statement is true?
Options
- AOn startup, PMON coordinates instance recovery and opens the database.
- BOn startup, CKPT coordinates instance recovery and opens the database.
- CAfter the database is opened, all the uncommitted changes will be rolled back.
- DOn startup, RECO process performs instance recovery and opens the database.
- EOn startup, RMAN is automatically invoked to perform instance recovery and open the database.
How the community answered
(41 responses)- A7% (3)
- B5% (2)
- C85% (35)
- D2% (1)
Community Discussion
5The correct answer is C. A lot of people trip on this one because they assume Oracle handles recovery the same way before and after the database opens, but that is not how it works. SMON is the process that actually coordinates instance recovery, so right away you can eliminate A, B, D, and E since PMON handles failed user processes, CKPT just writes checkpoint info to headers and the control file, RECO deals with distributed transaction failures, and RMAN is a tool you invoke manually or schedule, not something Oracle spins up automatically on crash recovery. The real flow is that Oracle does a roll-forward first using the redo logs to get the data files consistent, then it opens the database, and only after that does it roll back any uncommitted transactions using the undo segments. So yes, the database is accessible before all that cleanup is done, which is exactly what option C is describing.
Flag A, B, D, and E fast, because they all name the wrong process. SMON, not PMON or CKPT or RECO, handles instance recovery on startup, and RMAN is never automatically invoked for this, so those four are gone in about ten seconds. The trick Oracle loves here is the sequence: SMON rolls forward with the redo logs first, then the database opens, and only after it is open does the undo work kick in to roll back those uncommitted changes, which is exactly what C says. I hit this one on my actual exam and almost second-guessed myself because I was thinking the db had to be closed for all that cleanup to finish, but I caught myself, remembered the order of recovery phases, and moved on in under a minute. Quick win, bank the time, keep going.
C is correct, and the reason it trips people up is the ordering. Oracle instance recovery has two distinct phases, roll forward and roll back, and the database is opened to users between them, not after both complete. The Oracle Database Concepts guide documents this clearly: SMON applies redo to bring data files current, the database opens, and then uncommitted transactions are rolled back in the background by SMON using undo segments. That is why you can connect right after startup even though some transactions are still being rolled back. The distractors here are all about the wrong process: SMON handles instance recovery, not PMON, not CKPT, not RECO, and RMAN is a backup and recovery tool that requires a user-initiated command, it does not get invoked automatically on startup for instance recovery.
I actually had A circled for a minute because I kept mixing up PMON with SMON, and SMON is the one that handles instance recovery on startup, so A trips you up if you have not drilled that distinction yet. What snapped me out of it was spinning up a test instance, killing it mid-transaction, and watching the alert log on restart, because the sequence is clear right there: SMON does the roll forward from the redo logs, the database opens, and then the uncommitted changes get rolled back with users already connected, which is exactly what C describes.
Yeah that alert log trick is clutch, and worth adding that the rollback in phase three is actually handled by individual server processes using the undo segments, not SMON itself, which surprised me when I first dug into it.