Re: Job owned by a non-sysadmin fails to run



Hi Dan,

Thank you for your ideas.

I tried to get command output in a different way. I specified "Output file"
in the CmdExec step properties, tab Advanced. This helped me earlier to
identify problems occurred when running the executable.

Now I get an empty file created after the job have executed successfully and
no file created at all after it have failed. This makes me think that the
job step was not executed at all. The folder where the output file is
written has "full control" permission granted to everyone.

I tried your suggestion about redirecting stdout/stderr. It works fine from
the command line. However, CmdExec declined to run it with the following
message in the output file:
Error: Invalid command-line option: '>c:'

The command looks like the following:
dmlrun.exe /create:type=CSS;dml_item=26;css_site="<site name>"
/server:<server name> /execute /wait >c:\temp\dmtest.txt 2>&1

I tried also to put c:\temp\dmtest.txt into double quotes but got the same
error message.



"Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E82DADE6-9C93-4770-95A0-8026EF28782B@xxxxxxxxxxxxxxxx
You mentioned earlier that you looked at the job for error messages. Do
you get any additional messages from the job step details? If not, try
redirecting stdout/stderr to a file using on the command line:

MyProgram.exe (other command-line arguments) >C:\MyProgram.log 2>&1

Obviously, there a subtle difference when the program runs interactively
under the proxy account vs. as a job step. This could be due to a
different environment (different path, environment variable, etc.) or the
way the program retrieves configuration information under the different
execution contexts. I see that there's a Commerce Server bug
(http://support.microsoft.com/kb/818143/) that required dbo rights but
that wouldn't explain why the program runs interactively without errors.
However, that's been fixed in a service pack.

--
Hope this helps.

Dan Guzman
SQL Server MVP


.



Relevant Pages

  • SMTP: How to configure? Cant get Email from AS/400
    ... When sending mail to internet user I got successful message. ... I added the command: STRSBS QSNADS because the distribution queue status ... Member DSTLINFO added to output file DSTLINFO in library QTEMP. ...
    (comp.sys.ibm.as400.misc)
  • Re: Job owned by a non-sysadmin fails to run
    ... Do you have any CmdExec job steps that successfully run as non-sysadmin users or is it just dmlrun.exe that has the problem? ... I tried to get command output in a different way. ... The folder where the output file is written has "full control" permission granted to everyone. ... This could be due to a different environment or the way the program retrieves configuration information under the different execution contexts. ...
    (microsoft.public.sqlserver.security)
  • Re: How to call a remote program through SSH tunnel and pass a local file as parameter?
    ... Run the command on the remote machine, then pull the output file; ... > How do I call in this scenario the remote progr myprog and pass ...
    (microsoft.public.security)
  • Re: No redirection output
    ... Actually myprog can generate the output file as expected if running at ... However if i run the commands in batch in a script file, no output file ... name as a standard command? ...
    (comp.unix.shell)
  • Re: pc speaker in asm
    ... There's no hint of an execution of a program in the batch file. ... Apparently if you don't specify an output file in a concatenation copy ... procedes one after the other while playing a tune. ...
    (alt.lang.asm)