Re: Using Shutdown Immediate
Date: 1995/08/18
Message-ID: <411126$o8u_at_inet-nntp-gw-1.us.oracle.com>#1/1
Jonathan Lewis <Jonathan_at_jlcomp.demon.co.uk> wrote:
>In article <40qts0$7gt_at_inet-nntp-gw-1.us.oracle.com>
> tkyte_at_us.oracle.com "Thomas J Kyte" writes:
>: The next startup of the database might require instance
>: recovery (which is automatically performed by ORACLE).
>: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>: (this is the REALLY important statement for shutdown immediate.
>: It implies that: dbwr is NOT given the chance to flush all dirty
>: blocks from the buffer cache and: the blocks that are not flushed
>: must be ROLLED FORWARD (not back) from the redo logs. If you do
>: a full backup now, you will back up inconsistent tablespaces
>: that need recovery, hence you will not have a real backup!)
>:
>On tbe other hand, quoting the same release of manuals (I think)
>the Concepts Manual p23-10 says:
>"If the database administrator shuts down an instance (NORMAL
>or IMMEDIATE), ORACLE forces a database checkpoint to complete
>before the instance is shut down."
Yes it does.
I will try to find out EXACTLY what is missing during the shutdown immediate. I know that SOMETHING is missing since sometimes recovery is performed on my database and sometimes not. Review of my alert files shows this.
What it might be (and I have to research this) is that whilst the checkpoint is occurring, rollback is also taking place pretty much at the same time. A checkpoint in Oracle doesn't stop other work from taking place. The only time a checkpoint will hold up the instance is when the logs attempt to wrap around and the checkpoint hasn't completed. Just becase a checkpoint completes doesn't imply the datafiles are perfectly consistent, just fairly close. We allow other work to go on while the checkpoint takes place.
This is ME hypothesising here but perhaps:
shutdown normal (steps performed in roughly this order)
- users not allowed to log in
- users logged in waited on to finsish
- when last user logs out, checkpoint starts (database is single user now)
- when checkpoint completes database is shutdown for real (and is consistent since no work done during the checkpoint
shutdown immediate (steps....)
- users not allowed to log in
- users logged in are rolled back AND a checkpoint is initiated
- when the last user is Logged off AND the checkpoint is complete the database is shutdown for real. But since the checkpoint and rolllbacks took place concurrently, database MAY be inconsistent
Again, I AM GUESSING at the above ( an educated guess, but a guess none the less). I will be out of the office till september and won't be able to look at this in detail till then. If anyone else finds out more, let us know.
>--
>Jonathan Lewis
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Received on Fri Aug 18 1995 - 00:00:00 CEST