Commit after the stop of a job

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
eoyylo
Participant
Posts: 57
Joined: Mon Jun 30, 2003 6:56 am

Commit after the stop of a job

Post by eoyylo »

Hi,

Sometimes it is necessary to stop a running job that is writing in an oracle table. In this case the job do a COMMIT before to stop all activities.

In our job we have TRANSACTION HANDLING set to 0 because we want the commint at the end of the run.

Is it possible to configure the job or the DataStage Server to avoid the commit when someone stop it ?

Thanks in advance



Mario Loreti
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How are you stopping the job? You need to do it in a way that causes the job to end 'abnormally' so the commit does not happen. I think you can do that from the command line but I don't know the syntax off the top of my head. :? I'll double-check when I get into the office.

One sure fire way is to tackle it from the Oracle side... kill the Oracle process! The job will stop and no commit will occur. :twisted:
-craig

"You can never have too many knives" -- Logan Nine Fingers
eoyylo
Participant
Posts: 57
Joined: Mon Jun 30, 2003 6:56 am

Post by eoyylo »

Hi,
unfortunately the same parson that run the job would like to stop it clicking the "stop" button in Director. In this case is impossible to avoid the commit, right?

thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Stopping the job via Director will cause the job to abort, which means that the COMMIT at end of processing will NOT occur. As long as you have it set to 0, no rows should commit by using the STOP button in Director.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
cecilia
Participant
Posts: 33
Joined: Thu Jan 15, 2004 9:55 am
Location: Argentina
Contact:

Post by cecilia »

Hi
When I was developing in a customer two years ago with Oracle DB, I had jobs with transaction size set in 0. When I run these jobs in Dev environment, if they abort, they rollback. When I run them in Prod environment, if they abort, the rollback doesn't happen and the inserted record, keep in the table.
I told with Oracle DBA and he said that both environments had same configuration but I think he was missing something.
My conclusion is that database configuration has priority over DS settings.
Regards, Cecilia
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

I would counsel against ever stopping a job via Director especially in a production environment. I liken it to executing a kill statement on a process in UNIX. My experience with it has not been a happy one. I don't believe it to be a method that has been coded to a production level of robustness. It is okay for developing jobs but should not be incorporated into standard operating procedures. Others might disagree. My prime example is that it won't always adequately stop a real-time job using MQseries. The job stops but more often then not, an orphaned child process will live on until killed manually.
Post Reply