By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,165 Members | 1,916 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,165 IT Pros & Developers. It's quick & easy.

Timer for executing Stored Procedure

P: n/a

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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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 ***
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.