mbablan
26th September 2002, 01:15
Hi
Is there a way to trap all "insert" and "update" DB calls made to a specific table. I wish to do so without touching the source code of specific DLLs/DALs/scripts that perform this operation.
for eg I wish to know whenever a new Sales order is created by any baan session or process and on trapping this event I wish to create an entry in a dummy table.
We cannot switch on audit logs for performance reasons. This "trapper" for DB calls has to reside within baan environment.
Thnx in advance
MB
NPRao
26th September 2002, 02:25
Hi Mukesh,
How are you ?
You can use the BW options -
-- -set DBSLOG=value (or added values) to get debug info from the online processing of the database driver:
value description
0000001 data dict. info of tables
0000002 query info (sql level 1)
0000004 query info (sql level 2)
0000010 row action info
0000020 table action info
0000040 transaction info
0000100 dbms input/output data (sql level 2)
0000200 admin file info (sql drivers)
0000400 dbms sql statements
0001000 general debug statements
0002000 query processing info
0004000 data buffering info (communication)
or debug the bshell for the database actions.
~Vamsi
26th September 2002, 03:40
http://www.baanboard.com/baanboard/showthread.php?s=&threadid=559
The above thread is a discussion on how to extend Baan code without touching it. If you are on BaanERP, you can extend the DAL or in case of Baan IV you will have to find the appropriate main.table.io section to extend.
mbablan
8th October 2002, 03:44
Hi Prashant,
I am fine and hope the same for you. I got the point on setting the DBSLOG . However, once I have done so, how do I get an event from the Tools/Standard Program that possibly invokes my program.
I am trying to write something like a "myStnd" DAL Handler. The need is to have this DAL invoked by "Baan Stnd Program" before and/or after any calls to update/insert or delete.
for eg if I configure "my standard" DAL for table tsctm200, then any dal.update/dal.insert .. calls should invoke this.
I cannot add a code segment for each table(ie not possible to do "no source" customization). I will just store the table name in some parameters, and it would be great if I can have "Baan stnd program" generate an event for "my Stnd " DAL Handler.
Alternatively, if there is some standard event /port(not a log file) that I can poll to determine the baan's DB transaction queue, it would do the trick.
Rgds
MB