Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2004-07-09 : 13:02:38
|
| Hi GuysI wanna copy one file from my server machine to another machine thru SQL server Stroed Procedure.Plz Help MeThnx |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-09 : 13:10:13
|
| You need to use xp_cmdshell for this. You can use xcopy or robocopy in xp_cmdshell.Tara |
 |
|
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2004-07-09 : 13:35:39
|
| iam running thisexec xp_cmdshell 'xcopy /Y c:\abc.dat \\servername\sharename\xyz.dat';but its giving me invalid drive specificationThnx again |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-09 : 13:39:38
|
| xp_cmdshell runs from the database server and not from the client machine. The path information must be valid in the database server's perspective. The MSSQLSERVER service account also must have access to the remote location as that is what runs xp_cmdshell.Tara |
 |
|
|
|
|
|