SQL Server Performance

SSIS: directory import

Discussion in 'SQL Server 2008 Integration Services' started by dropout, Sep 23, 2009.

  1. dropout New Member

    Hi all,
    I want to do the following with SSIS. I'm pretty sure it is possible, but I'm new to SSIS ...
    • On Server A I have a directory (d:/images/) which contains .jepg pictures (image001.jepg, image002.jepg, image003.jepg, ...)
    • On Server B I have a SQL2008 and a table called images
    I need now a SSIS object, which fills all the filenames of the directory from Server A into the table of Server B. So that every file on A is a new row on B.
    Doesn't sound to complicated, right?
    Thx for any help.
    Reto E.
  2. dropout New Member

    Me again,
    I guess I could use the DOS-Command @dir g:images /A:-D /B /-C > g:DirList.txt to create a flatfile with the filenames. And then import the .txt file to the table.
    But how can I from within the SSIS "connect" to the Server A with a different Windows-Login and Password to run the DOS-Command and access the .txt-File?
    Thx for any hints
    Reto E.
  3. satya Moderator

  4. dropout New Member

    Thx for the tip with the filestream. Sounds interesting to me.
    But I already managed to create a SSIS package with a foreach loop container. I additionnaly had to make a proxyuser to run the SSIS package in the SQLServer to access the second server. Now it works like a charm.
    Reto E.

Share This Page