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 > Replication

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-06, 11:39
redwolf redwolf is offline
Registered User
 
Join Date: Apr 2004
Posts: 179
Replication

Is there a limit to the number of tables you can replicate per subscription?

Thanks
Reply With Quote
  #2 (permalink)  
Old 06-08-06, 11:53
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If you are using SQL replication, the limit is 200.

Andy
Reply With Quote
  #3 (permalink)  
Old 06-08-06, 11:58
redwolf redwolf is offline
Registered User
 
Join Date: Apr 2004
Posts: 179
Is there any "undocumented" way around this limit?
Reply With Quote
  #4 (permalink)  
Old 06-08-06, 12:48
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Use Q replication.

Andy
Reply With Quote
  #5 (permalink)  
Old 06-08-06, 20:35
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You can have more than one subscription in regular DB2 Replication.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #6 (permalink)  
Old 06-09-06, 08:17
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, you can use more that one subscription. But you have to be very careful in setting them up. If there is ant RI between the tables of the different subscriptions, replication can fail. SQL replication works at the subscription level when moving data. And the order that the data move is not guaranteed the same order that actually occurred. As an example, say you have two tables that have RI defined between them. Due to the 200 table limitation, you have to put them in separate subscriptions. On the "Source" DB someone inserts a new row in the parent table then very shortly after inserts/updates a row in the child to point to the new row in the parent. All of this happens "between" refresh cycles of APPLY. Then APPLY does a refresh and starts with the subscription that the child table belongs. It tries to do the insert/update that occurred on the source, but it fails because because the RI prevents the insert/update since the "new" parent row has not been inserted yet (APPLY has not gotten there yet).

This scenario can be fixed if you put all RI related tables in the same subscription. The problem still occurs if you have more than 200 tables all with RI to each other. There is no way to split it that will guarantee that the Units of Work (UOW) are processed in the exact same order on the destination as they were performed on the source. It has been awhile since I had tried using SQL replication, so IBM may have done something to fix this problem.

Andy
Reply With Quote
  #7 (permalink)  
Old 06-09-06, 13:16
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You haven't mentioned what version you are on ...

If splitting the subscription is not possible, you can create Views (IIRC, views can be target, but not source) on the target and create INSTEAD OF Triggers to update various tables.

I haven't tried doing this, but just a thought

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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