Solved

SSIS Executing SPs Failed - Deadlock

Posted on 2013-01-03
7
1,423 Views
Last Modified: 2016-02-10
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

0
Comment
Question by:cynx
  • 4
  • 2
7 Comments
 
LVL 15

Expert Comment

by:Anuj
Comment Utility
Make sure your tables used in SPS are properly indexed so the queries completes quickly.
0
 
LVL 1

Author Comment

by:cynx
Comment Utility
Hi, yes they are.
I have executed this SSIS in test several times, which is exact copy of production; and it never failed before...
0
 
LVL 15

Accepted Solution

by:
Anuj earned 250 total points
Comment Utility
can you post the dead lock graph along with the execution plans?
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 1

Author Comment

by:cynx
Comment Utility
I have asked my DB Admin to Enable the trace with Deadlock event. I will share the plan and graph tomorrow. Thanks!
0
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 250 total points
Comment Utility
In Production some process using the same resource for long time and the SSIS package going to use that.


Some of locking in there that violate the condition and deadlock occurs.
0
 
LVL 1

Author Comment

by:cynx
Comment Utility
thanks, how to find which process is that ? Can I get this info with help of a script ?
0
 
LVL 1

Author Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now