2

i'm trying to run an exe from a sql job. the db is on the server, as well as the exe file. the exe is supposed to write stuff on a log. even though the sql job is successful, i see no change on the log file. i've checked the exe locally, and it does work.

The job runs on type cmdexec, and the command is :

\\ustlvint02\c\FixProjectsWhichFailedSync\FixProjectsWhichFailedSync.exe

ustlvint02 - the server's name. the path is valid, since i tested it by running it from my computer (and there, the log isn't created as well).

i'll appreciate any help you can offer. Hadas

dusm
  • 1,207
  • 4
  • 18
  • 24

2 Answers2

0

The account that SQL Server Agent runs on needs to have permissions to 1.) un the exe in that location and 2.) write to the log file location.

Find out account is used by SQL Agent, then verify that this user has the proper execute and write permissions.

dev_etter
  • 1,156
  • 13
  • 32
0

Look for the log file in %WINDIR%\System32 (for 32-bit version of SQL Server) or in %WINDIR%\SysWOW64 (for 64-bit version of SQL Server), where %WINDIR% is a path to the folder where Windows is installed (typically, C:\Windows). This destination does not depend on the system account specified for the SQL Agent job. All files which your executable needs to write to or read from must be either specified within an absolute path or be specified within a relative path and thus be present in the aforementioned system folder.

Ivan
  • 51
  • 3