Deadlocked on lock resources

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
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

Deadlocked on lock resources

Post by jpraveen »

Hi
while i am running the job i am getting the error
APT_CombinedOperatorController(2),0: Fatal Error: [IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transa
Is this a Lock made by Datastage or it is a database lock

My job will had a Update SQL and the target is also is one of my source,
what my logic is i want to update my target table based on INNER JOIN on some other tables and some where Clauses
so can anyone explain why i am getting this lock.
and same updates are doing on other Tables its working fine
but for this Job only iam getting this error.
Jaypee
BMSK
Participant
Posts: 41
Joined: Wed Feb 06, 2008 7:00 am
Location: Bangalore

Post by BMSK »

After join u updateing all the colum?
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

BMSK wrote:After join u updateing all the colum?
Please do not use SMS style abbreviations in your post. It will make future searcher's task difficult if their native language is not english.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

Post by jpraveen »

Hi

I am doing only UPDATE ONLY in upsert mode.

my job will be

SRC1
-
-
------Lookup-----Transformer------Target(one of the source)
-
SRC2-


my actual query is

UPDATE Table_name
SET Table_name.HospitalGRP = [Hosp_Grp_Num], Table_name.HospitalFAC = [Hosp_Num]
from Table_name
INNER JOIN Table_name2 ON
( Table_name.SPECIALTY_PRODUCT_INDIC = Table_name2.PROBASE_PRODUCT_TYPE)
AND ( Table_name.EnrollmentFacility = Table_name2.PRVDR_FAC) AND
( Table_name.EnrollmentGroup = Table_name2.PRVDR_GRP) AND
( Table_name.StateCode = Table_name2.StateCode)
WHERE ((( Table_name.StateCode) In ('CA','OK','TX','OR')) AND
(( Table_name.PCP_INDIC)="Y") AND (( Table_name2.PRIMARY_HOSPITAL_INDICATOR)="Y"));

can any one help on this?
Jaypee
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

It is a database lock which may be caused by datastage. Please give some more information on your job design.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Query isn't the issue and as noted it is a database deadlock. You could be locking yourself or you could have had the bad luck to be deadlocked against another process. Is this repeatable? Does running on one node solve the problem?

If yes, you may be able to solve this by using intelligent hash partitioning with multiple nodes so one node doesn't run into another.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

Post by jpraveen »

Hi

i am running on 2-node processor
and i made the target as HASH partitioning and the job finished successful for a particular job and again for another job the job got aborted with folloeing error message

ODBC_Enterprise_76,1: Fatal Error: [IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transa

my source and target is SQl-Server.I made target as HASH partition and job was successful for 1 job and for another job it was aborted due to Lock

could you please help on this?

Thanks in Advance
Last edited by jpraveen on Mon Sep 13, 2010 1:23 am, edited 1 time in total.
Jaypee
lika97
Participant
Posts: 16
Joined: Thu Jan 03, 2008 9:37 am
Location: lika

Post by lika97 »

jpraveen wrote:Hi

i am running on 2-node processor
and i made the target as HASH partitioning and the job finished successful

Thanks to all
What database you are using? If it is teradata add, LOCKING ROW FOR ACCESS for all selected queries then you wont be locked your self.

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

Post by chulett »

It is specified in the error message - SQL Server.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

Post by jpraveen »

Hi

i am running on 2-node processor
and i made the target as HASH partitioning and the job finished successful for a particular job and again for another job the job got aborted with folloeing error message

ODBC_Enterprise_76,1: Fatal Error: [IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transa

my source and target is SQl-Server.I made target as HASH partition and job was successful for 1 job and for another job it was aborted due to Lock

could you please help on this?

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

Post by chulett »

Please do not duplicate posts. You've should have simply put all of the detail in your new post into this one rather than start a brand new topic. :?

When I get some time later, I'll merge the two.
-craig

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