?
Solved

Execute Process Task

Posted on 2009-04-09
16
Medium Priority
?
617 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 

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 1500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…
Suggested Courses

743 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