If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Logging Transaction activities

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-02-05, 06:08
sri235 sri235 is offline
Registered User
 
Join Date: Mar 2004
Posts: 4
Red face 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.
Reply With Quote
  #2 (permalink)  
Old 11-02-05, 09:55
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 11-03-05, 06:22
sri235 sri235 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 11-10-05, 00:53
bala_e bala_e is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 11-10-05, 01:04
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #6 (permalink)  
Old 11-10-05, 01:05
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On