Solved

Execute Process Task

Posted on 2009-04-09
16
606 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

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

Expert Comment

by:HoggZilla
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
"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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 17

Expert Comment

by:HoggZilla
Comment Utility
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
Comment Utility
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
Comment Utility
Stay with permissions and access. What does the exe do, does it need access to another directory?
0
 

Author Comment

by:svs1919
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now