Re: Using Shutdown Immediate
Date: 1995/08/15
Message-ID: <40qts0$7gt_at_inet-nntp-gw-1.us.oracle.com>
Nalini Vallampati <> wrote:
>>In article <40gvg0$h36_at_inet-nntp-gw-1.us.oracle.com> Thomas J Kyte writes:
>>From the DBA guide, chapter 18:
>>
>><quote>
>>Preparing to Take a Full Backup
>>
>>To guarantee that a database's data files are consistent, always shut down the
>>database in normal priority before making a full database backup; never perform
>>a full database backup after an instance failure or after the database is shut
>>down with immediate or abort priority (that is, using a SHUTDOWN IMMEDIATE or
>>SHUTDOWN ABORT statement). In both these cases, the data files are likely not
to
>>be consistent with respect to a specific point-in-time.
>></quote>
>>
>>Please, after a shutdown immediate, do a startup followed by a clean shutdown
>>(with no options). It is definitely not guaranteed to work any other way.
>>
>>Thomas Kyte
>>tkyte_at_us.oracle.com
>>Oracle Government
>>>
>But if the 'shutdown immediate' rolls back the users' transactions before
>kicking
>them out, how would a startup and clean shutdown after shutdown immediate
>help from the point of view of point-in-time recovery ? Wouldn't the datafiles
>after the clean shutdown be in the same state they were after the immediate
>shutdown ? (i.e., with their consistency affected ?)
Umm, no where in the docs does it say that it does a checkpoint which is needed to remove the need for INSTANCE RECOVERY. Sure, all outstanding work has been rolled back BUT, the database blocks on disk are NOT necessarily consistent. While the rollback has been done, the ROLL FORWARD (activity a full checkpoint would preclude) is not. I am including (from the dba guide again) the steps performed by each manner of shutdown:
<quote>
Shutting Down a Database Under Normal Conditions
Normal database shutdown proceeds as follows:
· No new connections are allowed after the statement is issued. · Before the database is shut down, ORACLE waits for all currently connected users to disconnect from the database. · The next startup of the database will not require any instance recovery procedures. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^(this is the REALLY important statement for normal shutdown, implies a full checkpoint has taken place and dbwr had a chance to flush ALL dirty blocks to disk making them consistent)
Shutting Down a Database Immediately
In emergency situations, you can immediately shut down a database; use immediate database shutdown only in situations such as:
· A power shutdown is going to occur soon. · The database or one of its applications is functioning irregularly.
Immediate database shutdown proceeds with the following conditions:
· Current client SQL statements being processed by ORACLE are terminated
immediately.
· Any uncommitted transactions are rolled back. (If long uncommitted
transactions exist, this method of shutdown might not complete quickly, despite
its name.)
· ORACLE does not wait for users currently connected to the database to
disconnect; ORACLE implicitly rolls back active transactions and disconnects all
connected users.
· 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!)
Aborting an Instance
You can shutdown a database instantaneously by aborting the database's instance. Avoid this type of shutdown; use it only in the following situations:
· The database or one of its applications is functioning irregularly and neither of the other types of shutdown work. · You need to shut down the database instantaneously (for example, if you know a power shutdown is going to occur in one minute). · You experience problems when starting a database instance.
Aborting an instance shuts down a database as follows:
· Current client SQL statements being processed by ORACLE are immediately terminated.
· Uncommitted transactions are not rolled back. · ORACLE does not wait for users currently connected to the database to disconnect; ORACLE implicitly disconnects all connected users. · The next STARTUP of the database will require instance recoveryprocedures; however, instance recovery will be automatically performed during database startup.
</quote>
>Nalini Vallampati
>UNIX Admin/Oracle DBA
>AT&T Credit
>Miamisburg, Ohio 45342
>Nalini Vallampati
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Received on Tue Aug 15 1995 - 00:00:00 CEST