Unanswered: Executing an OS script from a db2 trigger
I am in a situation where I want to make a call and execute a script file (unix shell script) from a db2 trigger. It will be an after insert trigger which will execute the script after 4 rows are inserted into the table on which the trigger is based. Can someone provide me with a template where a script file sitting in an OS directory can be executed from a db2 trigger. Also, how do I tackle the call only after the fourth row is inserted. Can we reference the same table from a trigger on which a trigger is based on ?
Your trigger may:
-Increment another table to handle the "4 insertion" detection
-Call a C or Java procedure that has been registered in DB2 (with CREATE PROCEDURE...EXTERNAL NAME 'libraryfilename!entrypointofyourProc')
Sorry, I am sure that works but I can not help any more...