Solved

SSIS Executing SPs Failed - Deadlock

Posted on 2013-01-03
7
1,463 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

821 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