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 > Who is modifying my data.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-11-09, 12:49
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Who is modifying my data.

A table is being updated

How can I catch the updater.

Is it possible to setup the update trigger and save info in another table.

Which function will give APP ID.
and if possible how can I have SQL TEXT used in the transaction.

Thanks in advance.

DBFinder

DB2 v 8.1.12 Win 2k3
Reply With Quote
  #2 (permalink)  
Old 06-11-09, 12:56
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
First off who has access to do an update?

you can set up a trigger and using USER, I think, you can have what you need.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #3 (permalink)  
Old 06-11-09, 12:59
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

But that might not help ( all apps here use db2admin )

Anyway via APP_ID to get IP.

DBFinder
Reply With Quote
  #4 (permalink)  
Old 06-11-09, 13:46
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I don't know really know much about db2audit, but I think it can do what you're looking for:
DB2 UDB security, Part 5: Understand the DB2 audit facility
Reply With Quote
  #5 (permalink)  
Old 06-11-09, 13:50
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
This utility cannot be used. This brings DB down. I tried to.

Can we determin APP Id on the fly.
Reply With Quote
  #6 (permalink)  
Old 06-11-09, 13:57
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
event monitor for statements may do it
Reply With Quote
  #7 (permalink)  
Old 06-11-09, 16:43
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
problem with monitors is unless you know when changes are taking place you have to run them all the time.

Set up a trigger and foget about it.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #8 (permalink)  
Old 06-11-09, 16:47
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Alright,

I have setup a trigger, but will I get Application ID so that the workstation and application can be identified.

Will CURRENT CLIENT_APPLNAME do.

Let us see when it gets modified again.

Thanx

DBFinder
Reply With Quote
  #9 (permalink)  
Old 06-11-09, 16:58
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
DBFinder, Depending on you setup, I would look at all of the Special Registers to see if any of them will get you the information you want. Some that might be useful:

CURRENT CLIENT_USERID
CURRENT CLIENT_WRKSTNNAME
CURRENT SERVER
CURRENT USER
SESSION_USER
SYSTEM_USER

I would save all (or most all) of these. Some may not have any useful information, but it is better to collect the info and not need it than to not collect it and (maybe) need it.
Reply With Quote
  #10 (permalink)  
Old 06-11-09, 21:55
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Finally Resolved,

As I created the triggers, I forgot that I am writing for ver 8.2.

I used client_applname in triggers which raised an exception.
The exception went through ticketing system and at the end came to me.

This exception includes everything and then I forwarded this to management.

An java application was modifying the table which it should not. So the logical mismatch between developing and portal people.

Thanks for all effort.

DBFinder
Reply With Quote
  #11 (permalink)  
Old 06-12-09, 09:26
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Do not stop there. Revoke their access to prevent them being able to do so in the future if they are not supposed to. Review your security. Sounds like you might have a security problem.

Many companies do not give 2 cents to their security.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #12 (permalink)  
Old 06-12-09, 09:57
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Hi,

I regard your opinion, I would have trained them if I would have been a decision maker.

However, In our setup our CIO will do that. He knows how much data they have spoiled, and work around this damage.

I hardly believe that they will take any punitive action, instead a corrective action is more important.

A developers' team controls the portal and CIO is head of all, and they bring to his notice, any application whenever is deployed, including all java code. This comes to be everybody's (team's) mistake.

My scope is only to hunt and report to my manager or CIO or the requestor. Still I got an advantage of hunting that I am going to write my code to do this quickly in future.

Soon I discovered, this was communicated to all teams and higher authorities.

Security actually is controlled at Application level, no DB level.

Thanks all, I wouldn't have been possible without your support.

DBFinder
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