If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Replicate only Inserts/Updates

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-08, 14:01
PKPChuck PKPChuck is offline
Registered User
 
Join Date: Sep 2006
Location: Columbus, OH
Posts: 64
Replicate only Inserts/Updates

DB2 7.2
AIX 5L

I have a reporting database which I want to capture INSERTS/UPDATES to the application database but not DELETES. This is because we constantly prune the application database to keep only 3 days worth of data.

Currently I have an export/import job running, but it does not handle any of the updates, just new records. I'm wondering if I could take advantage of SQL replication but turn off DELETES or if there is another solution out there for this.

I'm currently on DB2 7.2 but could upgrade if the solution requires it.


Thanks,

Charlie.
Reply With Quote
  #2 (permalink)  
Old 01-14-08, 14:23
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You could use INSERT/UPDATE triggers to write to a new table that "logs" the insert/update events. Then use that table as a basis for the export/import.

Andy
Reply With Quote
  #3 (permalink)  
Old 01-14-08, 15:11
PKPChuck PKPChuck is offline
Registered User
 
Join Date: Sep 2006
Location: Columbus, OH
Posts: 64
Thanks Andy, I thought about that. I was just concerned that might effect effect the performance of the application database, having to issue additional insert/updates for every record. Currently we have a volume of 200,000 records a day, and that doesnt include updates.

Charlie
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On