【Oracle】-Difference between Instance recovery and Crash Recovery

sdon發表於2012-04-20
Difference between Instance recovery and Crash Recovery
===========================================================

Difference between Instance recovery and Crash Recovery

RDBMS Version: 8.1.7
Operating System and Version: AIX 5L 5.2
Error Number (if applicable):
Product (i.e. SQL*Loader, Import, etc.): Oracle Server
Product Version: 8.1.7.4

Difference between Instance recovery and Crash Recovery


What is difference between Instance Recovery and Crash Recovery ?,
Is the difference between both terms implies when RAC (Real Application Cluster) is used ?

In case of non-RAC database what is significant difference ?

Thanks

Dilip Patel.



來自: 15-Jan-04 12:29
主題: Re : Difference between Instance recovery and Crash Recovery

Hi,

I don't know much about RAC, but the difference between instance recovery and creash recovery is as follows.

INSTANCE RECOVERY :

1) when your instances goes down for some reason e.g (machine got rebooted , memory fault , shutdown abort command , or shared memory/semaphore is removed by ipcrm command) in these scenario's instance crashes and there is no work from DBA side to do as Oracle process SMON takes care of instance recovery

CRASH RECOVERY :

2) CRASH recovery happens generally due to hardware failure e.g( disk got corrupted ) in this kind of scenario DBA has to decide which backup or datafiles and archive logs needs to be restored and recovery to be applied .

Hope this helps you

Regards
Hitesh Nouni
hiteshnouni@yahoo.com



來自: 15-Jan-04 12:38
主題: Re : Difference between Instance recovery and Crash Recovery

Dilip,

instance recovery is needed when oracle instance (i.e. process and SGA, all memory structures) crashed, i.e. all data on disk is ok. In certain situations Oracle performs a "checkpoint", i.e. synchronizes SGA and disk. Instance recovery means (simplified): Replaying all activity that occured since the last checkpoint. By certain mechanisms it is guaranteed that this can be done by applying changes from the online redo logs. It is done automatically when you restart the instance.

Crash recovery is needed when a disk is damaged. Then you first have to restore your last backup. Then all activity between the time the backup was created and the time of the disk failure has to be replayed. In this case, it will probably be that not all information needed is in the online redo logs, but you need all archive logs since the backup creation. It's not autimatically, you have to specify that you want to recover from your restored backup (i.e. RECOVER DATABASE in SQLPlus).



來自: 15-Jan-04 17:51
主題: Re : Re : Difference between Instance recovery and Crash Recovery

Just to add one thing.
In regard to RAC or OPS (say two nodes are used)
You have three components

Cluster
Server 1
Server 2

If cluster goes down then
Both nodes are down
After starting the cluster you can start the nodes
If node 1 goes down then node 2 will take over and VS in the background node 2 will do instance recovery.
When node 1 has been started it will take back the control.

In general the concept of crash and instance recover as was mentioned by other posters applies to OPS or RAC. You just have one extra layer and that is the second node.
HTH TOM



來自: 15-Jan-04 19:05
主題: Re : Difference between Instance recovery and Crash Recovery

Thanks to everyone who assisted with this thread.
Scott



來自: 16-Jan-04 10:48
主題: Re : Difference between Instance recovery and Crash Recovery



Thanks Everybody.

Dilip Patel.



來自: 16-Jan-04 18:10
主題: Re : Re : Difference between Instance recovery and Crash Recovery

There are few misconceptions in this post and would like to clarify.
Here is the clear distinction between instance and crash recovery (from 9i backup and recovery concepts chapter 3):

"Crash recovery is used to recover from a failure either when a single-instance database crashes or all instances of an Oracle Real Application Clusters database crashes. Instance recovery refers to the case where a surviving instance recovers a failed instance in an Oracle Real Application Clusters database."

Specifically, if all the instances of a database is crashed then the term "crash recovery" applies. If at least one instance of the database is alive, then the term "instance recovery" applis. So, in case of a single instance (non-ops or non-rac), the term "crash recovery" does not apply.

In both, instance and crash recovery, there is no need for any manual intervention. No need to specify any archive log files etc.

On the contrary, Media recovery is performed by restoring a database file(s and applying the archivelog files manually using "recover" commands. Block level media recovery introduced in 9i might not need to restore entire file(s), but that is still considered as Media recovery.

Important distinction between Instance/Crash Recovery and Media recovery is that, media recovery needs manual intervention.

HTH

Thanks
Riyaj Shamsudeen



來自: 17-Jan-04 12:02
主題: Re : Difference between Instance recovery and Crash Recovery


Thanks Riyaj,

Anybody from Oracle can throw light on this ?

Thanks

Dilip.



來自: 19-Jan-04 16:46
主題: Re : Difference between Instance recovery and Crash Recovery

Instance failure, a failure resulting in the loss of the instance's
buffer cache, occurs when an instance is aborted, either
unexpectedly or expectedly. Examples of reasons for unexpected
instance aborts are operating system crash, power failure, or
background process failure. Examples of reasons for expected
instance aborts are use of the commands SHUTDOWN ABORT
and STARTUP FORCE.

Crash failure is the failure of all instances accessing a database. In the case of a single-instance (non-Parallel Server option) database, the terms crash failure and instance failure are used
interchangeably. Crash recovery (equivalent to instance recovery in
this case) is the process of recovering all online datafiles to a
consistent state following a crash. This is done automatically in
response to the ALTER DATABASE OPEN command.

In the case of the Parallel Server option, the term crash failure is
used to refer to the simultaneous failures of all open instances.
Parallel Server crash recovery is the process of recovering all
online datafiles to a consistent state after all instances accessing the database have failed. This is done automatically in response to the ALTER DATABASE OPEN command. Parallel Server instance
failure refers to the failure of an instance while a surviving instance continues in operation. Parallel Server instance recovery is the automatic recovery by a surviving instance of a failed instance.

Instance failure impairs database integrity because it results in loss of the instance's dirty buffer cache. A "dirty" buffer is one whose memory version differs from its disk version. An instance that
aborts has no opportunity for writing out "dirty" buffers so as to
prevent database integrity breakage on disk following a crash.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/645199/viewspace-721820/,如需轉載,請註明出處,否則將追究法律責任。

相關文章