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


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
> 


Relevant Pages

  • Re: Network Service Account
    ... About 25 % down the page "Microsoft recommends that you not use the Network ... Service account for the SQL Server or the SQL Server Agent services. ...
    (microsoft.public.sqlserver.security)
  • ODBC Connection with SQL Managed Provider
    ... on a "network drive". ... database using the Microsoft .NET Framework 1.1 Data Provider for SQL ... authorizing the user against a table in the SQL server database. ... for the app to display the "splash" screen (which is the first thing it does ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SQL Server 2005 64 bit on Window Server 2003 R2 64bit slow per
    ... even gone as far as swapping network cables and updating NIC card drivers to ... If the box itself checked out fine, then move on to runnign SQL Server on ... Perfmon, Disk I/O, Pages, Profiler traces, checked locks/blocks, long running ... slow on these boxes to me. ...
    (microsoft.public.sqlserver.setup)
  • Odd connection problem (proxy + internal)
    ... system and can not be placed facing the internet. ... that belongs to our network and also connects to this accounting ... DSN's) to our internal SQL server. ... by installing the Winsock proxy on the SQL server and mapping the ip ...
    (comp.databases.ms-sqlserver)
  • Re: What is the best way to administering two separate forests?
    ... Now that you mentioned a trust relationship, it actually makes sense to do ... development and SQL Server management for them. ... network and network resources i.e. Exchange, SQL Server, applications, etc. ... We will just have a separate logical network with a separate ...
    (microsoft.public.win2000.networking)