[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SSIS - can you have a Distributed Tranasaction across multiple connection managers?

Posted on 2012-08-20
3
Medium Priority
?
473 Views
Last Modified: 2012-10-02
I have one task that executes Stored Procedure A which inserts and deletes data based on reading another table on another server.  

I have another task that executes Stored Procedure B that updates a table on a different server using a different connection manager.

I would like to have that under one commit but everything I read says that it has to be under one connection manager.  If I put everything in one Stored Procedure and use the Linked Server to do the update then it is way too slow!  So having two separate tasks that are performed under two different connection managers is working very quickly but I would like to make sure that Stored Procedure B gets committed only if Stored Procedure A is successful.  And ideally, to rollback if there is a problem with Stored Procedure B.

Thanks, Abbi
0
Comment
Question by:Bodhi108
  • 2
3 Comments
 
LVL 14

Expert Comment

by:nishant joshi
ID: 38317867
Hi Abbi,
you can use sql try catch block in first exexcute sql task.
if it raise error then rollback it in catch and raise error from execute sql task using RaiseErro() function..


Thanks,
Nishant
0
 

Accepted Solution

by:
Bodhi108 earned 0 total points
ID: 38443356
With Stored Procedures, I don't believe this is possible so I'm closing this Question.
0
 

Author Closing Comment

by:Bodhi108
ID: 38453847
Don't think this is possible to rollback outside of a Stored Procedure...
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
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…
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…
Suggested Courses

834 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