[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2006
  • Last Modified:

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
0
ams7503
Asked:
ams7503
  • 2
  • 2
1 Solution
 
adwisemanCommented:
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
0
 
ams7503Author Commented:
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?
0
 
adwisemanCommented:
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.
0
 
ams7503Author Commented:
thanks!
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now