SQL copy job | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL copy job

Hi, Can I copy a file from one machine to another in the same network using SQL job? I have tried creating a job with "Operating SystemCommand (Cmd Exec)"
Command : copy D:Testabc.txt \IP est1 Regards
Riya
You can use this query EXEC master..xp_cmdshell ‘copy D:Testabc.txt \IP est1’ Madhivanan Failing to plan is Planning to fail
USE master
EXEC xp_cmdshell ‘copy c:sqldumpspubs.dmp \server2ackupssqldumps’,
NO_OUTPUT
yes offcourse xp_cmdshell ‘copy d: estabc.txt \ip est1’
Regards Hemantgiri S. Goswami
[email protected]
"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemant Goswami

FYI
Can do this from the DTS as well
http://www.sqldts.com/default.aspx?292
but iam getting an error "Access denied"
Regards Riya
Does the Microsoft SQL Server service account have the necessary permissions on the share (network permissions)?
It should be SQLAgent service account as it is used when you schedule the job, ensure this account has required privileges to copy the file. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>