HELP with cmdexec job step

Last Post 15 Jul 2008 08:46 AM by SQLUSA. 8 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
mikenason
New Member
New Member

--
11 Jul 2008 11:37 AM
I am attempting to run a SQLAgent job step using cmdexec as follows:

\\hornet\r-drive\databaseadmin\scripts\walkthrough\walkthrough.exe

hornet is a network server and "r-drive" is mapped on the sql server. My SqlAgent service account is a network login with all required permissions. That account is also a sql server login and has the sysadmin role assigned in SQL server.

I am able to run the command manually at the command prompt and it works correctly.

The exe file does not have a GUI associated with it.

The job step does not fail, it just runs forever until I stop it.

I can run a simple dos command as a cmdexec job step using the same credentials and it works; example:

copy "c:\reti.txt" "c:\reti.xxx"

mikenason
New Member
New Member

--
11 Jul 2008 01:17 PM
Yes, I am logged into the Windows OS with the SQLAgent service account. I can run the job manually from the command prompt. The EXE has no GUI or dialog of any sort. It is a complied Winbatch script that was complied using Silent mode. The EXE manipulates some text files; creting a new text file from several others.
mikenason
New Member
New Member

--
14 Jul 2008 07:14 AM
Yes...the account has Sysadmin rights
mikenason
New Member
New Member

--
14 Jul 2008 11:10 AM
rm - I am not sure what that means..

I thought is was using a fully qalified UNC name with;

\\hornet\r-drive\databaseadmin\scripts\walkthrough\walkthrough.exe

What would I replace the 'r-drive' with?

I am using '\\hornet\r-drive\......' with many other SQLAgent jobs...none that are using CMDEXEC tho...

I do appreacitae your help on this...
mikenason
New Member
New Member

--
14 Jul 2008 01:07 PM
'r-drive' is the share name and it is mapped to 'hornet\R'
SQLUSA
New Member
New Member

--
15 Jul 2008 08:46 AM
I am guessing your UNC:

\\hornet\r$\databaseadmin\scripts\walkthrough\walkthrough.exe

Try it from command prompt.

Let us know if works.

Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQL Server 2005 Training, SSAS, SSIS, SSRS: http://www.sqlusa.com/

mikenason
New Member
New Member

--
16 Jul 2008 07:47 AM

This does not work at the command line

\\hornet\r$\databaseadmin\scripts\walkthrough\walkthrough.exe

This does work at the command line

\\hornet\r-drive\databaseadmin\scripts\walkthrough\walkthrough.exe


I have set up a proxy and it does not work. With the network account I am using I should not have to set up a proxy. The account has sysadmin permission on the SQl server and full permissions on the network
mikenason
New Member
New Member

--
16 Jul 2008 10:09 AM
If I run DIR \\hornet\r$\*.* at the command prompt the error message is:

"The Network Path was not found"

If I run DIR \\hornet\r-drive\*.* , it works correctly.

I am signed onto the server with the network account that is an sysadmin and has full rights on the network

mikenason
New Member
New Member

--
24 Jul 2008 07:19 AM
Thnaks for your help, but everything I have tried is not working. I need to figure out some other way.


Acceptable Use Policy
---