2-way replication Update Anywhere, Update trigger 
Author Message
 2-way replication Update Anywhere, Update trigger

Hi

I have 2 way replication UPDATE - ANYWHERE Continuos setup on win 2000 ,

DB2 7.2 fixpack 4 & 5 (DB2   7.2.3). It is working when I do any change
on one database it goes in IInd database also.
I am using only one table. Control Database is same as Source database.
User name db2admin with all rights.

Now I have to delete record from target database when column STATUS = '1

( A update trigger after which deletes this record)'. Update trigger is
able to delete record from the target database. Now by the logic of
replication it should be removed from source database also. but it
doesn't happen.

Their is no conflict. All logs are error free.  If  I run an update on
target database using STATUS='1' then trigger invoked an it is deleted
from target as well as source database. So looks like it is not able to
capture the trigger changes when  replication is going on(from source to
target).   Is it a BUG ??

.

I have tired to delete record by inserting records (inside teh update
trigger) putting  records in asn.ibmSnap_UOW & CC table on target
database but it does not go from source database.

I do not want to use SQL run feature from the replication subscription
feature because it allows sql statements which works on entire table. I
have large volume. I can't afford this.

Please help.

Thanks in advance
Saurabh



Mon, 09 Aug 2004 23:41:09 GMT
 2-way replication Update Anywhere, Update trigger

Hi

If I do one-way replication & trigger is on source database then it
works properly. But not when it is 2 way & trigger is on
target database.

1 ) I thing It is to do with something ---

Record is comming  from a Replication Event(Update record) - Then
Trigger invocation -  Then Delete -  Capture lost / Not
applied to Source database

2) in case of One way replication & Trigger is on source then -----

Record is comming from External Source(An application is updating
record on source database) - Then Trigger invocation -
Then Delete -  Target database replicated

3)  See I was able to do so even when I have 2-way replication.
Trigger is on Target Database but

Record is comming from External Source(An application is updating
record on Target Database) - Then Trigger invocation -
Then Delete -  Source database replicated

Hence you can see problem occurs only when

Record is comming  from a Replication Event(Update record)  - Case 1

where case 2 & Case 3 are
Record is comming from External Source(An application is updating
record on source database)
Record is comming from External Source(An application is updating
record on Target Database)

Sounds like a bug only ?????????????

Quote:
>Subject:
>        Re: Update Anywhere - trigger event
>   Date:
>        Thu, 21 Feb 2002 08:40:04 -0500
>   From:

>     To:


Quote:
>  Hi
>  Trigger operations are logged by the db2 logger, and logs are what
>  capture uses to figure out what to capture for replication to the target.
>  So, theoretically this should work. I'm not sure why this particular
>  delete is not being captured. My initial suggestion is that you create
>  the trigger against the source, just to test if those operations get
>  captured and applied correctly, i.e. perhaps it is just a problem
>  with the trigger on the target.
>  Alternatively, I can only suggest that you post this question to
>  comp.databases.ibm-db2.
>  Dorie.



Tue, 10 Aug 2004 15:30:13 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Update Trigger not firing after Transactional replication of an Update

2. puzzling issue with inserted, updated and IF UPDATE(column) in an update trigger

3. SQL Anywhere Update trigger not working HELP

4. Update-Anywhere Replication

5. Update Anywhere/Bi-Directional Replication

6. Update Anywhere Replication

7. Update anywhere replication

8. Update anywhere Replication question

9. Update Anywhere replication problem

10. update trigger > reuse values in update clause

11. IF UPDATE clause not working in an Update Trigger

12. Insert/Update Trigger performing Updates


 
Powered by phpBB® Forum Software