Loading dynamic file using DTS

  • I will be receiving 5 files from an interfacing system like IET_PAT_1.CSV, IET_PAT_2.CSV ..... IET_PAT_5.CSV etc in webserver. These files may come together or one by one.

    We have to load these files using DTS only as we are not getting access to filesystem of database server. So I am not allowed to use "dtsrun" , "bcp" and also extended procedures like xp_cmdshell.

    Can someone please help me how should I proceed ?

    Please note I am able to pick up a static file from webserver but don't how to load when the file come with _N number.

  • Do you get a list of the files that are sent?



    Shamless self promotion - read my blog http://sirsql.net

  • No. But if you think that we can crack using a file list then I will ask them to provide one

  • Can't you simply create a DTS package using the service account and schedule it?

    -Hope is a heuristic search :smooooth: ~Hemanth
  • Ya I can create a DTS package and can schedule it using SQL Agent Job. But my question how can I load dynamic files as stated above

  • If you can get a list of the files you could load them into a table, then use a looping DTS package, populating global variables based upon the contents of that table to run through and process each file in turn.

    For looping on the DTS side check out http://www.sqldts.com. There's great examples on how to accomplish it.



    Shamless self promotion - read my blog http://sirsql.net

Viewing 6 posts - 1 through 5 (of 5 total)

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