September 30, 2011 at 5:29 am
Hi,
How to download a file over http using SSIS...? what are all the steps i should do to get this done..? Some one explain me step-by-step?
Thanks,
Charmer
October 2, 2011 at 11:06 pm
Well..since I am not clear with the host which has the file...
Follow these steps:
1. Develop a ST to do the following:
a. Create a connection with host
b. Create a pointer to the file
c. Download the file
d. Close the connection
Hope this helps!!
Raunak J
October 3, 2011 at 1:41 am
Hi,
I'm not understanding the way...
how can i create a connection over HTTP....what is the connection manager that i should use?
Thanks,
Charmer
October 3, 2011 at 1:48 am
Prakash,
help us help you...don't provide information in parts...
give a detailed brief of your situation and the methods that you have tried for a faster resolution 🙂
Raunak J
October 3, 2011 at 3:22 am
I don't have any ideas about tha...
i just wanna know whether it is possible to download a file through SSIS package...?
if we can...i wanna see an example then...
can you help me,Raunak?
Thanks,
Charmer
October 3, 2011 at 4:25 am
Yes it is possible in SSIS, with a script task you can pretty much do anything.
you can use the Http connection manager with a script task,
or else use the System.net.webclient .NET class to do it entirely in .NET.
If you do a search on google there are loads of examples using either method.
October 3, 2011 at 6:56 am
Steve, I really do not see any point in spoon feeding.
Raunak J
October 4, 2011 at 8:29 am
I was in the same predicament, with people in this forum being nasty and not helpful.
Here is some code you can use, needs tweeking but worked for me.
SSIS VB 2008 script task.
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic 2008.
' The ScriptMain is the entry point class of the script.
Imports System
Imports System.Data
Imports System.Math
Imports System.Net
Imports Microsoft.SqlServer.Dts.Runtime
<System.AddIn.AddIn("ScriptMain", Version:="1.0", Publisher:="", Description:="")> _
<System.CLSCompliantAttribute(False)> _
Partial Public Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
Enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
End Enum
Public Sub Main()
Dim WebConnection As New WebClient()
Dim connectionString As String
Dim creds As New NetworkCredential("username", "password")
connectionString = "https://ftp.website.com"
Try
With WebConnection
.BaseAddress = connectionString
.Credentials = creds
End With
Catch ex As Exception
Dts.Events.FireError(0, "Problem connecting to website: ", ex.Message, "", 0)
End Try
Try
With WebConnection
.DownloadFile(connectionString, "\etworkshare")
End With
Catch ex As Exception
Dts.Events.FireError(0, "Problem downloading file: ", ex.Message, "", 0)
End Try
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
October 4, 2011 at 8:41 am
Hi Churl,
i agree with you....im asking this question to the forum friends because i don't know how to get this done and even im a newbie....if their responses is like kind of weird....then what can i do?
anyway thank you very much Churlbut,
yes,this script looks pretty much different...
is this for dynamic process?
Thanks,
Charmer
October 4, 2011 at 9:10 am
All you need to do is put the connection information in and where you want to download to.
SSIS does not support HTTPS so you don't need the connection manager.
I was uploading so you might need to make a few changes. Since you are downloading it should be relatively easy to test this out.
Keep me posted on your progress.
October 4, 2011 at 9:14 am
Churl, we can use http connection manager in ssis...
we have that option...
i need this process dynamically...
Thanks,
Charmer
October 4, 2011 at 9:20 am
If you are don't need to do it with a secure connection try this:
http://www.sqlis.com/post/Downloading-a-file-over-HTTP-the-SSIS-way.aspx
October 4, 2011 at 9:24 am
yeah...i already saw this page...
im searching for dynamic process of downloading the file...
Thanks,
Charmer
October 7, 2011 at 1:00 am
Do you want to make Http connection string as dynamic ? if so use package configuration
Regards - Deepak.A
October 7, 2011 at 2:28 am
how to do that, Deepak?
Thanks,
Charmer
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply