June 23, 2006 at 2:30 am
Hi Everyone,
I have a situation here, there is process in which data from one database is being transferred onto another database. I have a situation whereby I need to calculate a way in which the transfer rate can be calculated.
For example, how long it takes to transfer a thousand records ?
I also have another question, If I need to know how many transfers were completed before a specific time, eg how many records transferred before 3PM.
Any solutions would be appreciated.
I was thinking more like an after insert trigger but it would also need to use a cursor to check for every 1000 inserts etc, but i dont know how it would work
Thanks
Raymond Dean
June 23, 2006 at 5:49 am
Ray,
I don't know how the records are transfered but, with the a statement like this: 'Select COUNT(*) FROM T1 (NOLOCK)' You can count how many records are in de destination table even if there is an insert lock on it. (The downside of this is that it doesn't work when other users also insert/delete data from the table)
So If you know how many rows need to be tranfered, how many where already in your destination table you can say how manny where processes or still need to be processed.
If you also know how long he did over the number of records already processed you could calculate a remainig time.
You can run this every 5 sec's for instance. Then you can send this to an interface or you could make a logging in a separate table.
Grtz,
Nico
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply