CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    2

    SSIS package not executing from code

    I am trying to execute an SSIS package from my ASP.NET application.

    I currently have it working by kicking off a job that runs the SSIS package from a stored procedure using the sp_start_Job stored procedure. However, this stored procedure doesn't given me any indication about whether the package executed successfully, only if it started successfully.

    I've added the following code to my web app:

    Application app = new Application();

    Package package = app.LoadFromSqlServer("SSISPackageName", "serverName"
    , "username", "password", null);

    package.ImportConfigurationFile(@"c:\Config.dtsConfig");

    DTSExecResult result = package.Execute();

    but the result is always "success". The package is supposed to upload a file, process the data and move the file to another directory, but I can see the file in never being moved.

    I know it's not a problem with the package because it runs successfully through the stored procedure. I believe the package and the configuration files are being loaded successfully.

    Any help would be appreciated!

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: SSIS package not executing from code

    within the SSIS Package you could have a couple of 'Failure' legs that write to the event log or a text file with the exception. This might give you an insight into the reason it's failing. Also, are there any restrictions on the ASP user account that might override the permissions that you are passing into the package.
    If you find my answers helpful, dont forget to rate me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured