Informix Table Read-Locking Problem

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
paragap
Participant
Posts: 2
Joined: Fri Oct 17, 2003 12:23 pm

Informix Table Read-Locking Problem

Post by paragap »

Hi,
I'm working with DataStage PX 6.0.1.
I am using a Shared Container to insert in an Informix Database (with ODBC stage).
While the job executes, the informix table gets locked (even for read), probably due to exclusive lock. I know this is necessary for database integrity purposes, however, I need this table to be readable by other users.

Is there any particular TRansaction Handling setting or any similar setting that will help me achieve this and circumvent the problem?

Thanks in advance
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Informix Table Read-Locking Problem

Post by bigpoppa »

Are you sure this is a DataStage problem? If you write to the table outside of DS, does the table get a read-lock?

- BP
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

Also, do you still get the table lockout while using the Informix stage for PX? Is it even possible to use that stage for your infrastructure?

In fact, open question to everyone: Within PX, if provided an option to use the native stage, and an ODBC stage, why use ODBC?

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
paragap
Participant
Posts: 2
Joined: Fri Oct 17, 2003 12:23 pm

Post by paragap »

I am not using Informix Extended Parallel Server (XPS). The operator provided by PX is for Informix XPS. I am constrained to use Informix 9.30.FC3X1.
This is, apparently not supported by PX in 6.0.1, hence the use of ODBC.

Yes, I think it must be a DS problem( or feature) to lock the table during writes in exclusive mode, and reads are prevented. Once the DS job gets over theres no problem.

I need to override this.

Any suggestions for transaction settings?
Please keep the suggestions coming.

Thanks again, guys. :)
jungle
Participant
Posts: 15
Joined: Thu Oct 16, 2003 4:13 am

Post by jungle »

Hi paragag.

In the ODBC stage properties look at the section "transaction handling"; there, set "rows per transaction" = 1.
Doing that way you set Datastage to execute a commit after every single row to be writted.
The setting i have just described is useful, for example, if records coming from the trasformer have to be written with three different trasformations on the same table.
If locks persist, look at constraints in the trasformer for target tables: ensure that the following are not present:

L4.REJECTEDCODE = DSE.NOERROR AND L4.REJECTED

If present, translate that form in a usual sql-style constraint.
And more, if you are skilled enough, you can always manage locks using the before and after section of the ODBC stage (using, for example, locks in share mode)

I hope that tips will help you.

Regards,
RRinaldi
Planet
Participant
Posts: 1
Joined: Mon Feb 04, 2002 3:32 am
Location: Netherlands

Re: Informix Table Read-Locking Problem

Post by Planet »

When reading from informix, you can set the following in before sql to avoid locking the table.

set isolation to dirty read;

Regards,

Salim Omari
Planet Technologies
Postbus 1042
3800 BA AMERSFOORT
Tel: 030-6588450
Fax:030-6588290
E-mail: s.omari@planettechnologies.nl


paragap wrote:Hi,
I'm working with DataStage PX 6.0.1.
I am using a Shared Container to insert in an Informix Database (with ODBC stage).
While the job executes, the informix table gets locked (even for read), probably due to exclusive lock. I know this is necessary for database integrity purposes, however, I need this table to be readable by other users.

Is there any particular TRansaction Handling setting or any similar setting that will help me achieve this and circumvent the problem?

Thanks in advance
Post Reply