Home » RDBMS Server » Backup & Recovery » the way about rac recovery
the way about rac recovery [message #307492] Wed, 19 March 2008 00:37 Go to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi,all
I am very confused with the way oracle does a RAC recovery.
For I have a 2 nodes RAC .
10:00 user connect to node1(instance1 ) and execute
sql>insert into table t values(1);
sql>commit;
10:30 user connect to node2(instance2 and execute:
sql>delete from t1;
sql> commit;
sql>alter system switch logfile.
now redo log belong to instance2 was archived with sequence 1000.
11:00 redo log belong to instance1 was archived with sequence 2000.

Now I want to recovery the database,how does oracle decide with archived log should be apply first?
If it choose the log by the time order ,here first is sequence 1000,and then 2000,but we can see,transaction at 10:00 should be apply first, but the time it was archived later than the other one.
Could someone gave a explain?
Hope I descript it clearly.

Regards!
Alan
Re: the way about rac recovery [message #307512 is a reply to message #307492] Wed, 19 March 2008 01:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Don't worry, Oracle instances don't use sequence number or commit time or archive time or ... but SCN to know the correct order.

Regards
Michel
Re: the way about rac recovery [message #307530 is a reply to message #307512] Wed, 19 March 2008 01:30 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Thanks Michel!
I have learned many things from you !
I still want a more detail clarity:
in my case:
is there exists this situation:
one archived log includes a transaction with scn1,and should be
appled,and includes other transaction with scn s3, should be appled
after the transaction on the other archived log with scn2 was appled.

that means:
archived log transactions scn
A t1,t3 s1 s3
B t2 s2

Here s1<s2<s3

does oracle:
1.first find the transaction with scn s1 on logfile A,apply it.
2.find the transaction with scn s2 on logfile B ,apply it.
3.find the transaction with scn s3 on logfile A again,apply it?

Could oracle apply archived log like this way?
your comments!

Regards
Alan
Re: the way about rac recovery [message #307547 is a reply to message #307530] Wed, 19 March 2008 01:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Redo records are applied in the order of SCN.

Regards
Michel
Re: the way about rac recovery [message #307554 is a reply to message #307547] Wed, 19 March 2008 02:06 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi,Michel
I still confused:(
I believe redo records in SCN order is distributed cross all the redo logs ,how does oracle get them in order? does oracle visit a log file many times?

I am sorry if you think this question s too simple.

Regards
Alan
Re: the way about rac recovery [message #307560 is a reply to message #307554] Wed, 19 March 2008 02:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I don't know the algorithm (which surely changes with version) but in the end, redo records are applied in scn order it may even be possible some are never applied (if Oracle knows they are rolled back).
Does it read many times the same log (surely at least for part of it), does it buffer it (surely at least for part of it), does it read till a point and switch to another log, does it...? There are many possible solutions and given the parameters we see that come and go at each version, we are sure the way Oracle does it changed many times.

Regards
Michel
Re: the way about rac recovery [message #307577 is a reply to message #307560] Wed, 19 March 2008 03:31 Go to previous message
alantany
Messages: 115
Registered: July 2007
Senior Member
Many thanks,Michel!
the informations and comments you gave is very useful!

Regards
Alan
Previous Topic: TTS restoration problem
Next Topic: RMAN Backup and Restore (Full)
Goto Forum:
  


Current Time: Fri Nov 29 12:19:42 CST 2024