Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cmdExec doesn't run an .exe file from VB

Status
Not open for further replies.

alebox20

Programmer
Oct 19, 2004
72
BR
I have a file from VB code that runs simple procedures. When I run it manualy, it works (the first thing it does is show a message box). However, when I run it thru job in the sql, the job status says "running" and never finish.

The command line I am using is c:\test.exe

What should be the problem? Is there a kind of restriction using sql's job?

thanks
 
It's waiting for someone to click ok on the message box. Apps run a SQL Jobs can't be interactive.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Msgbox was only an example, wich has been explained from you that sql job is not interactibe, thanks.

In fact, my exe runs an component named mapsession/mapmessages to send e-mails.

 
Is the SQL Service running under a domain account? Have you logged in as the domain account and setup the outlook client?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Yes, it is running under a domain account and the outlook client is working properly. If I run the exe manualy it works.
 
Does the SQL service have access to use the component?

I'd modify the app to write a bunch of output into the a text file then have the SQL Server run it. Then check the file and see where the app is hanging.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Also, check the read/write permissions on the share in question. If the account SQL Server is using doesn't have access to the path, it won't be able to find the .exe to execute it.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top