You are accessing this site in a read-only mode. For full access to all member benefits, including message posting, please login or register. Registration is completely free, simple, and takes only a few seconds.
The message you are replying to and its parents are listed in the reverse order with the most recent posts first. This might not be the whole discussion thread. To read all the messages in this thread please click here.
Re: Total Number of Transactions
| Lijun Zhang | 28 Dec 2007 17:49 |
It does give you the total number. I got this from Books Onling:
For per-second counters, this value is cumulative. The rate value must be calculated by sampling the value at discrete time intervals. The difference between any two successive sample values is equal to the rate for the time interval used.
Lijun
> That difference doesn't give you the total number of transactions for the > period, does it? Note that the counter is transactions per second. You may [quoted text clipped - 38 lines] >> > >> > Lijun |
| Linchi Shea | 28 Dec 2007 16:42 |
That difference doesn't give you the total number of transactions for the period, does it? Note that the counter is transactions per second. You may be better off taking multiple samples of the counter, get the average, and then multiply the average trans/sec by the total number of seconds in the period to get an estimate of the total number of transactions.
Ultimately, how you get the total number of transactions depends on what you want to use the number for, and what you mean by 'a transaction'. If you just want to get a rough feel, the baove method is fine. But if you are doing some type of performance benchmarking and want to be precise, you may have to track your transaction count from the client side.
Linchi
> I would run this at the beginning and end of that period and get the > difference [quoted text clipped - 17 lines] > > > > Lijun |
| Ben Nevarez | 27 Dec 2007 23:07 |
I would run this at the beginning and end of that period and get the difference
select cntr_value from sys.dm_os_performance_counters where object_name = 'SQLServer:Databases' and counter_name = 'Transactions/sec' and instance_name = '_Total'
For SQL Server 2000 use sysperfinfo instead.
Hope this helps,
Ben Nevarez Senior Database Administrator AIG SunAmerica
> Does anybody know how to get the total number of transactions for a period > of time on a SQL Server? > Thanks, > > Lijun |
| Lijun Zhang | 27 Dec 2007 22:41 |
Does anybody know how to get the total number of transactions for a period of time on a SQL Server? Thanks,
Lijun
|
Quick links: