Job hangs - Deleting and inserting to same table

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Set the commit level on the deletion link to 1, if you can afford to do that, so that it is committed immediately. I've had to do that in the exact same situation with an OCI stage and that worked for us.

-craig
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Another possibility is that the cursors are getting tangled somehow. Even though it costs an extra connection, using separate ODBC stages sometimes helps in this case.
csimms
Participant
Posts: 14
Joined: Wed Nov 13, 2002 6:46 pm

Post by csimms »

Ray/Craig,

Thanks for the ideas. What I did do to solve the problem was to write a before-job routine responsible for executing the table deletes and truncations. This approach seems to work fine. The reason for the before-job routine was that I need a common solution that would work for various types of database stages. We have containerized our business logic so our jobs contain mainly just connection stages. We have categories of these "wrapper" jobs, one for Oracle, one for SQL Server, and one for ODBC.

Chris

Chris Simms

Senior Systems Engineer
Extended Technologies Corporation
9708 Skillman Road
Dallas, TX 75243
csimms@xtekcorp.com
www.xtekcorp.com
214-540-4108 (Desk)
214-540-4000 (Front Desk)
214-540-4004 (Fax)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can run into grief using BCI functions (which I assume you're doing in the before-job subroutine) using ODBC drivers that require a licensing string. This has to be set via SQLSetConnectOption().
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you're not seeing the problem you don't have the problem, so smile happily and continue what you're doing.
In general, ODBC drivers supplied by database vendors (such as Microsoft and Oracle) don't have restrictions - they LOVE you to connect to their database products!
However, some third-party suppliers of ODBC drivers, such as Merant, include the requirement for client applications to supply a value for a licensing string, to prove they've paid for the driver. The drivers that DataStage uses (at 4.2, anyway, I haven't checked at 5.x) do exhibit this behaviour, and it's caught a few people out.
Post Reply