I'm studying a little DBA stuff and I've come across instance failure/recovery.
Let's say User A does DML and User B also does DML.
At this point, I believe it's safe to assume DB buffer cache contains changed table blocks and undo segments, and also that log buffer contains redo information for the new table blocks value and the new undo segments value.
Case 1 : No user issues a
COMMIT
and no writes to disk by DBWn and instance crash. Result : DB not corrupted. It's as if their DML never occurred.Case 2 : Only User A issues a
COMMIT
. User B's uncommitted changes are written to disk then the instance crashes. LGWR will have written enough data in the redo log , especially User B's undo segments, so that the recovery's rollback phase will make the database consistent againCase 3 : No user issues a
COMMIT
but their changed table blocks are old enough to make DBWn write them to disk. Then BOOM! Instance crashes. How willSMON
perform rollback to clear dirty blocks from datafiles here? Especially since there is no undo segment values for them in the redo log here.