View previous topic :: View next topic
|
Author |
Message |
kumar119119
New User
Joined: 31 May 2010 Posts: 25 Location: Pune
|
|
|
|
Hi Folks,
Good Evening,
this is L&T Infotech interview question last week
interviwer :
If I use commit for every 10000 rows by "cursor with hold" option, If job abended aftr 10000 rows I restarted job again, Now how the system know the 10000 rows are committed?
me :
when you restart the job 10000 rows already committed, so it starts the execution from 10001 row...
interviewr : No, I know it, But I want how system knows those 10000 rows are committed,
Please friends....help me in this...
Thanks in advance |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
If I use commit for every 10000 rows by "cursor with hold" option |
I suspect this is not what the interviewer asked. . .
COMMIT has nothing to do with "cursor with hold".
COMMIT has to do with causing updates (insert/update/delete) to be made "permanent".
Your answer is incomplete at best. It will not start from 10001 magically. A restart process is required. |
|
Back to top |
|
|
kumar119119
New User
Joined: 31 May 2010 Posts: 25 Location: Pune
|
|
|
|
Thanks for your reply Dick scherrer,
The thing is he wants to know is how system knows the rows are committed when the job restarted,
Suppose when we give commit for certain check point like for every 10000 rows aftr processing one lakh rows when job abended,
So we again restart the job rows start processing,,
the interviewer asking me how the Database/system knows the one lakh records processed/commited....
please dick if u dnt understand the question ask me,
but i am expecting better answer
Thank you |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
please dick if u dnt understand the question ask me, |
I understand what you typed and i read, but that may not be what you actually meant. . .
Quote: |
but i am expecting better answer |
Then you need to change your expectation. . .
Until you gain a much better understanding of checkpoint, there can be no "better answer".
The system does not "know" that 10000 rows were recently updated. The system only knows which rows are now in the database (anything not committed would have been backed out to the last checkpoint (commit)) when the abend occurred.
If there is an intention to restart "in the middle", it must be incorporated into the process. There is nothing that automatically does this - it is part of the design of the appliocation system. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
normally I stay out of these type of discussions which should have been
posted in the rookie/beginner/school website.
Satish kumar reddy.T,
had you not prevaricated with your cv/resume
and claimed more knowledge and experience that you obviously do not have,
the interviewer may have not asked a question,
which a more knowledgeable individual would have countered with dialog
concerning the process and the standards employed by the organization,
(which you were in the process of attempting to hoodwink),
and thru this dialog, your conversation would have then lead to an adequate answer.
but you don't and didn't
and then had the misfortune of yet, again, exposing your ignorance,
when Dick was attempting to answer your question,
with the questions that you should have asked the interviewer. |
|
Back to top |
|
|
kumar119119
New User
Joined: 31 May 2010 Posts: 25 Location: Pune
|
|
|
|
Hi Dick,
Thanks a lot,
Thanks for the info, |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you are welcome from both of us (even if I do speak for Dick).
glad we were of help and able to guide you. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hello Kumar,
Looks like you are still looking for an answer.
Well, whenever the commit is done, all the updates to the databases till that point get commited. So, if the job abends say at some record after the X commits, then you have to restart the job in such a way (and not the system knows, but you provide the restart logic) that you start apply the process from X*commitfreq + 1 input record.
Hope this helps. |
|
Back to top |
|
|
kumar119119
New User
Joined: 31 May 2010 Posts: 25 Location: Pune
|
|
|
|
Hi Ajay Baghel,
Good Evening,
Your answer totally clarified my doubt,
Thanks a lot for your answer,
And thanks to Dick scherrer and Dick Brenholtz for sharing your valuable time for my question. |
|
Back to top |
|
|
|