In SQL server 2000, how do I use TSQL to copy files from one location to another on the filesystem?

  • 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

  • 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.

  • You can also try executing DOS commands using xp_cmdshell

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply