Solved

SSIS Executing SPs Failed - Deadlock

Posted on 2013-01-03
7
1,449 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SELECT query on two levels (detail and summary) 13 48
SQL Server Designer 19 39
SQL View nearest date 5 35
sql how to count case when 4 14
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

785 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