Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Posts
    5

    Question Unanswered: Transaction Count

    What is the command in DB2 to find the transaction count for a connection?

    SQL Server it is @@TRANCOUNT, DB2 ???

    Appreciate your early response.

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    There are few things that can be done in Db2:

    1.Make use of a event monitor
    2.Use db2batch
    3.DB2 GET SNAPSHOT FOR DYNAMIC SQL ON DBNAME
    4.Make this entry in db2cli.ini file to get SQL trace
    TRACE=0
    TRACEFLUSH=1
    TRACECOMM=1
    TRACEFILENAME=c:\trace.log

    But you have a manual work here of counting the transactions.
    Hope this helps..

    Cheers,
    Prashant

  3. #3
    Join Date
    Dec 2002
    Posts
    5

    Arrow

    Thanks, I need to access Transactions Count in Application, So I need to know what is the command in DB2.


    Originally posted by dahalkar_p
    Hi,

    There are few things that can be done in Db2:

    1.Make use of a event monitor
    2.Use db2batch
    3.DB2 GET SNAPSHOT FOR DYNAMIC SQL ON DBNAME
    4.Make this entry in db2cli.ini file to get SQL trace
    TRACE=0
    TRACEFLUSH=1
    TRACECOMM=1
    TRACEFILENAME=c:\trace.log

    But you have a manual work here of counting the transactions.
    Hope this helps..

    Cheers,

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I think, the crux of Dahalkar's post is : 'You cannot do a transaction count as in DB2 as you do in SQLServer'

    Sathyaran

    Originally posted by senthilks
    Thanks, I need to access Transactions Count in Application, So I need to know what is the command in DB2.

  5. #5
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Check this out , it may be of help:

    select STMTNO,TEXT from SYSCAT.STATEMENTS where PKGSCHEMA=Your_schema';

    or

    select count(*) from SYSCAT.STATEMENTS where PKGSCHEMA=Your_schema';

    Cheers,
    Prashant

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •