471,863 Members | 1,221 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Timer for executing Stored Procedure


I need to run same kind of transactions (basically deleting records)
in a loop but I have only 1 hour in a day to run my procedure. So I
need to set a timer in a SP so that SP terminates after one hour and
then rest of the transactions will be done next day.
Can anybody suggest as how to check execution time in a stored
procedure? The execution of the SP will be scheduled every night.
If u need any further info pls ask.


Jul 20 '05 #1
2 6826
I am not sure if you are on the right track. What will you do after an hour?
Abruptly terminate the stored procedure? What happens to the uncommitted
transactions? A more reliable way of doing this is to do it in smaller
batches. Perhaps set up the procedure to run as a job from the scheduler.

- Anith
( Please reply to newsgroups only )
Jul 20 '05 #2
The deletion of records will be done in small chunks. I'll allow the
current transaction to commit but will not allow the new transaction to
begin after one hour. once my currnet tansaction is over I want to stop
executing the SP. Next day agin same SP will be executed in a job.
The thing is there r 290 million records to be deleated which cann't be
done in one go.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Daniel P. | last post: by
7 posts views Thread by LBT | last post: by
9 posts views Thread by Leedrick | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

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.