Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS Sequence container Transaction Option

I have an SSIS package which is pretty simple, just a data import and an execute SQL task thereafter. I want to roll everything back if any part of the package should fail so I put these tasks within a Sequence Container and set the Sequence Container TransactionOption property to 'Required' and set FailPackageonFailure property to 'True'. This worked fine when I was targeting the local db. However when I try to change the OLE DB Connection to a remote server the aforementioned property settings cause the package to hang and finally fail with a message of 'Could Not Acquire Connection'. I have seen similar descriptions of this problem on the web but the advise is always to check the Connection. However I know the connection is fine because when I change TransactionOption property back to its default of 'Supported' the package runs fine.

Does anyone know why this could occur? I'm assuming it has something to do with different settings on the server I'm trying to connect to. Also does anyone know a different way of ensuring a complete rollback if any part of the package should fail.

Thanks for reading

like image 684
stoic_monk Avatar asked Jan 22 '13 16:01

stoic_monk


1 Answers

You need to use the Distributed Transaction Coordinator.

The Distributed Transaction Coordinator (DTC) service coordinates transactions that update two or more transaction-protected resources, such as databases, message queues, files systems, and so on. These transaction-protected resources may be on a single computer or distributed across many networked computers.

Because you are trying to establish transactions between servers, it requires a service to coordinate the SQL Server Services. Here is an article on how to do it.

Make sure to start and configure the service, as well as create exceptions in the windows firewall for the services between the servers.

See this article on Transactions for more information: http://www.mssqltips.com/tip.asp?tip=1585

Also you might need to look more into how the MSDTC works in relation to SSIS to get your issue resolved.

like image 190
jwhaley58 Avatar answered Sep 23 '22 16:09

jwhaley58