469,613 Members | 1,175 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Timer for executing Stored Procedure

HI,

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.

Thanks,

Subodh
Jul 20 '05 #1
2 6677
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.

Thanks,

Subodh

*** 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 devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.