SQL server table update Deadlock issue :SQLSTATE = 40001

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
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

SQL server table update Deadlock issue :SQLSTATE = 40001

Post by Roopanwita »

Hi,

I am trying to upsert a SQLserver table,job design is like

SQL Server Enterprise--> CPY --> SQL Server Enterprise

Process is failing with Error :

ODBC_Connector_51,0: ODBC function "SQLParamData" reported: SQLSTATE = 40001: Native Error Code = 1,205: Msg = [Microsoft][SQL Server Native Client 10.0][SQL Server]Transaction (Process ID ##) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. (CC_OdbcDBStatement::executeUpdate, file CC_OdbcDBStatement.cpp, line ###)

I tried to replace SQLServer Enterprise with ODBC connector stage , still no hope.

My target table (table I am trying to update) is Indexed and trying to update on Indexed column only.

If I try to write insert/update statement in SQLserver it works fine(in Management Studio)

I seared in DSXchase and foud the below link and tried to change Arrey to readUncommited , still not working

viewtopic.php?t=140177

Is there any other property I need to change?

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you updating the same table you are selecting from? Does the job work without issue if you run it on one node?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Thank you for reply.
I am not updating same table I am selecting from. Only I am doing update Then insert in target and i am using Odbc connector stage for that.Source and targets are different.I tried to run with 1 node, still no luck. Even I tried update<table_name> with nolock in update query. I tried to change array size to 1 even, then job doesn't fail, it keeps on running. Is that issue with table?
Thank you,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Changing the array size to 1 could 'solve' the problem but at the cost of it running very slowly, you'd have to wait for it to complete to know. And are you certain you managed to run it on a single node? If you had I don't see how it could have deadlocked with "another process" - assuming you received the same error.

Have your talked to your DBA about this?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply