July 31, 2010 at 10:11 am
Hello again,
Can anyone explain me why it is returned to me the following error when executing this query?
SELECT Z_PRIMARY, DOCNUMXPTO, Z_IVN, SOURCE
FROM XYZ.XYZ.I_1_V INNER JOIN XYZ.XYZ.ABC_VOLUMESON XYZ.XYZ.I_1_V.Z_IVN = XYZ.XYZ.DDN_VOLUMES.DDN_VOL_NUM
WHERE DOCNUMXPTO IN (
SELECT DOCNUMXPTO
FROM [XYZ].[XYZ].[I_1_V]
WHERE Z_IVN IN (SELECT DDN_VOL_NUM FROM XYZ.XYZ.ABC_VOLUMES WHERE DATE_REJECTED IS NULL)
AND Z_PRIMARY NOT LIKE '%_DELETED'
GROUP BY DOCNUMXPTO
HAVING ( COUNT(DOCNUMXPTO) > 1 ))
ORDER BY DOCNUMXPTO DESC
Error that i get:
Msg 1205, Level 13, State 80, Line 1
Transaction (Process ID 376) was deadlocked on thread | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
This query its being used in a process that is executed all the weeks with Control-M and it never happens before.
Any idea of what is wrong in this query or what i should change on it?
What else should i check?
Thanks and regards,
JMSM 😉
July 31, 2010 at 1:42 pm
If nothing has changed in this query, there is no need to change anything here. Looks like some other query which is executed prior to this is causing the dead lock. You may find this article useful.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
August 1, 2010 at 7:02 am
Thanks a lot.
Regards,
JMSM 😉
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply