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
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1378 Visits: 1131
Comments posted to this topic are about the item A script task alternative to a massive SSIS multicast transformation
Samuel Vella
Samuel Vella
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1081 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 Veteran
SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)

Group: General Forum Members
Points: 291 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
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1378 Visits: 1131
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 Veteran
SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)

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



Charles Kincaid
Charles Kincaid
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2161 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
Say Hey Kid
Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)Say Hey Kid (686 reputation)

Group: General Forum Members
Points: 686 Visits: 1799
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 Veteran
SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)

Group: General Forum Members
Points: 291 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-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41101 Visits: 18565
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.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1646 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