Programmatically load SSIS package?

  • Hello,

    I need to use a SSIS package on SQL Server 2008 R2 to import lots of CSV files, with the same format.

    I want to load a package from the server (or from a DTSX file), change the file path of the source of the flat file, then execute it - but I cannot find how to do this.

    I don't want to have to construct the package from scratch programatically (to do so would be too complicated, there are 98 columns), but I have already designed it and saved it on the server.

    I remember this always used to be possible with the old DTS, so how is it that it is so opaque in SSIS?

  • The usual way I do this in SSIS is with a For Each Next loop. You can either loop through the contents of a directory, or through the rows of a data source.

    It's very easy to set those up, and they work quite well for looping through files and importing each one. With the right logic, you can even deal with complexities like multiple file formats.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply