Accessing FTP location using T-SQL

  • Hi,

    One my client want to access the files from FTP location & copy it to his local drive.

    How can I do this? he share the user name & password for the same.

    I have to finish this ASAP

    Abhijit - http://abhijitmore.wordpress.com

  • You can do this in T-SQL by using cmd_shell to execute the stanard DOS commands for FTP sites (PUT, GET etc..) though you need to be aware that enabling cmd_shell can cause a security risk as it allows command line commands to be executed on your server.

    Why does this need to be done in T-SQL ? a better solution would be to use SSIS and use the FTP task.

    http://technet.microsoft.com/en-us/library/ms137656.aspx

  • like steve said just use a simple SSIS package and run that as a sql job. If its an SFTP site you will have to use a 3rd party app and script it as part of the SSIS job. I use WinSCP but there are others out there that im sure do an equally good job.

  • Thank for you replies. I have already done it by using SSIS- FTP task.

    Abhijit - http://abhijitmore.wordpress.com

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

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