Solved

SSIS Executing SPs Failed - Deadlock

Posted on 2013-01-03
7
1,488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 15

Expert Comment

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

Author Comment

by:cynx
ID: 38740651
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
ID: 38740658
can you post the dead lock graph along with the execution plans?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:cynx
ID: 38743156
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
ID: 38743631
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
ID: 38743725
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
ID: 39006128
Thanks folks. Sorry for delay in assigning points. It was indeed a deadlock issue which was resolved by DB Team.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have a large data set and a SSIS package. How can I load this file in multi threading?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

752 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