2

I'm new to SSIS. I can see "FTP Task" in the SSIS toolbox in VS2015 Community edition. Is there an HTTP equivalent?

I have a HTTP url and some user credentials. Shared via the HTTP url is a .sql file. I want to login and download the file every Sunday @ 1am.

Can anyone point me in the right direction please?

1

Your only option is going to be calling a script. Either using PowerShell script via Execute Process task, or using C# in a Script Task to download it.

For the PowerShell script you would use Invoke-WebRequest as it supports passing in credentials. A good example of this can be found here. The example from the article:

$Credentials = Get-Credential
Invoke-WebRequest -Uri "https://www.contoso.com" -OutFile "C:\path\file" -Credential $Credentials

To keep from being prompted you can use various ways to encrypt it, just depends on if the password has to be kept secure. If not just modify it to be something like this:

$pwd = ConvertTo-SecureString "MyT0pSecr3tP@ssw0rd" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential (“username”, $pwd)
Invoke-WebRequest -Uri "https://www.contoso.com" -OutFile "C:\path\file" -Credential $creds
  • Thanks @Shawn Melton I've actually found a set of SSIS extensions that have a file download tool. I think I'm going to go with that and save the hassle of trying to write a script. Appreicate your reply though. – stevenbranigan82 Nov 22 '16 at 0:36
  • +1 for the PowerShell suggestion. Very elegant and easy to get done. – Mark Iannucci Aug 29 '17 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.