Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re[1] : Recovery Scenarios - Help !!

Re: Re[1] : Recovery Scenarios - Help !!

From: Giovanni Cuccu <gcuccu_at_dianoema.it>
Date: Mon, 29 Nov 2004 16:40:48 +0100
Message-ID: <41AB4300.1000006@dianoema.it>


Prem Khanna J wrote:

>
> When UNDO tablespace is lost , where from does oracle get
> the information to rollback ? This is not very clear to me.
>

Before performing any rollback you have to restore the tablespace, this literally means restoring a file (in this case the undo tbs)i.e. copying a file from the backup to its original location. After you restore the datafile you must apply the changes made to this datafile after its backup. This is done reading archivelog and then copying piece of archivelog to datafiles. After that you end up with a situation as before the crash, now oracle can commit any commited transaction still in the redo logs and rollback any not committed change in the datafiles. the information to rollback is in the undo but also in the archived log and in the online redologs.

>

>>>Case 2
>>>------
>>>I have lost my temp tablespace during a batch job which does lot of sort/update.
>>>- What will be the status of my batch job and 	how do i recover by temp tablespace now ?

>
>
>>This depends on the way you have written the batch program :
>>1)     If the batch program detects the problem and issues a rollback of the last uncommitted transaction and stops  you  don't
>>       have a problem :-)
>>2)     If the batch program just quits on error then Pmon will do the rollback of the uncommitted transaction.

>
>
>
> So anyway , the transaction will be rolled back and
> i'm safe . am i right ?

Yes oracle does not commit anything unless you instruct to so so.
>
>
>>>Case 3
>>>------
>>>I have lost an un-archived online redo log file.The proper recovery procedure is :
>>>- restore all datafiles from backup
>>>- mount the database
>>>- recover until cancel
>>>- open resetlogs
>>>
>>>Without restoring datafiles from backup,Can i do this : 
>>>- mount the database
>>>- recover until cancel
>>>- open resetlogs

>

this is ncessary only if the changes in the redo log where necessary, if all the changes in the redo were propagated to datafiles you can simply open the database. If you have a test db you could try a clean shutdown (immediate) and then deleting alle the online redos. You can then open the db without losing data and making no recovery
>
> when i recover/resetlogs without restoring the
> datafiles from backup , the database will be inconsistent
> state ... am i right ?
>

it depends on what you mean with inconsistent, oracle reopens the database restoring the db until a certain SCN. if you are able to reopen the db it's consistent, i.e you see only the results of all the transactions that were committed until that SCN. Giovanni
> Thanks and Regards,
> Prem.
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
-- 

----------------------------------------
Giovanni Cuccu
Sw Engineer_at_dianoema.it
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-7098211   051-4193911
e-mail:gcuccu_at_dianoema.it
----------------------------------------
No man does it all by himself,
I said young man,
put your pride on the shelf
----------------------------------------
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Nov 29 2004 - 09:37:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US