|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 2:08 PM
Points: 79,
Visits: 600
|
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 3:04 AM
Points: 328,
Visits: 1,849
|
|
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!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 2:29 PM
Points: 247,
Visits: 392
|
|
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.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 2:08 PM
Points: 79,
Visits: 600
|
|
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.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 2:29 PM
Points: 247,
Visits: 392
|
|
Fair enough. I feel the same way about Powershell.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 9:18 AM
Points: 772,
Visits: 1,825
|
|
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.
ATB
Charles Kincaid
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 9:31 AM
Points: 381,
Visits: 1,481
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 2:29 PM
Points: 247,
Visits: 392
|
|
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
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 20, 2013 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, September 17, 2012 7:30 AM
Points: 1,038,
Visits: 679
|
|
| 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.
|
|
|
|