views:

567

answers:

2

I want users to upload a file via our website (ASP.NET), which then gets imported into SQL Server 2005 using SSIS. Our web app is separated into a web server (IIS) and a database server (SQL Server).

The problem is that after the file has uploaded to the web server, you cannot directly call the SSIS package from the ASP.NET code, because an SSIS package will only run on a server that has SQL Server installed on it.

I've considered all sorts of things like FTP'ing the file to the database server and then having file watcher wait for it. Or calling the SSIS package remotedly which then fetches the file from the web server. But I haven't tried anything yet.

I would really like to hear if anyone has solved this problem and how they did it. We plan to do quite a bit of this (i.e. uploading files through the website that get imported into the database), so I'm after a rock-solid process that can be repeated over and over.

+2  A: 

As long as the package has a resolvable path to the file and the SQL Server process has necessary permissions, the file does not have to be colocated with your SQL Server.

We do this for our primary application, though it is not web-based. Any available designated machine can contain the incoming file, then our SSIS package looks up the file location information from the database. The package could receive it as a parameter at invocation - we tested that.

I personally don't know about the viabilty of using your webserver as the file host in this situation (all my work has been on internally hosted apps).

DaveE
So, I'll just need to make sure that SQL Server can access the file on the web server. I'll just need a good way to call the SSIS package remotely (from the web server) and pass in parameters. Thanks for the help.
Craig HB
One thing to be aware of is the file permissions (separate from access to the folder). The SQL Server process must be in a group that can read things that are written by the process that drops the file. If you move or delete the file post-process, those permissions need to exist also.We've had client run into problems if they do one-off out-of-normal-process modifications and the person who eventually dropped the file wasn't in an appropriate group.
DaveE
+1  A: 

It may not be appropriate for your deployment, but it is be possible to install the SSIS service stand-alone, independent of the SQL Server service, on you web server. I believe a stand-alone SSIS installation requires its own SQL license.

Alternatively, although it doesn't directly mirror your situation, this thread looks like it may have some relevant suggestions.

Ed Harper