FTP log file

  • Hi,

    How can I ftp the log file (created by DTS1 ) immediately after DTS1 is completed?

     

    Thanks.

     

    Darian

  • Which log file? Give us more details... What are you trying to do?

    Remember FTP tool is only for get files from an ftp not to put files.

    Regards

    JFB

  • Make the final step of the job a call to a dts package that shells out to dos and uses ftp to upload the log file.



    Shamless self promotion - read my blog http://sirsql.net

  • I agree with the above post by stacenic. 

    To be more specific, add a "Execute Process Task" as the last step.  Within this task, call a batch file like...

    C:\FTP_to_Unix\ftp_script.bat

    This batch file simply contains a call to FTP that specifies a script file to use for the commands...

    FTP -s:c:\FTP_to_Unix_from_QMF\script.txt

    Then in the script file, you specify the FTP commands you would like to execute...

    open * insert servername here * 

    * insert username here *

    * insert password here *

    cd /new_directory_on_server_to_place_file/

    put C:\path\filename.ext newfilename_on_server.ext

    quit

    That's it.

  • Steve Jones created a DTS package called PushFTP to accomplish this very task.

     

    Check it out here  :

    http://qa.sqlservercentral.com/columnists/sjones/pushftp.asp

     

     

     

  • Steve's solution is pretty nice in that it generates the FTP script file for you using FSO.  Other than that, the process is the same. 

    Concerning the original post, if you're referring to a log file that is generated by the DTS that is currently running, you could place the FTP task in a separate DTS and then execute the FTP DTS as Step #2 of a job, thus allowing DTS #1 to finish and create the log file before attempting to push out the file using FTP.

    Or you could use this same concept, with DTS #1 and FTP DTS #2 and use a third DTS to call the first two and execute each sequentially.  But, the job would be the most straight forward solution.

Viewing 6 posts - 1 through 5 (of 5 total)

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