Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Red face Unanswered: Logging Transaction activities

    How can i log all kind of transactions(select, delete,insert,update)?
    Users may come from application, FileAid, SPUFI and other DB2 tools.
    Is there any way i can log these kind of transactions?
    Please help me.

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Statement event monitor should do the trick.

    Also you can do a database snapshot for what's in the dynamic sql package cache. There's a table function too that's useful in getting things like top-10's by various criteria.
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Mar 2004
    Posts
    4

    Red face

    Hi Petruk,
    Thanks for your reply.
    Can we log all transactions continuosly using Database snapshot or table functions?
    Our requirement is to log all transactions to know who accessed that table, what did he do, those kind of things we need to log them into our own tables. My DBA guys don't want to enable the monitor. I may not get much help from DBA. How can i acheieve this. Please help me. I'm new to this kind of stuff.
    Thanks in advance.
    Sri

  4. #4
    Join Date
    Jan 2004
    Posts
    49

    Transaction logging

    ************************************************** ********
    Quote Originally Posted by sri235
    Hi Petruk,
    Thanks for your reply.
    Can we log all transactions continuosly using Database snapshot or table functions?
    Our requirement is to log all transactions to know who accessed that table, what did he do, those kind of things we need to log them into our own tables. My DBA guys don't want to enable the monitor. I may not get much help from DBA. How can i acheieve this. Please help me. I'm new to this kind of stuff.
    Thanks in advance.
    Sri
    ************************************************** ********
    Hi,
    For this u need to write .ksh which will need to do the following points and schedule that script through crontab.
    1. collect the snapshot for dynamic sql on you db and store into some tables / flat files.
    2. reset the monitor (other wise it will update while second time onwards).
    3. do the above two steps.
    4. remember, we need to purge old files / rows (may add to your script).

    Here I assummed you are using udb 7.x on AIX. If u r using udb 8.X there are tables which u can select the values.

    With Regards

    Bala

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    He is using DB2 for z/OS. The SPUFI and File-Aid interfaces give it away.

    There is a tool that can read the transaction log on Db2 for z/OS, but probably have to pay extra for it. I know BMC has such a tool, and maybe IBM has one that is licensed separately.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by sri235
    Hi Petruk,
    Thanks for your reply.
    Can we log all transactions continuosly using Database snapshot or table functions?
    Our requirement is to log all transactions to know who accessed that table, what did he do, those kind of things we need to log them into our own tables. My DBA guys don't want to enable the monitor. I may not get much help from DBA. How can i acheieve this. Please help me. I'm new to this kind of stuff.
    Thanks in advance.
    Sri
    You can easily write triggers that will log the data to another table.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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