denied permission to run CmdExec

Posted on 2004-11-29
Last Modified: 2012-06-21
I have created a DTS package and scheduled a job ofr it.
I then used sp_start_job on the Query Analyzer to start the job. The message indicates that the job has started successfully.
I then checked the job histoy and found the following errors

Step ID 0
The job failed.  The Job was invoked by User <NAME>\<my user name>.  The last step to run was step 1

Step ID 1
Non-SysAdmins have been denied permission to run CmdExec job steps.  The step failed.

I have public access to msdb database.Am I missing anything else?
Question by:ams7503
    LVL 14

    Expert Comment

    When you schedule a job to run, the job runs under the credentials that the SQL Server Agent in the server is running under, not the credentials of the person who scheduled the job.  Usualy this is the same user that SQL Server Service is running under.  This user needs permission to perform all functions being executed.  I'm guessing that CmdExec is a step that executes a dos command, using xp_cmdshell.  This Extented SP in the Master database is often disabled due to it's security risks.  Check that the SQL Agen user has rights to execute this

    An easy test is
    Exec master..xp_cmdshell 'dir'
    and see if you get a dir listing back from dos

    Author Comment

    Thanks for the feedback
    I think the problem must be because, i own the package but do not have sysadmin privilges, i have read up on setting a proxy account which would then enable the package to execute.

    However, how does one set the proxy account? I am not sure what the domain should be?
    LVL 14

    Accepted Solution

    The same domain that the Server Resides in.  How to set it up, I'm not sure.  Sounds like a job for the System administrator of the server.

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    This is my first ever Article on EE or elsewhere; therefore, please bear with me if I have some discrepancies in my writing. I read many articles and questions related to "how to pass values to SSIS packages at run-time?"  Hence, this common ques…
    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now