exec xp_cmdshell return Acces Denied error

  • I have already Enabled xp_cmdshell.

    and also given the full permission on batch file to user  user who is going to execute through xp_cmdshell

    But still i am getting the same error.

     

    Still i am getting Access denied 5 error.

     

    Regards

    Sanjay

  • it probably because you have not enabled the use of xp_cmdshell. in sql 2005 many features are locked down by default, so you have to enable them

    go to the sql server surface area configuration tool and under database engine, enable xp_cmdshell


    Everything you can imagine is real.

  • Permission problem check if you have necessary permissions to the file or the resource you try to access. BTW if xp_cmdshell is not enabled you should be getting an error like this

     

    Msg 15501, Level 16, State 1, Procedure xp_cmdshell, Line 1

    This module has been marked OFF. Turn on 'xp_cmdshell' in order to be able to access the module.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Hi Sugesh Kumar, I have the same error. What permissions have to have the user that execute a package with the follow statement for dont show error "Denied acces":

    exec master.dbo.xp_cmdshell 'dir \\g100603sv078\Interfaces_Peru_IN\FD\BO204DL* /o-d'

    Thaks by your help!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply