Link to home
Start Free TrialLog in
Avatar of svs1919
svs1919

asked on

SSIS error

i am running a  .bat file in a process task and i am getting this error

The process exit code was "1" while the expected was "0".  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  1:36:15 PM  Finished: 1:36:35 PM  Elapsed:  20.204 seconds.  The package execution failed.  The step failed.
Avatar of Steve Hogg
Steve Hogg
Flag of United States of America image

All this means is your .bat file errored or could not be reached by the Execute Process task. Make sure you are using a directory the package user can get to . If running from a server, use a UNC path.
Because of the time I guess the bat file erred
 
Avatar of svs1919
svs1919

ASKER

what is UNC path. Please suggest me the other possible ways to run a exe file which doest cause an error. This .bat file executes an exe file. I tried to run this exe file uisng execute process task it runs  fine when i run it manually but  when i run the package from an sql job it fires this error
Make sure the path to the .bat file and .exe it calls are accessible from the Server where it runs. Instead of c:\ make it \\server\folder\folder\sldkjf.bat
Do you have that now, if so, it might something else. Make sure the fully qualilfied path for the .exe is included in the .bat file.
Avatar of svs1919

ASKER

yes as you suggested i tried copleate path (\\server\folder\folder\sldkjf.bat) but  still i got the same  error.
what could be other possible solutions.
Are you running your package from a job?
I suggest you put some logging in your batch file and that will at least tell you whether the file was started or where it failed. Do you want to paste your batch file contents into the code snippet window and we can add logging.
Avatar of svs1919

ASKER

i am procesing the bat file  using a execute process task. Where do i find code for that? As i am relatively new i  am asking this question
Is the .exe in the bat file also prefixed with the full path? Can you paste a copy of the .bat file here?
Avatar of svs1919

ASKER

ther you go
@echo off
cd \\"Fapp22\C:\Station Sets\Test\"
StationIntegration.exe

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of svs1919
svs1919

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That means that the batch file returned 2. This means that, yes, your package was happy that it worked,
But did your batch file actually do what it was meant to do?
You should find some documentation on the StationIntegration.EXE file and find out what a result code of 2 means. Normally a 0 means everything worked, and anything else means an error. Thats why its set up that way by default in SSIS.
Avatar of svs1919

ASKER

now again the problem is back. As you said nmcdermaid ) means no erros so i changed value back to 0 and got a diffrent erro this time.
The process exit code was "-532459699" while the expected was "0".  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  

i dont know whats happening
There are quite a few issues here:
1. cd \\"Fapp22\C:\Station Sets\Test\" is not valid. You need to use C$ instead of C:  This assumes that C is shared to the SQL Server from Fapp22
2. If you are trying to run an EXE remotely (which is probably what is happening from a job), you are probably missing required DLL files on the local machine
To get a useful error message, do this:
1. Log into the machine that is running the SSIS (the actual SQL Server)
2. Press Start/Run and type CMD
3. Type  "\\Fapp22\C$\Station Sets\Test\StationIntegration.exe" and press return. Do you see any useful messages?