SolvedPrivate

SSIS task only after previous task is sucess

Posted on 2013-01-27
4
55 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
API v SOA 8 42
Database Mail Profiles 1 22
T-SQL: I need to add an index on a field 5 27
When else statements to move fields 3 41
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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 SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

726 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