Link to home
Start Free TrialLog in
Avatar of ams7503
ams7503

asked on

denied permission to run CmdExec

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?
Thanks
Avatar of adwiseman
adwiseman

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
Avatar of ams7503

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of adwiseman
adwiseman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ams7503

ASKER

thanks!