SolvedPrivate

SSIS task only after previous task is sucess

Posted on 2013-01-27
4
53 Views
Last Modified: 2016-02-10
Hi

i have SSIS package which has 2 tasks
task1. Execute SQl task
task 2. Move Processed file to archive directory

I want to execute task2 only when task1 is executed successfully. If Task1 is not executed not successfully, ( i mean if i get error while processing task1 that is while executing stored procedure ) , i do not want to execute task2
i am using Sql server 2005

thanks,
Ram
0
Comment
Question by:ram27
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Saurabh Bhadauria earned 500 total points
ID: 38825759
For this you need to understand presidency control in SSIS

Look at below links..They have some nice screen shots and help you understand complete flow..

http://stackoverflow.com/questions/12958244/how-to-control-ssis-package-flow-based-on-record-count-returned-by-a-query

http://www.simple-talk.com/sql/ssis/working-with-precedence-constraints-in-sql-server-integration-services/

Thanks,
Saurabh
0
 
LVL 11

Expert Comment

by:SThaya
ID: 38826006
Here are the steps:

1.just give a Procendence constraint connection from task 1 to task 2 .
2. select the  Procendence constraint  link and select "Success" ..This will pass only the task 1 executes successfully

3. if the task 1 failed then your over all pakage will fail. in order to avoid that . create one more task (task 3){ send mail tak (or any other task) .}
4. connect Procendence constraint connection from task 1 to task 3 and select this Procendence constraint  link and right click select "Failure"
image.jpg
0
 
LVL 11

Expert Comment

by:SThaya
ID: 38826009
Screen shot
0
 

Author Comment

by:ram27
ID: 38827663
I tried  SThaya's approach
even my stored proc fails while executing,
Task 2 is executing
i want to execute task2 only when task1( Execute SQl task - which inter calls  stored proc ) is executed sucessfully.
I mean id there is any error while executing the stored proc , it should not execute task2
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

839 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