SQL to monitor # of Transactions?

  • Hello,

    Does anyone know if there is a way to query the system tables in SQL server to get a breakdown of how many total transactions or transactions per minute are occuring for each individual database in an instance? I know in Oracle, it is tracked in the system tables and I'm sure it is in SQL Server too, but does anyone know which tables it's stored in? Or better yet, does anyone have a SQL script that can extract this information? Thanks so much.

  • It's not stored in SQL Server. You can run Profiler to track this.

    Steve Jones

    steve@dkranch.net

  • Wow, are you kidding? The reason I am asking is in our environment we have 8 different db platforms and hundreds of db servers. We are working on a monitoring tool that will go out and query all the different db servers to track transactions and post the results to a web page. It would be impossible to have to run profiler on every one of our Sql Server db servers. There really is no way to track this through the system tables?

  • I'll try to look around, but AFAIK SQL doesn't maintain these types of statistics. Profiler, Performance Montitor were designed to do this.

    Steve Jones

    steve@dkranch.net

  • Yeah I understand. But it's a little inconvenient to setup profiler for every new product and for every db on every db server we have.

  • There is a counter under SQL Server:Database statistics in Performance Monitor/System Monitor. Within SQL Server there is a system table called sysperfinfo for both SQL Server 7 and 2000 that contains statistics such as Transaction/sec.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • Didn't know that. Is this an instantaneous value? Updated every xx sec/ms?

    Steve Jones

    steve@dkranch.net

  • That I don't know. BOL doesn't specify and I haven't had the time to find out.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • Thanks so much you guys for the input on this. I just spoke with the person designing the program and we actually need to track total number of transactions over time, and not trans/sec. So I need a counter of some sort. I couldn't find it in the sysperfinfo table. Anyone know if there is a way of counting total transactions? Thanks again.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply