Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227

    Unanswered: start job on download complete

    Goodmorning to all,

    in our application, the server downloads files through ftp. I want to start the import of the file as soon as the download is complete. Is this possible in SQL server?
    Johan

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Schedule the job depending upon the download time taken. You can add a job step to schedule the job as soon as the step get succeeded, by using SP_START_JOB for more information refer to BOL.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    probably my explanation was not clear enough. We have a FTP client that downloads the files from a distant webserver. How can I tell in SQL Server that the client is ready with its download?
    Another question: is it possible to perform the download (from a FTP server) with the SQL server itself and without a FTP client?
    Johan

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Johan

    Your query is clear now, you can use XP_FILEEXISTS to find out whether the files exists.

    Refer to File Transfer Protocol Task topic under books online to use FTP task in a DTS package. Also SQL DTS for any code examples.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    thanks
    Johan

  6. #6
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Did you test the resolution?
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  7. #7
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    what resolution? If you mean the solution, then yes I did. I used the xp_fileexist (without the -s at the end) and created a job that calls a stored procedure that imports the text into a table (bulk insert) and then copies the data to several tables.
    Johan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •