Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, I have this stored procedure that I need to run daily, how do I do this? Thanks, Mike <><
Post Follow-up to this messageOne method is to schedule the proc execution using a SQL Server Agent job. You can create a job using the EM or SSMS GUI. -- Hope this helps. Dan Guzman SQL Server MVP "brogdonm" <Brogdons@gmail.com> wrote in message news:1135034300.442082.324910@g14g2000cwa.googlegroups.com... > Hi, > > I have this stored procedure that I need to run daily, how do I do > this? > > Thanks, > Mike > <>< >
Post Follow-up to this messageIs it a bad idea to do something like WHILE (1<>0) BEGIN WAITFOR TIME '04:00'
Post Follow-up to this message"brogdonm" <Brogdons@gmail.com> wrote in message news:1135036649.313243.99790@f14g2000cwb.googlegroups.com... > Is it a bad idea to do something like > > WHILE (1<>0) > BEGIN > WAITFOR TIME '04:00' > . > . > . > END > > It seems like that would work as long as WAITFOR actually yields the > processor. There's far better ways of doing this, as Dan suggested, SQL Server agent is the way to do it. > > Mike, > <>< >
Post Follow-up to this messageI've seen WAITFOR DELAY used in order to execute a proc at very frequent intervals (e.g. every minute or less). However, a scheduled job is a better fit for less frequent executions since that gives you job history and failure notification. -- Hope this helps. Dan Guzman SQL Server MVP "brogdonm" <Brogdons@gmail.com> wrote in message news:1135036649.313243.99790@f14g2000cwb.googlegroups.com... > Is it a bad idea to do something like > > WHILE (1<>0) > BEGIN > WAITFOR TIME '04:00' > . > . > . > END > > It seems like that would work as long as WAITFOR actually yields the > processor. > > Mike, > <>< >
Post Follow-up to this messageThanks guys I will look into that now that I am off of my Christmas Vacation. I really appreciate all of the replies.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread