views:

66

answers:

4

So I made a package in SSIS to read data in from a text file and load it into a database table.

What's the best way to set this up for non technical end users to run this when desired?

My boss was thinking to have a SP launch it, and then have a report made in reporting services launch the stored procedure. Surely there's a better way though!

+2  A: 

ASP.NET is a good solution: http://www.codeproject.com/KB/aspnet/SSIS_DOTNET.aspx

Nissan Fan
Woah. I wasn't aware that you can call SSIS from .NET...
Sung Meister
While this may be a good solution for small packages, I think you would run into issues with larger packages. With this approach you are running the package in the context of a HTTP request, which means that if your package runs longer that the HTTP timeout value, it will be terminated. Also, IIS AppPool may get restarted automatically because of memory/cpu limits set on it, again your package will be killed. If you really want to run the package from .NET I would suggest building a Windows Service with a WCF endpoint that would be used to start the package and receive status.
unclepaul84
+1  A: 

From the command prompt:

DTEXEC.EXE /F "C:\YOUR_PACKAGE.dtsx"

Full syntax here: http://msdn.microsoft.com/en-us/library/ms162810.aspx

adolf garlic
+2  A: 

You could also create a SQL Agent Job to run the package with an empty schedule. Then create a web front end to call EXEC msdb.dbo.sp_start_job N'Your SSIS Job Name';

unclepaul84
That sounds promising. Do I get any kind of feedback that I can display on the web front end? E.g, errors, rows loaded, etc?
Greg
Yes. You can develop a wrapper around sp_help_job stored procedure that poll for Job status. For rows inserted you will need to build a custom Audit table and key it on package execution id.
unclepaul84
+1  A: 

It's not entirely straightforward, and comes with a number of health warnings, but it is possible to configure as SSRS report to use an SSIS package as a datasource - see http://msdn.microsoft.com/en-us/library/ms345250.aspx.

With this enabled, you could add an extra step to your SSIS package to output one (or more) report datasets to an SSRS report.

Ed Harper
Thanks Ed. I got this set up, it's cool. Question. If the package fails e.g., someone deleted an input file, the report just says "package failed...". Is there any way to get at the detailed failure information? To tell the user exactly what went wrong.
Greg
@Greg - good question! Perhaps one way would be to use an SSIS error handler to return an "error" dataset (holding details of the failure) to SSRS which could be conditionally displayed? I think that should work, but I haven't tried it.
Ed Harper