Re: How do I copy a file using xp_cmdshell

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 02/11/05


Date: Fri, 11 Feb 2005 09:36:44 -0500

Does the account for SQL Agent or the Proxy (depending on who is running the
command) have access to this share?

-- 
Andrew J. Kelly  SQL MVP
"Vincel2k2" <Vincel2k2@discussions.microsoft.com> wrote in message 
news:62257A3D-CCF8-46B7-9A6F-65399CF61FD6@microsoft.com...
> Things I have tried.
>
> xp_cmdshell "Copy D:\Database\Apps\Ven.mdb D:\ultradb\Ven.mdb"
> This Works Great
>
> xp_cmdshell "Copy X:\MMS\Data1\Log_data.mdb D:\ultradb\ Log_data.mdb"
> Returns this error: The network name cannot be found. The path and 
> filename
> are correct
>
> xp_cmdshell "Copy \\SERVER01\DATA\SHARED\WORK\MMS\Data1\ Log_data.mdb
> D:\ultradb\ Log_data.mdb"
> Returns this error: The network name cannot be found. The path and 
> filename
> are correct
>
> EXEC xp_cmdshell 'Copy \\SERVER01\DATA\SHARED\WORK\MMS\Data1\ Log_data.mdb
> D:\ultradb\ Log_data.mdb
> Returns this error: The network name cannot be found. The path and 
> filename
> are correct
> 


Relevant Pages

  • Re: Problem with nightly runs
    ... Andrew J. Kelly SQL MVP ... I would check your network. ... >> Andrew J. Kelly SQL MVP ... >>> Step Error Help File:sqldts.hlp ...
    (microsoft.public.sqlserver.dts)
  • Re: Performance really poor if calling data from sql clients
    ... If you run the same query from SSIS on the server does it run fast or slow? ... Sounds like network issues or problems with name resolution. ... Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.clients)
  • Re: new server
    ... Many Thanks Andrew ... > send the backups to that is not used for the data or logs. ... > possible then you can consider a network backup. ... > Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: Opening Word 2007 file and Word-to-Acrobat file
    ... Fortunately, I have the pdf on my website, but I have no file to edit. ... Word or PDF versions opens, it points to a Windows problem. ... Try creating a test document and assign it a long filename again. ... Please try using 'Map Network Drive' command to connect to the server to ...
    (microsoft.public.word.application.errors)
  • Re: Error cause job to quit running
    ... incrementing the counter until the right filename is tried. ... There is nothing wrong with the backup ... right filename and has not done the restore. ... how about your network performance? ...
    (microsoft.public.sqlserver.server)

Loading