View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate
Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Mon May 09, 2011 7:02 am Post subject: need to know programs which do inserts into particular table |
|
|
Hi All,
Is there a way to know what all programs are doing inserts to a particular table , is there any SQL query for that. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Mon May 09, 2011 1:16 pm Post subject: |
|
|
yadav2005,
You can query the SYSIBM.SYSTABAUTH to see the GRANTEE with INSERTAUTH = 'Y' and cross reference that with sysplans/syspackage catalog tables.
Kolusu |
|
Back to top |
|
|
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Wed May 11, 2011 7:34 am Post subject: |
|
|
Depending on how much Dynamic SQL your shop uses, you might not get a complete picture using SYSTABAUTH. You'd need to look into DB2 Auditing. Another option would be to create an Insert Trigger and write auditing information yourself either in new columns on the target table or to a separate table. This would involve application changes which might not be practicable. |
|
Back to top |
|
|
|
|