Sample Header Ad - 728x90

CMDEXEC The process could not be created for step... (reason: Access is denied). The step failed

3 votes
3 answers
13351 views
I have created a job to test executing a CmdExec step. The job step is simply executing a batch file with dir as the command. The job is executing as the SQL Server service account. This account is both sysadmin of SQL Server and Administrator in Windows. The login also has been granted exec to xp_cmdshell, in master. In Surface Area Configuration, XPCmdShellEnabled = True. If I run the command from the query window it executes as expected. Question: why am I still getting the job step error? This is plain vanilla install of SQL Server 2008 R2 with SP2 installed. Nothing fancy going on here. Note: I know how horribly insecure this is, but this is where it has come to in order for me to chip away at this and try and resolve this error. Best I can tell, this just can’t be made to work and BOL makes it sound so easy.
Asked by Don (305 rep)
Apr 21, 2016, 04:13 PM
Last activity: May 11, 2021, 05:32 PM