By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,004 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,004 IT Pros & Developers. It's quick & easy.

Can changes done by the trigger be replicated back?

P: 1
DB2 8.1.14 on win XP but later will be moved to AIX.
The peer to peer replica bewtween server1 and server2 is setup (just one table now) - and it works when the changes are done to the table using just update.
On the server1 the the status column is set to 1 (update sql) and then the change is replicated to server2 where there is a trigger:
CREATE TRIGGER DB2ADMIN.MAINT AFTER UPDATE OF STATUS ON DBO.TBLLOCK REFERENCING OLD AS o NEW AS n FOR EACH ROW MODE DB2SQL
WHEN (n.status !=o.status and n.status=1)
BEGIN ATOMIC
update dbo.tbllock set status =2, dteMaintStartTS = current timestamp where status =n.status;
END
The trigger works as the row on the server2 has status2 and the time stamp is updated.
The problem is that this change is not replicated back to server1.
On server2 I also tried to recapture changes - and I can see the update in the CDtbllock table but the changes are not applied just pruned by capture program.
Sep 14 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.