Enterprise Replication & Triggers
Posted in 2004
Topics: High Availability & Replication, Triggers, Constraints & Referential Integrity
Hello,
I'm replicating the table1 on Serv1 to another table2 on Serv2 with
ER.
No Problem.
But, If I add a trigger on the target table2 to copy this one on
another table3 under the same database with the following
CREATE TRIGGER test_erINSERT ON dwmd_bran_53
REFERENCING NEW as new
FOR EACH ROW
(
INSERT INTO dwmd_bran (brno,language,sdesc,desc1,desc2,siteno)
VALUES (new.brno,new.language,new.sdesc,new.desc1,new.desc2,new.siteno)
);
I receive the following message
16:40:07 CDR CDRDS: transaction aborted (All rows in a transactiondefined with
row scope were rejected)
Someone has an idea ?
To be clear, I want that each time table2 is loaded from table1, the
trigger on table2 have to load the table3 with the new record.
Table 1 on Serv1
Table 2 and Table 3 on Serv2
Regards,
Bj
We will need to see what the ATS/RIS file contains.
"Bj" <Bruxelles.Jette@caramail.com> wrote in message
news:89d8947b.0405100726.13ee4d66@posting.google.com...
> Hello,
>
> I'm replicating the table1 on Serv1 to another table2 on Serv2 with
> ER.
> No Problem.
>
> But, If I add a trigger on the target table2 to copy this one on
> another table3 under the same database with the following
>
> CREATE TRIGGER test_er> INSERT ON dwmd_bran_53
> REFERENCING NEW as new
> FOR EACH ROW
> (
> INSERT INTO dwmd_bran (brno,language,sdesc,desc1,desc2,siteno)
> VALUES (new.brno,new.language,new.sdesc,new.desc1,new.desc2,new.siteno)
> );>
> I receive the following message
>
> 16:40:07 CDR CDRDS: transaction aborted (All rows in a transaction> defined with
> row scope were rejected)
>
> Someone has an idea ?
>
> To be clear, I want that each time table2 is loaded from table1, the
> trigger on table2 have to load the table3 with the new record.
>
> Table 1 on Serv1
> Table 2 and Table 3 on Serv2
>
> Regards,
> Bj
Hello Madison,
There are no files on my directories ATS and RIS
I'm working with IDS 7.31UC2
It is strange ? See below
ugnd1:/usr/informix # cdr list ser g_UGND
NAME ID ATTRIBUTES
---------------------------------------
g_UGND 98 sendq= recvq= atsdir=/NA_INFormix/ATS
risdir=/NA_INFormix/RIS
ugnd1:/usr/informix # cd /NA_INF*
ugnd1:/NA_INFormix # ls -l ATS
total 0
ugnd1:/NA_INFormix # ls -l RIS
total 0
ugnd1:/NA_INFormix # ls -ld ATS RIS
drwxr-xr-x 2 informix informix 512 May 4 16:38 ATS
drwxr-xr-x 2 informix informix 512 May 4 16:56 RIS
Bj
"Madison Pruet" <mpruet@comcast.net> wrote in message news:<pUNnc.64478$kh4.3859926@attbi_s52>...
> We will need to see what the ATS/RIS file contains.
>
> "Bj" <Bruxelles.Jette@caramail.com> wrote in message
> news:89d8947b.0405100726.13ee4d66@posting.google.com...
> > Hello,
> >
> > I'm replicating the table1 on Serv1 to another table2 on Serv2 with
> > ER.
> > No Problem.
> >
> > But, If I add a trigger on the target table2 to copy this one on
> > another table3 under the same database with the following
> >
> > CREATE TRIGGER test_er> > INSERT ON dwmd_bran_53
> > REFERENCING NEW as new
> > FOR EACH ROW
> > (
> > INSERT INTO dwmd_bran (brno,language,sdesc,desc1,desc2,siteno)
> > VALUES (new.brno,new.language,new.sdesc,new.desc1,new.desc2,new.siteno)
> > );> >
> > I receive the following message
> >
> > 16:40:07 CDR CDRDS: transaction aborted (All rows in a transaction> > defined with
> > row scope were rejected)
> >
> > Someone has an idea ?
> >
> > To be clear, I want that each time table2 is loaded from table1, the
> > trigger on table2 have to load the table3 with the new record.
> >
> > Table 1 on Serv1
> > Table 2 and Table 3 on Serv2
> >
> > Regards,
> > Bj
Are you sure that the replicate has ATS/RIS turned on. The server might
have it enabled, but unless the replicated has it turned on, you will not
get anything.
"Bj" <Bruxelles.Jette@caramail.com> wrote in message
news:89d8947b.0405101328.68bb1b20@posting.google.com...
> Hello Madison,
>
> There are no files on my directories ATS and RIS
> I'm working with IDS 7.31UC2
> It is strange ? See below
>
> ugnd1:/usr/informix # cdr list ser g_UGND
> NAME ID ATTRIBUTES
> ---------------------------------------
> g_UGND 98 sendq= recvq= atsdir=/NA_INFormix/ATS
> risdir=/NA_INFormix/RIS
>
> ugnd1:/usr/informix # cd /NA_INF*
> ugnd1:/NA_INFormix # ls -l ATS
> total 0
> ugnd1:/NA_INFormix # ls -l RIS
> total 0
> ugnd1:/NA_INFormix # ls -ld ATS RIS
> drwxr-xr-x 2 informix informix 512 May 4 16:38 ATS
> drwxr-xr-x 2 informix informix 512 May 4 16:56 RIS
>
> Bj
>
> "Madison Pruet" <mpruet@comcast.net> wrote in message
news:<pUNnc.64478$kh4.3859926@attbi_s52>...
> > We will need to see what the ATS/RIS file contains.
> >
> > "Bj" <Bruxelles.Jette@caramail.com> wrote in message
> > news:89d8947b.0405100726.13ee4d66@posting.google.com...
> > > Hello,
> > >
> > > I'm replicating the table1 on Serv1 to another table2 on Serv2 with
> > > ER.
> > > No Problem.
> > >
> > > But, If I add a trigger on the target table2 to copy this one on
> > > another table3 under the same database with the following
> > >
> > > CREATE TRIGGER test_er> > > INSERT ON dwmd_bran_53
> > > REFERENCING NEW as new
> > > FOR EACH ROW
> > > (
> > > INSERT INTO dwmd_bran (brno,language,sdesc,desc1,desc2,siteno)
> > > VALUES
(new.brno,new.language,new.sdesc,new.desc1,new.desc2,new.siteno)
> > > );> > >
> > > I receive the following message
> > >
> > > 16:40:07 CDR CDRDS: transaction aborted (All rows in a transaction> > > defined with
> > > row scope were rejected)
> > >
> > > Someone has an idea ?
> > >
> > > To be clear, I want that each time table2 is loaded from table1, the
> > > trigger on table2 have to load the table3 with the new record.
> > >
> > > Table 1 on Serv1
> > > Table 2 and Table 3 on Serv2
> > >
> > > Regards,
> > > Bj