Blog Post

SQL 2005 or above – Find Transaction Rate on a busy OLTP Database

,

Change Database name of a below mentioned query

DECLARE @cntr_value1 bigint

DECLARE @cntr_value2 bigint

SELECT ‘BEFORE’

SELECT @cntr_value1 = cntr_value

FROM sys.dm_os_performance_counters

WHERE counter_name = ‘transactions/sec’

AND object_name = ‘SQLServer:Databases’

AND instance_name =’ABCD‘ /*DB NAME*/

select ‘ABCD’ DBNAME, @cntr_value1 ‘Lower Limit’

WAITFOR DELAY ’00:00:30′

SELECT ‘AFTER’

SELECT @cntr_value2 = cntr_value

FROM sys.dm_os_performance_counters

WHERE counter_name = ‘transactions/sec’

AND object_name = ‘SQLServer:Databases’

AND instance_name =’ABCD’ /*DB NAME*/

select ‘ABCD’ DBNAME , @cntr_value2 ‘Upper Limit’

Select @cntr_value2 – @cntr_value1 ‘Transactions per 30 secs’

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating