Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

Re: Total Number of Transactions

Tip: Looking for answers? Try searching our database.



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.

Login | Free SQLMonster.com registration | Whole discussion thread

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

Linchi Shea29 Dec 2007 04:28
Ben and Lijun;

You are correct that the counter value as presented in the dmv is
cumulative, not the already calculated value for transactions/sec as
presented in perfmon. The value for the perfmon counter Trans/sec needs to be
further calculated.

Linchi

> Hi Linchi,
>
[quoted text clipped - 71 lines]
> > > >> >
> > > >> > Lijun

Ben Nevarez29 Dec 2007 00:35
Hi Linchi,

This value is cumulative. See the note on sys.dm_os_performance_counters on
BOL.

Hope this helps,

Ben Nevarez
Senior Database Administrator
AIG SunAmerica

> I'm not sure what exactly the BOL says. I believe it refers to the raw
> counter values before they are cooked into transactions/sec.
[quoted text clipped - 60 lines]
> > >> >
> > >> > Lijun

Linchi Shea28 Dec 2007 23:19
I'm not sure what exactly the BOL says. I believe it refers to the raw
counter values before they are cooked into transactions/sec.

But if you have a counter that is transactions/sec, and you take two samples
of this counters, say, you get 500 transactions/sec at T1 and 600
transactions/sec 5 seconds later, how can you conclude that the total number
of transactions in that 5-second period is 100 transactions? What if your
second sample of the counter turns out to be 400 transactions/sec, are you
going to conclude that the total number of transactions taking place in that
5-second period is -100?

Linchi

> It does give you the total number. I got this from Books Onling:
>
[quoted text clipped - 47 lines]
> >> >
> >> > Lijun

Lijun Zhang28 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 Shea28 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 Nevarez27 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 Zhang27 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:

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage




©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.