For months I've been trying to run a job (using the SQL Server Service Account) that calls a batch file on a remote server which in turn calls Gpg4win to encrypt a file. (I have been putting the project down and picking it up.)
I haven't been able to get the job to call a SSIS package that calls the batch file (using an Execute Process task) under the Service Account credentials. The job always hangs. (I'm pretty sure there is no "Y/N" dialogue that is holding things up. When I run under my credentials, no dialogue box appears.)
In an effort to get something to work, I've been trying to create a job under the Service Account that calls the CmdExec. I have managed to get the service account to create a test file with this DOS instruction:
dir "\\myServer\myShare\*.csv" > "\\myServer\myShare\Test_file.txt"
Believe me, I was happy to see the Service Account actually do something.
Now I wish to expand the process like so:
dir *.csv > Test_file.txt
However, the CmdExec for SQL jobs doesn't appear to do anything with "pushd" or "popd". When I execute the commands directly above the CmdExec job succeeds, but I have no idea where the output file went. It isn't on the remote server (i.e., \\myServer).
Does anyone know how to get a job running the CmdExec to change the current directory to a remote server? All help appreciated. Thanks!