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



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

"Ivan Gerken" <testivan@xxxxxxxxxxxxx> wrote in message news:Ox81y3aJHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
Hi Dan,

Certainly I tried changing job owner to an account with administrative privileges, and the job ran perfectly after that.

The job runs the command-line executable of DirectMailer (Commerce Server 2002). As I wrote earlier, this executable runs fine if I login interactively as user (non-admin) as well as sqlproxy and execute it from the command line.

Mapped drives are not accessed.


"Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C369A6FD-078E-4150-9874-EA1203FE7786@xxxxxxxxxxxxxxxx
For debugging, try temporarily changing the job owner to 'sa' as PSPDBA suggested. If the job still fails, then the problem is related to running as a job rather than a security issue.

Exactly what does the CmdExec step do? Are mapped drives accessed?

--
Hope this helps.

Dan Guzman
SQL Server MVP




.



Relevant Pages

  • Re: Job owned by a non-sysadmin fails to run
    ... redirecting stdout/stderr to a file using on the command line: ... execution contexts. ... SQL Server MVP ... Mapped drives are not accessed. ...
    (microsoft.public.sqlserver.security)
  • Re: Sql server scheduled job failed
    ... while preparing a query for execution against OLE DB ... >and post back the error messages from the filed jobstep. ... >Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Stop DTS execution
    ... Do you have SET NOCOUNT ON in your proc? ... SQL Server MVP ... >>> But I am not running ActiveX script to make a decision ... >>>>> How can I stop DTS execution conditionally? ...
    (microsoft.public.sqlserver.programming)
  • Re: Capturing Error Message Text
    ... I took a look at the articles you suggested and it ... execution is transferred to the CATCH block. ... The problem I am having is that the error messages ... >> displayed had I ran these queries in Query Analyzer. ...
    (microsoft.public.sqlserver.programming)
  • Re: stored procedure timeout 18:12:26
    ... Mike Epprecht, Microsoft SQL Server MVP ... > find the pint where te execution stops. ... >> It is a looping proc executing other procs and for some reason the data ...
    (microsoft.public.sqlserver.server)