Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: How to monitor which user has accessed which table?

    I use DB2 v9.5 fixpack 2 on Linux and I would like to monitor which user accessed which table. What is the best way to do this?

    Sample:
    connect to database user user1
    select * from admin.table1
    connect reset

    connect to database user user2
    insert into admin.table1
    connect reset

    I would like to get info something like:
    Code:
    USER     TABLE           DATE_TIME
    user1    admin.table1    2010-01-07-12.12.10
    user2    admin.table1    2010-01-07-12.12.12
    Thanks
    Last edited by grofaty; 01-07-10 at 07:17.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    does exists way more simple tool, like some GUI tool or some very simple tool. This DB2 audit looks very complicated and I am afraid it will consume way too much CPU resources to be turned on non-stop.

    Actually what I need is even less data, just number of times table was accessed per user per day:
    Code:
    USER     TABLE           DATE          NUMBER_OF_TIMES_ACCESSED_IN_DAY
    user1    admin.table1    2010-01-07     10
    user2    admin.table1    2010-01-07    100
    Regards
    Last edited by grofaty; 01-18-10 at 05:23.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    db2audit is the way to go if you want to do auditing (which you do).

    The only other alternative would be to instrument your applications accordingly.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    I have asked local IBMer to give me more info about auditing and he pointed me out to Guardium this is some new company IBM has bought. But like I see this product is: "Real-Time Database Monitoring & Security for Enterprise Applications", so some kind of enterprise solution.

    But what I need is right opposite not enterprise solution, but some very simple solution to monitor only some tables in database.

  6. #6
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    for inserts/updates/deletes you could use a trigger and insert data to some table, but for selects you have to look at auditing.
    Dave

Posting Permissions

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