?
SolvedPrivate

SSIS task only after previous task is sucess

Posted on 2013-01-27
4
Medium Priority
?
64 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Saurabh Bhadauria earned 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.
Suggested Courses

741 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