command line not running in ssis

Ant 26 Reputation points
2021-03-12T21:13:11.82+00:00

I have an SSIS package that That contain an Execute Process Task Editor.

I've written a console app that formats and excel file.

I'm using the Executable: C:\Windows\System32\cmd.exe
Arguments: /c c:\application\file.exe 1 c:\filefolder\file.xls

the parameter 1 is a flag to tell it which path to take in the executable file.

I can run this in the IDE and when I deploy it I can run it in the Integration Services Catalogs using Excute, I set the runtime to use 32-bit runtime and it runs successfully.

When I create a job and do the same it fails.

The error in the ErrorDescription:

In Executing "C:\Windows\System32\cmd.exe" "/c c:\application\file.exe 1 c:\filefolder\file.xls" at "", The process exit code was "-532462766" while the expected was "0".

I created a batch file and the same thing happened I was able to run it in the IDE and in the Integration Services Catalogs using Execute,

I also tried to use the file.exe as an executable and it ran in the IDE and the Catalogs.

I tested it in the command window as well and it ran.

I'm at a loss does anyone have any ideas as to what I need to do to fix this. The DBA has said that the job has access and I am able to create the excel file on the server.

I'm running the version of SQL.
Microsoft SQL Server 2014 (SP2-CU17-GDR) (KB4505419) - 12.0.5659.1 (X64)
May 24 2019 19:09:40
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 17763: )

I did not set up the server nor did the DBA we inherited it.

Please help.

Thank you.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,449 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,193 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Poblacion 1,551 Reputation points
    2021-03-13T12:11:12.83+00:00

    Exit code "-532462766" converts to hex as E0434352 which is the exception code used internally by the CLR to represent most exceptions in .NET. So it doesn't really tell us much, except that your executable is crashing with a .NET exception.

    We can't easily determine which exception it is or where it is happening. You could implement a handler for the AppDomain.UnhandledException event and use it to dump the full stack trace somewhere where you can examine it. Or you could instrument your program so that it writes to a Log everything that it's doing. This should give you an idea about where exactly it is failing and what it was doing at the time.

    The most common reason why a program would run correctly when launched in one environment and fail when run from a different place is a difference in permissions. When it is running from SSIS it will be launched from whatever account SSIS is using at the time, and this may be a service account that does not have access to one of the locations that the program is trying to read or write.


  2. Monalv-MSFT 5,891 Reputation points
    2021-03-15T07:27:42.867+00:00

    Hi @Ant ,

    I can run this in the IDE and when I deploy it I can run it in the Integration Services Catalogs using Excute, I set the runtime to use 32-bit runtime and it runs successfully.
    When I create a job and do the same it fails.

    Please check if you choose the 32-bit runtime in SQL Agent Job.

    Could you please check if the user to execute ssis package in job is the same as the user in SSIS Catalog?
    If not, please create a SQL Server Agent Proxy in job .

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.