Re: How do I copy a file using xp_cmdshell
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 02/11/05
- Next message: Aaron Weiker: "Re: SQL date Format Query"
- Previous message: David C: "Upload Autonumber"
- In reply to: Vincel2k2: "How do I copy a file using xp_cmdshell"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Feb 2005 15:48:21 +0100
Mapped drives are per user, and SQL Server runs under the service account.
Also, if you use UNC, make sure that the service account have permission on the share.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ http://www.sqlug.se/ "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 >
- Next message: Aaron Weiker: "Re: SQL date Format Query"
- Previous message: David C: "Upload Autonumber"
- In reply to: Vincel2k2: "How do I copy a file using xp_cmdshell"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|