locked
Using Foreach Loop to schedule a package RRS feed

  • Question

  • Hi,

    I want to know if  Foreach loop can be used to run a package in SSIS every given time, for example, every three days automatically. If so then how can I do it?

    Thanks!

    Tuesday, March 5, 2013 11:35 PM

Answers

  • Just create an SQL server job to execute the Package. You could schedule the job to run every 3 days.

    My Blog    |      Ask Me     |      SSIS Basics     

    • Proposed as answer by SSISJoostMVP Wednesday, March 6, 2013 11:02 AM
    • Marked as answer by Eileen Zhao Friday, March 15, 2013 1:17 AM
    Wednesday, March 6, 2013 10:27 AM

All replies

  • Do you want to execute the SSIS package itself once every three days or do you want to execute some task inside a SSIS package only once in 3 days?

    Regards, Dinesh

    Tuesday, March 5, 2013 11:53 PM
  • The package itself, every three days automatically.

    =)


    • Edited by Aleyvs Tuesday, March 5, 2013 11:55 PM
    Tuesday, March 5, 2013 11:54 PM
  • Can you describe in greater detail what you are trying to do?

    Russel Loski, MCT, MCSA SQL Server 2012, 2008, MCITP Business Intelligence Developer and Database Developer 2008 Twitter: @sqlmovers; blog: www.sqlmovers.com

    Tuesday, March 5, 2013 11:55 PM
  • The task in the package is basically to retrieve information, What I want to do is to make that package go and get the information by itself every certain period of time, instead of having to do run it manually.

    =)

    Wednesday, March 6, 2013 12:04 AM
  • Hi,

    Well then it depends on how you are planning to execute the package.

    You can write a batch file that would execute the package and then simple schedule the batch file to execute every three days using windows scheduler.

    or you can choose to execute the SSIS package by the SQL Agent Jobs and then you schedule the SQL job to run every three days.

    SQL Agent MSDN


    Regards, Dinesh


    Wednesday, March 6, 2013 12:04 AM
  • Just create an SQL server job to execute the Package. You could schedule the job to run every 3 days.

    My Blog    |      Ask Me     |      SSIS Basics     

    • Proposed as answer by SSISJoostMVP Wednesday, March 6, 2013 11:02 AM
    • Marked as answer by Eileen Zhao Friday, March 15, 2013 1:17 AM
    Wednesday, March 6, 2013 10:27 AM