Need Help_ My jobs aborted in the middle of loading

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
aladap12
Participant
Posts: 60
Joined: Fri Jul 20, 2007 1:15 pm
Location: NO

Need Help_ My jobs aborted in the middle of loading

Post by aladap12 »

Hi,

I have an issue with my server job. I have one job that runs every day to load data into target file/table.
Job faild after loading some records in to target, ex..
assume that i have 100 records in my input, job failed after loading 37 records, next time i have to start loading from 38 record.

how would i achinve this using datastage.

Thanks
KR
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Are you saying that it had happened or you want to prevent such happening?

Unless there is any metadata related information to locate records affected by current load, you cannot restart from failure.

Alternatively you can set the commit size to zero to ensure that it is everything or nothing.

There are other ways to do this but will involve using other objects.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Delete the 37 then rerun. Add a 'number of records to skip' job parameter and use that in a constraint.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Other options are to declare the whole load as one transaction, or to use UPSERT functionality.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Craig,

Being Server edition, I did think about deleting or including a constraint to skip 37.

But that is on the assumption that the target is direct load of source with no other dml or "prev-next" included.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

True, we can just suggest general solutions since we don't know the specifics of the 'load' being done here. And the 'skip' solution requires a static source to ensure one run's 38th record is the same as every other run's 38th record.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aladap12
Participant
Posts: 60
Joined: Fri Jul 20, 2007 1:15 pm
Location: NO

Thanks

Post by aladap12 »

Sainath.Srinivasan wrote:Craig,

Being Server edition, I did think about deleting or including a constraint to skip 37.

But that is on the assumption that the target is direct load of source with no other dml or "prev-n ...
Sainath. since i am not a Premium member i can not view this content.. could you plase give me the answer again
krishna R
krishna.padalavkr@gmail.com
Morrisville, PA-19067
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

In short, if you take out the first 37 records from input, will the resulting flow work lead to full load?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

In short, if you take out the first 37 records from input, will the resulting flow work lead to full load?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I actually meant to delete them from the target not the source and then rerun everything... but either way could work.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply