Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009

    Unanswered: copyfiles from remote systems using xp_cmdshell

    hi please tell me how to copy files using xp_cmdshell from one machine to another machines

  2. #2
    Join Date
    Jun 2008
    Have you checked out the SQL Server Books Online for more info on this?
    First of all, using xp_cmdshell can open up some potential security problems so you need to be very careful regarding how you go about it.
    Also, enabling xp_cmdshell varies depending on what version of SQL you are using.

    That being said, once you have it enabled and have your proxy accounts setup you xp_cmdshell works basically like using the command prompt. For example from the help:

    USE master;
    EXEC xp_cmdshell 'copy c:\SQLbcks\AdvWorks.bck \\server2\backups\SQLbcks, NO_OUTPUT';

  3. #3
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    xp_cmdshell is depricated, using it is a serious security problem waiting to happen.

    I'd very strongly suggest using SSIS for this kind of task.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts