Results of exception on Trigger
Posted in 2013
Topics: Triggers, Constraints & Referential Integrity
Hi there, we are using informix 5. We need to execute a task (sending SMS to customers) on the basis of new records coming in a table (table1). I want to create a replica (with name table2) of this table (table1) so i can execute my task on table2. I am wondering what will happened if there will be some exception occured during SELECT from table1 and INSERT into table2. Can anyone tell me if my OLTP application will be able to INSERT data in table1 no matter if trigger is failing or not? I would really appreciate, if someone can tell me if there is some other way of copying data from one table to another (except db replication) in runtime. Regards, Navaid Arif.
Your realistic options are: 1. Insert triggers on table1 2. An external ESQL/C (or other host language) application that polls table1 (or it's header info) periodically to see if any new rows have arrived since the last poll and copies them to table2. If you go with triggers and the insert into table2 fails the triggering insert will experience the error and fail. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Jun 27, 2013 at 8:00 AM, NAVAID ARIF <navaid.arif@access.net.pk>wrote: > Hi there, we are using informix 5. We need to execute a task (sending SMS > to > customers) on the basis of new records coming in a table (table1). I want > to > create a replica (with name table2) of this table (table1) so i can > execute my > task on table2. > > I am wondering what will happened if there will be some exception occured > during SELECT from table1 and INSERT into table2. Can anyone tell me if my > OLTP application will be able to INSERT data in table1 no matter if > trigger is > failing or not? > > I would really appreciate, if someone can tell me if there is some other > way > of copying data from one table to another (except db replication) in > runtime. > > Regards, > Navaid Arif. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --047d7b342c90eae4e004e022334d