Solved

How to "do after" in SSIS

Posted on 2011-02-10
8
256 Views
Last Modified: 2012-05-11
Dear All,

In my data flow I read data from source with condition, and copy to my destination db.

After finish, i try to set 1 column in my source table to be "finished".

I could think of putting 1 SQL task in OnPostExecute event handler. However if I don't want to re-write that source condition again, is there any quick way I could do it directly in data flow?


Thanks a lot!
0
Comment
Question by:chenyuhao88
  • 4
  • 4
8 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 34868305

to Copy data to destination you must be used OLE DB Destination.
After this on Success flow you can add one OLE DB Command
 or Script Componnent.and ad your code here to set column value

In Script component you need to write down code for it
0
 

Author Comment

by:chenyuhao88
ID: 34868392
Hi pratima_mcs,

My source is OLE DB and my destination is ADO.NET. Is that ok?

0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 34868445
yes on succeess flow you can add next command
0
 

Author Comment

by:chenyuhao88
ID: 34868459
could I add on success flow in data-flow? Or shall I do it in control-flow?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 34868482
In dataflow after Ado.net destination , It will have two flows to it..one sucees ..green line and one error Red line
0
 

Author Comment

by:chenyuhao88
ID: 34868528
pratima_mcs,

My "ADO NET Destination" has only 1 red error line.
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 34868696
have you used Store procedure fo Ado Destination ?

If yes you cann add your code in the SP itself to set the parameter.

Or you can add screep task to control flow then
0
 

Author Closing Comment

by:chenyuhao88
ID: 34949153
Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now