Need to run a sql script each 10 minutes

  • Hi all

    I am trying around with sql agent or windows scheduler. I need to run a large script each 10 minutes. Guess this is better with sql agent because with scheduler, I can only run in once a day.

    But how to add this script in the command windows to run ? I can't copy the hold script because to large and the windows accept only 3200 characters.

    any help or example is great

    Thanks

    Chris

  • Could you make this a stored procedure? Then you could run it with a EXEC command.

    Quand on parle du loup, on en voit la queue

  • With scheduler you can run it multi. times daily on the schedule tab check show multi. schedules.  Of course this is very painful ....



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Why is it painfull to have a task run more than once per day?

  • I have stuff run all the time say every 15 minutes of every day to check something using sql agent schedule task.  Why would it be hard in your situation?

     

    mom

  • NT scheduler would be painful because you would need to create a schedule for every 10 minute interval OR

    approx 120 - 130 schedules per task...... (you cannot schedule other than per hour/day) using NT scheduler yet....



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • I now it's a pain in the ass to run it in the windows scheduler. I would like to run it in sql agent.

    I can define the agent, I can define the time and the job. But in the step windows, I have to define, what to run. If I open my script, I get an error because to large. If I cut the script in piceses, I would have then 40 pieces. This is also not to handle.

    I think there are a lot of people in the world, which are running a large task in the sql agent.

    How, if the script is larger then 3200 characters ?

  • i too had the same troubles with the character limit of transact sql agent step..  and searched a lot for a work around. but in vein..

    so what i do now is to somehow put everything into an SP and execute it..

    another area that u can explore is to give that as an input to osql utility and execute the osql as a cmdline utility.

    if hte script is dynamic, u can think of putting the non-dynamic portion into some lookup tables and create the dynamic script on the fly.

    but it is always better to split the script rather than going for all these mess.

    --smk

Viewing 8 posts - 1 through 7 (of 7 total)

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