PayCheck
SSC-Addicted
Points: 427
More actions
February 26, 2009 at 5:33 pm
#201624
In SQL server 2000, how do I use TSQL to copy files from one location to another on the filesystem?
I just want to make a job that executes every morning at 4am to copy the most recent log file to a shared folder
Steve Jones - SSC Editor
SSC Guru
Points: 736270
February 26, 2009 at 6:36 pm
#950928
T-SQL executes inside SQL Server, which has no access to the file system.
Any copying you would do would need to be done with some type of scripting, such as Powershell or VBScript. You could call those from T-SQL, but they would still be scripted.
Adiga
One Orange Chip
Points: 27284
February 26, 2009 at 10:15 pm
#950982
You can also try executing DOS commands using xp_cmdshell
Pradeep Adiga Blog: sqldbadiaries.comTwitter: @pradeepadiga
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply