Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 schedule stored procedure

Author  Topic 

scottichrosaviakosmos
Yak Posting Veteran

66 Posts

Posted - 2010-08-29 : 07:28:18
i am using sql 2008 and i want to schedule a stored procedure . i want my sp to run after every 30 min and since i have one more sp which takes 20 min for execution completion so i want my 1st sp to run after completion of 2nd one.
how to schedule sp to execute after every 30 min and to schedule another sp to execute after the comppletion of 1st one.

scoo

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-29 : 07:51:14
You can do this via a SQL Agent job. Put them in the same job. Either put them in different job steps or put them in the same job step in the order you want them. I'd prefer two job steps for this so that your job history is separate for each stored procedure execution.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

scottichrosaviakosmos
Yak Posting Veteran

66 Posts

Posted - 2010-08-29 : 08:20:50
sorry , but i also know that i can do by sql agent but i dont know how.
i want steps to achive this task.

scoo
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-29 : 10:09:18
This can point you to the right direction.
Please come back if you are having some more detailed questions

http://www.quackit.com/sql_server/tutorial/sql_server_agent_jobs.cfm


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -