Solved

Execute Process Task

Posted on 2009-04-09
16
612 Views
Last Modified: 2013-11-10
Hi i have  two process tasks. One runs .bat file and other runs.exe files. When i run them  manually they run fine fine but  when i automate them that dosent  give any error but it does not  do what it is  supposed to do. What could be the reson. It shows no errors
0
Comment
Question by:svs1919
  • 8
  • 8
16 Comments
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24107605
Are you running the package from your pc or via a SQL Server Agent job?
If the process task does not return an error that means the process (bat or exe) is being executed.
If you run from your PC then you should be able to see the windows dos window popup.
0
 

Author Comment

by:svs1919
ID: 24107967
i  am runnign the package using SQL Server Agent.

Yes  when i run from my PC a popup window is seen and the work is  done. But if i automate it  why doesent it  work?
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24108538
Make sure the SSIS Package contains a path that is visible from the server. Also, make sure the SQL Server user has access to that path as well.
When you view history from the job, what is the detail message?
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:svs1919
ID: 24109324
yes both the files are in c: drive  so they should be easyly accessable
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24110091
Is that c: reference visible from the server. Send me the history from View History on the SQL Server Agent job.
0
 

Author Comment

by:svs1919
ID: 24110330
Here you go
Message
The job succeeded.  The Job was invoked by Schedule 111 (XYZ Test).  The last step to run was step 1 (test).

Message
Executed as user: ABC\sqladm. Microsoft (R) SQL Server Execute Package Utility  Version 9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  4:00:07 AM  DTExec: The package execution returned DTSER_SUCCESS (0).  Started:  4:00:07 AM  Finished: 4:02:01 AM  Elapsed:  113.5 seconds.  The package executed successfully.  The step succeeded.
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24110683
Can you even tell if the .bat or .exe file is being accessed? My guess is they are not. If you remove them from the directory, does the package still finish successfully? Can you write a file to the same directory - just to prove you can get to that directory? As many times as I have debugged this type of problem it has 90% been a directory / permissions problem.
0
 

Author Comment

by:svs1919
ID: 24110738
"If you remove them form the directory" You mean that i should test the package by remob=ving the .bat file and .exe files from the folder they are right now and then try to run the package am i right?
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24110801
Yes, correct. Remove the .bat and .exe files. See if the package runs the same without them. We need to verify they are being accessed by the SSIS package.
0
 

Author Comment

by:svs1919
ID: 24110947
Now after your previous message  i looked at my execute process tasks. I found out that i have to give acive directory path as i dint give active directory path. Then i ran the process task this time my .bat task worked  fine it  brought xls files  from the site. But where as my other process task that is supposed to run .exe file it  dint  run. Any more suggestions?
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24111085
Stay with permissions and access. What does the exe do, does it need access to another directory?
0
 

Author Comment

by:svs1919
ID: 24111183
The exe actually goes into and API and then gets the data from that API and puts it in my SQL table. Connection strings to the API are declared in a .exe.config file
0
 

Author Comment

by:svs1919
ID: 24139507
hoggzilla i tried to other alternative. I wrote a .bat file that runs  this .exe file. And called that .bat file in a execute process task. Now when i run it manually it workes but if try to automate it dosn't work. Its not giving any error but its not doing what it has to do
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 24140197
It has to be related to the job running from your PC, with you as the User who invokes the job versus the job running on the Server and having a User invoke the job through the Agent..
In the Job History, who is the job Invoked by?
Message
The job succeeded.  The Job was invoked by User MVCIAD\shogg550.
Does this user have access to every level of the path on the way to the .exe file? [\\server\folder\file.exe]
 
0
 

Author Comment

by:svs1919
ID: 24140708
yes it  shows that job was invoked by me. I have  direct access to the folder. And the file is in a common C drive so it is accessable to every one
0
 
LVL 17

Accepted Solution

by:
HoggZilla earned 500 total points
ID: 24143708
Make sure you have SQL Server Agent permissions to execute an exe. Are you using a proxy? Do you have SQL Server Agent User role?
http://social.technet.microsoft.com/Forums/en-US/sqltools/thread/f92b995f-5ef8-4641-9588-5d52667fbae8
 
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question