How to detect if a database needs recovery [message #617219] |
Thu, 26 June 2014 03:46  |
John Watson
Messages: 8965 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
How can I determine, in mount mode, if the database is consistent or if it needs recovery? ie, was it shut down in an orderly fashion with a checkpoint, or was the instance aborted for any reason? I've been looking at various columns in controlfile views, such as
v$database CHECKPOINT_CHANGE#, CONTROLFILE_CHANGE#
v$datafile CHECKPOINT_CHANGE#
v$log NEXT_CHANGE#
follwing a SHU IMMEDIATE or a SHU ABORT and I don't have an answer. Surely there is an easy way to do this!
Any insight will be welcome.
|
|
|
Re: How to detect if a database needs recovery [message #617221 is a reply to message #617219] |
Thu, 26 June 2014 04:10   |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
John Watson wrote on Thu, 26 June 2014 14:16How can I determine, in mount mode, if the database is consistent or if it needs recovery?
If this is of any help, per documentation http://docs.oracle.com/cd/E11882_01/server.112/e25789/startup.htm#CEGCHJGF,
Quote:Whether instance recovery is required depends on the state of the redo threads. A redo thread is marked open in the control file when a database instance opens in read/write mode, and is marked closed when the instance is shut down consistently. If redo threads are marked open in the control file, but no live instances hold the thread enqueues corresponding to these threads, then the database requires instance recovery.
I believe instance recovery happens automatically.
|
|
|
|
|