[dba-SQLServer] TicketMaster-like Timer

worddiva nancy.lytle at gmail.com
Sat Dec 25 13:59:52 CST 2004


I'll throw in my 2 cents worth here:

Arthur, I think you are on the right track with the idea of a sproc. 
Have the sproc run by a job every 3 - 5 minutes and return all held
items to inventory if the timestamp on that "pre-order" is more than 5
minutes ago.
You might place the pre-orders in their own table, which would just be
a holding table.  The order would either be cancelled and returned to
inventory or confirmed and moved along in the process.
This way you are not really creating a bunch of timers, but just
checking the time on each pre-order and then acting according to your
rules.

Nancy
PS: You aren't the only one with no life:)


On Sat, 25 Dec 2004 13:05:56 -0500, Arthur Fuller <artful at rogers.com> wrote:

> This sequence can occur for an indefinite number of users at once. Call
> that number P. So I need a method of setting up P timers. Lately I've
> been thinking that a trigger might be the way to go with this. Or a
> sproc that executes every minute. I haven't looked into the granularity
> of the schedule thing, dunno yet if you can go down as far as one
> minute. It certainly wouldn't hurt performance to run such a sproc once
> a minute, given that all it has to do is delete rows whose timestamp is
> older than Now - 5 minutes.
> 
> Arthur
> 
> P.S.
> It's Christmas day and you can see that I have no life.
> 
> 
> John W. Colby wrote:
>



More information about the dba-SQLServer mailing list