Home » RDBMS Server » Backup & Recovery » Incomplete recovery until change
Incomplete recovery until change [message #284694] Fri, 30 November 2007 10:28 Go to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Hello Experts,

I am little bit confused about incomplete recovery.

While doing incomplete recovery until change we use SCN numbers if i am not wrong.

so while quering the dynamic V$Log_history view, i got the following output.

Seq# First_Change Next_Change Date
1111 126568 356131 30-Nov-07
2222 299755 564545 30-Nov-07
3333 456871 655555 30-Nov-07

Can anyone please explain to me,

1. what is First change n next change.
2. how can one know which SCN to pick from the above SCN numbers and use in the recovery.
3. in the above output does seq# means log sequence number.

Thanks for your expert views.
Re: Incomplete recovery until change [message #284708 is a reply to message #284694] Fri, 30 November 2007 11:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
V$LOG_HISTORY
SCN_TO_TIMESTAMP
TIMESTAMP_TO_SCN

Regards
Michel
Re: Incomplete recovery until change [message #284718 is a reply to message #284694] Fri, 30 November 2007 12:16 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Thankx for your response.

I have gone through the links.
However my scenario is like i want to do the incomplete recovery.

recover database untill change _______


in the blank place i need to enter the SCN, so on which basis i can decide which SCN should be entered keeping in mind the below output fron v$Log_history view.

Seq# First_Change Next_Change Date
1111 126568 356131 30-Nov-07
2222 299755 564545 30-Nov-07
3333 456871 655555 30-Nov-07

Appreciate your comments.
Re: Incomplete recovery until change [message #284720 is a reply to message #284694] Fri, 30 November 2007 12:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Appreciate your comments.
I do NOT believe that you got the following values from an actual
SELECT * FROM V$LOGHISTORY

1111 126568 356131 30-Nov-07
2222 299755 564545 30-Nov-07
3333 456871 655555 30-Nov-07

In my opinion, your fabricated values do not conform to reality.
Please post using CUT & PASTE complete SQL*Plus session showing actual query & results (using <code tags>).

What version of Oracle to FOUR decimal places?

[Updated on: Fri, 30 November 2007 12:23] by Moderator

Report message to a moderator

Re: Incomplete recovery until change [message #284722 is a reply to message #284694] Fri, 30 November 2007 12:31 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
yes you are right...
these are the dummy values.

I just wanted to know how can i get to know on which basis i can decide the value for SCN to be entered in the recovery command.

recover database untill change _______


Thanks for your time.
Re: Incomplete recovery until change [message #284724 is a reply to message #284722] Fri, 30 November 2007 12:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:

on which basis i can decide the value for SCN to be entered in the recovery command

I think on time, doesn't it?

Regards
Michel
Re: Incomplete recovery until change [message #284729 is a reply to message #284694] Fri, 30 November 2007 13:04 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
> I think on time, doesn't it?

Appreciate your comments Michel.

While using the recovery command recover database untill change SCN

which query will provide me the SCN and the time associated with each SCN, so that i will be able to decide uptil what SCN should i recover my database.

Thanks once again.
Re: Incomplete recovery until change [message #284730 is a reply to message #284729] Fri, 30 November 2007 13:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Did you read the links I posted?

And if you know the time but not the scn while not using "recover until time"?

Regards
Michel

[Updated on: Fri, 30 November 2007 13:13]

Report message to a moderator

Re: Incomplete recovery until change [message #284734 is a reply to message #284694] Fri, 30 November 2007 14:04 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Thanks Michel,

Refering to the links provided by you.

Does that mean i have to use the command SELECT SCN_TO_TIMESTAMP for each SCN and then based on that decide uptil what time recovery has to be done.


thanks for the clarification.
Re: Incomplete recovery until change [message #284738 is a reply to message #284694] Fri, 30 November 2007 14:20 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Most awake DBAs know or can conclude at what time the failure occured by looking at a clock or various log files.
You then recover to some point in time that is just before the failure.
Under worse case scenario the database will NOT be up (which is why you are doing a recovery in the first place) so you have NOTHING to query using SQL!
Re: Incomplete recovery until change [message #284739 is a reply to message #284694] Fri, 30 November 2007 14:41 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Thanks ancedent,

May be i am not able to convay what i needed.

I would request you if you could look onto my scenario below.

My question was like we can do incomplete recovery three ways.

1. Until time.
2. Until Cancel.
3. Until Change.

question was about until change, i am familiar with rest of two recovery option.

while using the recovery command (Recover database until change SCN),

So we need to type some SCN to recover the DB prior to the failure.

Now the question arises on what basis can we decide which SCN value to be entered in the recovery command,

If time, then where can i find all the SCN numbers with time associated to each SCN so that i can recover the databse upto that perticular SCN perior to failure.
Note: I want to use incomplete recovery Until Change. only.

Let us suppose V$Log_History displays something like.

1111 126568 356131 30-Nov-07
2222 299755 564545 30-Nov-07
3333 456871 655555 30-Nov-07

Thanks so much for your valuable time.

Re: Incomplete recovery until change [message #284741 is a reply to message #284694] Fri, 30 November 2007 14:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If/when you are really forced to recover a failed database, it is because the database is DOWN & not available!
You have NOTHING to query in order to obtain any SCN value.
The alert_SID.log file only shows sequence# & timestamp for redo logfile switches.
So recovery can be done only until the most recent log switch.

Re: Incomplete recovery until change [message #284742 is a reply to message #284739] Fri, 30 November 2007 14:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
1/ You can't have such values. If you have REAL values then the answer is obvious.
2/ You use until change only when you know the scn otherwise you use until time

By the way, date also contains time.

Regards
Michel

[Updated on: Fri, 30 November 2007 15:32]

Report message to a moderator

Re: Incomplete recovery until change [message #284745 is a reply to message #284694] Fri, 30 November 2007 15:05 Go to previous message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
oh...got the idea now.

Thanks for your clarification , i must appreciate your patience and time spent on answering my questions.

you people are always helpful.

Cheers!
Previous Topic: RMAN Incremental question
Next Topic: cold/consistent /closed backup?
Goto Forum:
  


Current Time: Tue Nov 26 12:57:51 CST 2024