XP_Cmdshell 'Access is denied'

  • Hi All,

    xp_cmdshell 'dir \\Server001\e$' - running in Server2

    xp_cmdshell 'dir \\Server002\e$' - running in server1

    OUTPUT : 'Access is denied.'

    But I'm able to access through RUN(WIN+R) command from server1 to server2 and vice versa.

    NOTE: I've given 'full control' permission on both folders in E\ drive in both servers.

    Please advice.

    Thanks and Regards,

    Ravi

  • Kindly check whether teh sql service account has permission to execute the cmd commands and the user who is executing xp_cmdshell have granted permission to execute this procedure ..

    ---

    Ashok

  • This should be an access issue.

    Check does the sql services has access to execute xp_cmdshell and also check the configure values of xp_Cmdshell via sp_configure.

  • Please do not cross-post.

    Direct all replies here:

    http://www.sqlservercentral.com/Forums/Topic1296885-1549-1.aspx

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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