Home » Other » Training & Certification » Log switch query (9.2)
icon5.gif  Log switch query [message #312008] Mon, 07 April 2008 14:17 Go to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
Hello,

This question was asked to me during the interview which I couldn't answer as lack of knowledge. The question is as follows:-

During the log switch the log member's status which is being switched changes from active to inactive for a while and again comes back to active...why?

Please correct me if my query is wrong but this query was asked to me.

Regards.
Re: Log switch query [message #312009 is a reply to message #312008] Mon, 07 April 2008 14:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First question: is this true?
Then you have to ask you what is the meaning of these status.
Remember interview questions are not only to test your knowledge but also to test your behaviour.

Regards
Michel
Re: Log switch query [message #312112 is a reply to message #312009] Tue, 08 April 2008 00:41 Go to previous messageGo to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
Yes it is true.

It has logical reason.

If a log member is being written to, its status is 'CURRENT', as soon as log switch occurs, its state is 'ACTIVE' for the time till the data is written to the datafiles, after which it becomes 'INACTIVE'. After this it never becomes 'ACTIVE' again till again log switch occurs and the cycle repeats itself. But a log group never goes from the 'INACTIVE' state to the 'ACTIVE' state directly.

Regards.
Re: Log switch query [message #312137 is a reply to message #312112] Tue, 08 April 2008 01:27 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You didn't explain the logical reason.
What does mean each status?

Regards
Michel
Re: Log switch query [message #312146 is a reply to message #312137] Tue, 08 April 2008 01:53 Go to previous messageGo to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
Please read carefully...where have I mentioned "each status"???

Answer is logical itself.
Re: Log switch query [message #312154 is a reply to message #312146] Tue, 08 April 2008 02:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I read carefully you mentioned the name, you didn't mention what is their meaning or function.

Regards
Michel
Re: Log switch query [message #312158 is a reply to message #312154] Tue, 08 April 2008 02:13 Go to previous messageGo to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
What do you want to know? function of redo log members?

My query was different and you are asking for some other clarification.
Re: Log switch query [message #312177 is a reply to message #312158] Tue, 08 April 2008 02:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What ACTIVE means?
What INACTIVE means?

I can say you you'd fail the interview if I was the interviewer.

Regards
Michel
Re: Log switch query [message #312184 is a reply to message #312158] Tue, 08 April 2008 02:48 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Note that Michel is not asking you because he does not know. By asking these questions, he shows you the way to get (and reason) the answer to your question.
Re: Log switch query [message #312194 is a reply to message #312184] Tue, 08 April 2008 03:04 Go to previous messageGo to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
Active - It indicates that online redo log file group is active but not the current online redo log file group. It may be in use for recovery or may not be archived.

Current - The group which is being used.

Inactive - Indicates that online redo log file group is no longer required for instance recovery. It may or may not be archived.
Re: Log switch query [message #312209 is a reply to message #312194] Tue, 08 April 2008 03:47 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So now you have the definition of these status, how can you answer your first question?

Can a log file go from current to inactive to active (to inactive)?

Regards
Michel
Re: Log switch query [message #312239 is a reply to message #312209] Tue, 08 April 2008 05:00 Go to previous messageGo to next message
oraclesavvy
Messages: 9
Registered: May 2007
Junior Member
You didn't read my question carefully...I am talking about what happens during log switch...and it is true that log member changes it status.

Log member being switch - status current

Log member after log switch - status active till data is written to
datafiles.

Once data has been written to datafiles, it's status never becomes active till next log switch.



Re: Log switch query [message #312246 is a reply to message #312239] Tue, 08 April 2008 05:08 Go to previous message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
The point is that your first question:
Quote:
During the log switch the log member's status which is being switched changes from active to inactive for a while and again comes back to active...why?

Can actually be answered by your observations, therefore the answer to the question
Quote:
Can a log file go from current to inactive to active (to inactive)?
Will help you to answer the original question.
Previous Topic: PL/SQL follow-up
Next Topic: Query to find common job in all departments.
Goto Forum:
  


Current Time: Tue Dec 06 12:31:19 CST 2016

Total time taken to generate the page: 0.10039 seconds