extended stored procedure not work

  • Hi,

    I have a problem with the following xp :

    exec master..xp_cmdshell 'Net use D: \\RemoteComputerName\ShareName Pass /user:UserName ' 

    It work fine when i execue the 'net use' command in command shell or in batch file like

    'Net use D: \\RemoteComputerName\ShareName Pass /user:UserName ' 

    it's map a drive D: and work properly.

     

    But when i execute the same 'net use' command from Sql server xp_cmdshell, it map the drive d: and when i want to access the drive show an error message "access denied"..

    is there any solution anybody have..

    Pls. reply.................

    Thanks

     

  • Does the user which is specified as the SQL Server service startup account have access to this directory?  If you are using the system account for the startup account, you will have to change it to a domain user and grant that user access to the directory.



    A.J.
    DBA with an attitude

Viewing 2 posts - 1 through 1 (of 1 total)

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