Resetting a job causes it to execute the stored procedure

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
RayLade
Charter Member
Charter Member
Posts: 27
Joined: Wed Sep 15, 2004 11:13 pm
Location: Australia, Sydney

Resetting a job causes it to execute the stored procedure

Post by RayLade »

We have a job that has a source odbc stage that calls a SQL Server stored proc, which inserts a record into a table and returns the same record to be processed. It works! But, when one resets the job via director, it also executes the stored proc.

Any idea why the stored proc gets executed when the job is re-set?
Ray Lade
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No idea... but I'd report it as a bug to IBM/Ascential and see what they have to say about it. What version of DataStage?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Are you resetting the job after Abort. Does it shows any log that StoredProcedure been exeduted after the entry of Job reset?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The description of "reset" is "do everything except process rows".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure you're not thinking of 'Validate'? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, Validate. :oops:

Reset would have to check the SP, however, to determine whether any transaction needs to be rolled back, cursor(s) to be dropped, and so on.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RayLade
Charter Member
Charter Member
Posts: 27
Joined: Wed Sep 15, 2004 11:13 pm
Location: Australia, Sydney

Post by RayLade »

It all seems a bit buggy to me.
When the task is created in a server job, and you click on reset from the director, it will execute (actualy, any user defined query seems to execute. For example, we tried a test "wait 15 minutes", and the reset did just that).

Not to be perturbed, we re-wrote the task in a parallel job. Reset was fine, but when it ran, the stored proc ran twice, about 2 seconds apart.

The stored proc itself runs fine, its just Ds ODBC executes it twice.

I understand that DS 7.5.1 does not support SQL Server Stored Proc stage, and that an ODBC stage should be used.

Well, we ended up using a Dynamic RDBMS stage, and this worked. Now we are going to document "If you want to use a SQL Server Stored Proc, use a Dynamic RDBMS stage, or ELSE"...

Thank you gentlemen, for your prompt response. I am happy to get it working and to leave the "bugs" as other traps for young players.
Ray Lade
Post Reply