Re: Operating System Command (CmdExec) will not run from Job Agent

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 01/07/05

  • Next message: Amy: "Re: PLEASE HELP!!! I am using activeX in a DTS Package"
    Date: Fri, 7 Jan 2005 16:21:41 -0500
    
    

    Well now it sounds like you have a problem with the package itself or how
    you are calling it. Maybe someone else can help here but that isn't a whole
    lot to go on.

    -- 
    Andrew J. Kelly  SQL MVP
    "ryanlence" <ryanlence@discussions.microsoft.com> wrote in message 
    news:69FBFC46-95A2-4433-B935-EC4F3CA0649F@microsoft.com...
    > Yes,
    >
    > It ran just fine
    >
    > "Andrew J. Kelly" wrote:
    >
    >> Did you ever get xp_cmdshell to work?
    >>
    >> -- 
    >> Andrew J. Kelly  SQL MVP
    >>
    >>
    >> "ryanlence" <ryanlence@discussions.microsoft.com> wrote in message
    >> news:C476E8B3-206B-4FB2-B047-9F55E4D0B493@microsoft.com...
    >> >I created a proxy account, from what I understand SQL Server should only
    >> >need
    >> > to use the account if the job owner is not a member of sa.
    >> >
    >> > Having created a proxy account who is a memeber of the local admin 
    >> > group I
    >> > now get a new error message saying.
    >> >
    >> > Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused 
    >> > an
    >> > exception in the CmdExec subsystem and has been terminated.
    >> >
    >> > Any Ideas
    >> >
    >> > "Andrew J. Kelly" wrote:
    >> >
    >> >> If you look in the Job history you will see a checkbox labeled "show 
    >> >> job
    >> >> steps" (or similar).  This should give you more details.  But it is 
    >> >> most
    >> >> likely a permissions issue.  Can you get dir to work using 
    >> >> xp_cmdshell?
    >> >>
    >> >> exec master..xp_cmdshell 'DIR *.*'
    >> >>
    >> >> I assume you are running SQL 2000?  If so there are two accounts that 
    >> >> may
    >> >> need permissions to do what you are asking.  They are outlined in the 
    >> >> KB
    >> >> article.  One is the account SQL Agent is running under and the other 
    >> >> is
    >> >> the
    >> >> Proxy depending on how you are running the job or what role the user 
    >> >> is
    >> >> in.
    >> >>
    >> >> -- 
    >> >> Andrew J. Kelly  SQL MVP
    >> >>
    >> >>
    >> >> "ryanlence" <ryanlence@discussions.microsoft.com> wrote in message
    >> >> news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9@microsoft.com...
    >> >> > Thanks for the link.  It did help me learn more about sql server but
    >> >> > did
    >> >> > not
    >> >> > really help me fix my issue.
    >> >> >
    >> >> > Even if I try to run simply dir from the SQL Job Agent I will get 
    >> >> > the
    >> >> > listed
    >> >> > error.
    >> >> >
    >> >> > Ryan
    >> >> >
    >> >> > "Andrew J. Kelly" wrote:
    >> >> >
    >> >> >> See if this helps:
    >> >> >> http://www.support.microsoft.com/?id=269074
    >> >> >>
    >> >> >> -- 
    >> >> >> Andrew J. Kelly  SQL MVP
    >> >> >>
    >> >> >>
    >> >> >> "Ryan M. Lence" <Ryan M. Lence@discussions.microsoft.com> wrote in
    >> >> >> message
    >> >> >> news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC@microsoft.com...
    >> >> >> >I am simply trying to run DTSrun.exe from the Job Agent in SQL 
    >> >> >> >Server
    >> >> >> >and
    >> >> >> > everytime it Says that the job failed.
    >> >> >> >
    >> >> >> > The job failed.  The Job was invoked by User CHQPVUW0806\LenceRM.
    >> >> >> > The
    >> >> >> > last
    >> >> >> > step to run was step 1 (cmd).
    >> >> >> >
    >> >> >> > The step failed.
    >> >> >> >
    >> >> >> > This happens every if I just try to run dir or and other command.
    >> >> >> >
    >> >> >> > My backup jobs are working, and other jobs that do not need 
    >> >> >> > CmdExec.
    >> >> >> >
    >> >> >> > Help,
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>
    >>
    >>
    >> 
    

  • Next message: Amy: "Re: PLEASE HELP!!! I am using activeX in a DTS Package"

    Relevant Pages

    • Re: backup-how to find mapped drive
      ... > Andrew J. Kelly SQL MVP ... >> I tried that but i got a message saying account could not be verified do u ... Mapped drives should never ... >>> Andrew J. Kelly SQL MVP ...
      (microsoft.public.sqlserver.programming)
    • Re: SQL job owner and right
      ... If you trust these users enough to let them do anything they want to any of those jobs then you can trust them to login with that account when editing jobs. ... Andrew J. Kelly SQL MVP ... try to assign the job owner to this group, but the window group is not ... I just confirmed that we only have SQLAgentUserRole. ...
      (microsoft.public.sqlserver.security)
    • Re: SQL job owner and right
      ... By "Operate and Change" the job do you mean edit what the job does or just when it runs? ... and account A also has these three roles. ... > SQLAgentUserRole ... > Andrew J. Kelly SQL MVP ...
      (microsoft.public.sqlserver.security)
    • Re: Log on problem
      ... Andrew J. Kelly SQL MVP ... to use Enterprise Manager instead as it sets other rights and properties ...
      (microsoft.public.sqlserver.connect)
    • Re: Operating System Command (CmdExec) will not run from Job Agent
      ... > Andrew J. Kelly SQL MVP ... from what I understand SQL Server should only ... >> Having created a proxy account who is a memeber of the local admin group I ...
      (microsoft.public.sqlserver.dts)