SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


A script task alternative to a massive SSIS multicast transformation


A script task alternative to a massive SSIS multicast transformation

Author
Message
Stan Kulp-439977
Stan Kulp-439977
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2311 Visits: 1143
Comments posted to this topic are about the item A script task alternative to a massive SSIS multicast transformation
Samuel Vella
Samuel Vella
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1905 Visits: 2144
Hi Stan, nice article, however I can't really see this as a replacement for the multicast problem mentioned, as that is a problem which should never exist in the first place.

What it does look like a potentially robust replacement for is the File System task as this would be able to wrap up some of does file checking logic and keep it out of the Control Flow area.

Should mention that error handling using a message box should only be used in a demonstation scenario. If this was a scheduled package which behaved like this then it would stop processing as it waited for the phantom desktop user to click OK!
Obs
Obs
SSC-Addicted
SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)

Group: General Forum Members
Points: 405 Visits: 424
I'm not a fan of this. Aside from it being a maintenance issue (editing the SSIS package every time a new folder is needed or removed), you could at least use a for each task and iterate over a list of directories. Inside of that loop, you could use expressions within a file task to copy it around.



Stan Kulp-439977
Stan Kulp-439977
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2311 Visits: 1143
To be honest, the only reason I wrote this is because somebody responding to one of my previous articles asked how it could be done.

Just because something can be done doesn't mean it should be done, but sometimes it's fun to do it anyway.
Obs
Obs
SSC-Addicted
SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)

Group: General Forum Members
Points: 405 Visits: 424
Fair enough. I feel the same way about Powershell.



Charles Kincaid
Charles Kincaid
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3161 Visits: 2384
Obs (1/17/2012)
I'm not a fan of this. Aside from it being a maintenance issue (editing the SSIS package every time a new folder is needed or removed), you could at least use a for each task and iterate over a list of directories. Inside of that loop, you could use expressions within a file task to copy it around.


It's still good as a teaching exercise. In practice it might be better to have a scratch location for the master and then read the destinations from some table. If you are going in for the script task (VB or C#) then take a closer look into the File I/O objects. I seem to remember that you can specify overwrite or not.

ATBCharles Kincaid
MWise
MWise
SSC Eights!
SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)

Group: General Forum Members
Points: 998 Visits: 1803
I'd definitely go with a For Each Loop and use the File Copy Task. I'd either read from a database table or configuration file. That way you don't have to touch the SSIS package when you have to change the copy locations. Honestly, I hate having tasks buried in code when there are already SSIS components available to use. I find having to crack open the code editor a PITA, and even more annoying when the developer doesn't include comments on what the code is doing and why.

Mwise



Obs
Obs
SSC-Addicted
SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)SSC-Addicted (405 reputation)

Group: General Forum Members
Points: 405 Visits: 424
Charles Kincaid (1/17/2012)

It's still good as a teaching exercise. In practice it might be better to have a scratch location for the master and then read the destinations from some table. If you are going in for the script task (VB or C#) then take a closer look into the File I/O objects. I seem to remember that you can specify overwrite or not.


Perhaps as a "How to make this better" exercise



SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63459 Visits: 18570
Charles Kincaid (1/17/2012)
...In practice it might be better to have a scratch location for the master and then read the destinations from some table.


I like this idea. While reading the article, this is what stood out to me as an obvious way to improve on the package.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

sharath.chalamgari
sharath.chalamgari
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1942 Visits: 798
nice article, How about just writing a file to the single location and then use a batch job to copy it to the diffrent folders where ever you want. may be we can include this in another step of the job that we call the ssis package.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search