Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to restrict to stop the package if one of the excel tab gives error Expand / Collapse
Author
Message
Posted Thursday, December 20, 2012 4:12 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
Hi,

I have developed a SSIS package.

Source : XLSX File

Destination : SQL Server Table

The XLSX files contains 4 tabs. I am loading 4 tabs into 4 different tables by creating 4 data flows.

Steps:

inside For each loop container

1. Used Script Component

i have checked whether the given file is valid or not. if valid, it executes the step 2. if not valid, it send out an email

2. Used 4 Dataflows one for each tab. All are independent data flows

please find the strucure attached:




Ques:

If any one of the tabs get failed, it should not load the other three tabs.

Please advise how to proceed.


Regards

SqlStud




  Post Attachments 
error_Tabs.jpg (4 views, 33.25 KB)
Post #1398898
Posted Thursday, December 20, 2012 5:13 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 11:42 AM
Points: 13,295, Visits: 11,086
Enable transactions in your SSIS package. You can either use the built-in transaction mechanism which uses MSDTC, or you can create your own transaction by putting a SQL Task with "BEGIN TRANSACTION" at the start of your package and a SQL Task with "COMMIT" at the end of the package. Make sure you set RetainSameConnection to true for the connection manager.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1398917
Posted Thursday, December 20, 2012 5:20 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
Koen Verbeeck (12/20/2012)
Enable transactions in your SSIS package. You can either use the built-in transaction mechanism which uses MSDTC, or you can create your own transaction by putting a SQL Task with "BEGIN TRANSACTION" at the start of your package and a SQL Task with "COMMIT" at the end of the package. Make sure you set RetainSameConnection to true for the connection manager.


Thanks MCSA.

Can you please let me know how to do it?

Regards
SqlStud
Post #1398918
Posted Thursday, December 20, 2012 5:30 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 19, 2013 4:30 AM
Points: 78, Visits: 195
sqlstud (12/20/2012)
Koen Verbeeck (12/20/2012)
Enable transactions in your SSIS package. You can either use the built-in transaction mechanism which uses MSDTC, or you can create your own transaction by putting a SQL Task with "BEGIN TRANSACTION" at the start of your package and a SQL Task with "COMMIT" at the end of the package. Make sure you set RetainSameConnection to true for the connection manager.


Thanks MCSA.

Can you please let me know how to do it?

Regards
SqlStud


One way of mainitaining explicit transaction Koen has already mentioned by putting Exec SQL Task.
For the first one please refer below URL

http://technet.microsoft.com/en-us/library/cc304421.aspx
Post #1398922
Posted Thursday, December 20, 2012 8:34 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
rhythm.varshney (12/20/2012)
sqlstud (12/20/2012)
Koen Verbeeck (12/20/2012)
Enable transactions in your SSIS package. You can either use the built-in transaction mechanism which uses MSDTC, or you can create your own transaction by putting a SQL Task with "BEGIN TRANSACTION" at the start of your package and a SQL Task with "COMMIT" at the end of the package. Make sure you set RetainSameConnection to true for the connection manager.


Thanks MCSA.

Can you please let me know how to do it?

Regards
SqlStud


One way of mainitaining explicit transaction Koen has already mentioned by putting Exec SQL Task.
For the first one please refer below URL

http://technet.microsoft.com/en-us/library/cc304421.aspx


Thanks....

But it didnt solved the problem.

it given the error as "
[Connection manager "src"] Error: The connection does not support enlisting in distributed transaction. "
Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Src" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Regards
SqlStud
Post #1399010
Posted Thursday, December 20, 2012 11:07 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 11:42 AM
Points: 13,295, Visits: 11,086
My guess is MSDTC isn't running.

You can always try with the Execute SQL Tasks as I mentioned earlier.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1399201
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse