Guest User

Untitled

a guest
Feb 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. declare @object_name as varchar(500)
  2. select @object_name= object_name FROM sys.dm_os_performance_counters
  3. WHERE counter_name = 'Transactions/sec'
  4. AND instance_name = 'master'
  5. DECLARE @cntr_value bigint
  6. SELECT @cntr_value = cntr_value
  7. FROM sys.dm_os_performance_counters
  8. WHERE counter_name = 'Transactions/sec'
  9. AND object_name = @object_name
  10. AND instance_name = 'master'
  11. WAITFOR DELAY '00:00:01'
  12. SELECT cntr_value - @cntr_value
  13. FROM sys.dm_os_performance_counters
  14. WHERE counter_name = 'Transactions/sec'
  15. AND object_name = @object_name
  16. AND instance_name = 'master'
Add Comment
Please, Sign In to add comment