Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLCODE 244 ISAM Code 143 Urgent Help

Status
Not open for further replies.

nkm

Programmer
May 27, 2001
45
US
Hi

I have two processes running with do some inserts into a database. The inserts are in a transaction (Monitered by Encina). The first process tries to update the table while the first process is in the transaction. This results in
SQLCODE 244 ISAM Code 143.

I have tried giving lock mode row while table creation.

I have also "set lock mode to wait" on process start up but still it is coming up with the same error.

Any help on this regard would be greatly appreciated.

thanks
 
Hi:

I'd look at changing your isolation level. Here are the choices:

1) set isolation to dirty read
2) " committed read (default)
3) " cursor stability
4) " repeatable read.

Check the informix documentation for the definitions, but 1) and 2) don't place locks on the data, but 3) and 4) do.

Regards,

Ed
 
Hi,
Here is a turnaround which you may[not] be interested.
Try using the temp tables and put the inserts from temp table in the transaction. This should be done after your updates.
[While mentioning this kind, it would be more useful to understand if you can give the skeleton of the code. ]
Hope this helps.
P Parthasarathy
 
Hi Guys

Thanks for the suggestions. I went through the code and I did find a deadlock in the code.

Just an extract of what was happening in the code.

The steps that were happening in my process were

Steps PA1 (Process 1) PA2(Process 2)

1 Insert (T1) Insert (T1)

2 Insert (T2) Insert (T2)

3 Update (T1) Update (T1)

4 Delete (T2) Delete (T2)

All these steps were in a transaction.

Earlier my code did not have "lock mode to wait" so whenever
there was any table locked it used to exit with table/resource locked

The Updade could not happen on T1 with an insert until it was commited and a delete could not happen until the insert was commited on the T2

this was causing the deadlock to happen










 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top