473,395 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Periodic run of stored procedure

Hi,

I have this stored procedure that I need to run daily, how do I do
this?

Thanks,
Mike
<><

Dec 19 '05 #1
5 2705
One 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" <Br******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

I have this stored procedure that I need to run daily, how do I do
this?

Thanks,
Mike
<><

Dec 19 '05 #2
Is it a bad idea to do something like

WHILE (1<>0)
BEGIN
WAITFOR TIME '04:00'
Dec 20 '05 #3

"brogdonm" <Br******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.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,
<><

Dec 20 '05 #4
I'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" <Br******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.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,
<><

Dec 20 '05 #5
Thanks guys I will look into that now that I am off of my Christmas
Vacation. I really appreciate all of the replies.

Dec 27 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.