Link to home
Create AccountLog in
Avatar of cynx
cynxFlag for India

asked on

SSIS Executing SPs Failed - Deadlock

I have a SSIS Package which executes few SProcs (on SQL server 2008) , updates a table and exports data in a csv which is FTP'ed.

I have able to successfully execute the package in TEST environment (Hosted on a diff server).

However when I try to execute this package on production , I encounter below error. Any idea what could be causing this? (I have attached the code which calls the SPs from SSIS)

[Execute SQL Task] Error: Executing the query "declare @dt as datetime2
set @dt = SYSDATETIME()
..." failed with the following error: "Transaction (Process ID 94) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


declare @dt as datetime2

set @dt = SYSDATETIME()

EXECUTE [SP_0_TEMP_DELETE] 
EXECUTE [SP_1_TEMP_APPEND] 
EXECUTE [SP_2_TEMP_APPEND_EXPIRED_RENEWALS] 
EXECUTE [SP_3_UPDATE] @dt
EXECUTE [SP_4_UPDATE_EXPIRED_RENEWALS] @dt
EXECUTE [SP_5_APPEND] @dt

Open in new window

Avatar of Anuj
Anuj
Flag of India image

Make sure your tables used in SPS are properly indexed so the queries completes quickly.
Avatar of cynx

ASKER

Hi, yes they are.
I have executed this SSIS in test several times, which is exact copy of production; and it never failed before...
ASKER CERTIFIED SOLUTION
Avatar of Anuj
Anuj
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of cynx

ASKER

I have asked my DB Admin to Enable the trace with Deadlock event. I will share the plan and graph tomorrow. Thanks!
SOLUTION
Avatar of Alpesh Patel
Alpesh Patel
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of cynx

ASKER

thanks, how to find which process is that ? Can I get this info with help of a script ?
Avatar of cynx

ASKER

Thanks folks. Sorry for delay in assigning points. It was indeed a deadlock issue which was resolved by DB Team.